1tld_check_lz(3) libidn tld_check_lz(3)
2
3
4
6 tld_check_lz - API function
7
9 #include <tld.h>
10
11 int tld_check_lz(const char * in, size_t * errpos, const Tld_table **
12 overrides);
13
15 const char * in
16 Zero-terminated string in the current locales encoding to
17 process.
18
19 size_t * errpos
20 Position of offending character is returned here.
21
22 const Tld_table ** overrides
23 A Tld_table array of additional domain restriction struc‐
24 tures that complement and supersede the built-in informa‐
25 tion.
26
28 Test each of the characters in in for whether or not they are allowed
29 by the information in overrides or by the built-in TLD restriction
30 data. When data for the same TLD is available both internally and in
31 overrides, the information in overrides takes precedence. If several
32 entries for a specific TLD are found, the first one is used. If over‐
33 rides is NULL, only the built-in information is used. The position of
34 the first offending character is returned in errpos. Note that the
35 error position refers to the decoded character offset rather than the
36 byte position in the string.
37
39 Returns the Tld_rc value TLD_SUCCESS if all characters are valid or
40 when tld is null, TLD_INVALID if a character is not allowed, or addi‐
41 tional error codes on general failure conditions.
42
44 Report bugs to <bug-libidn@gnu.org>. GNU Libidn home page:
45 http://www.gnu.org/software/libidn/ General help using GNU software:
46 http://www.gnu.org/gethelp/
47
49 Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Simon
50 Josefsson.
51 Copying and distribution of this file, with or without modification,
52 are permitted in any medium without royalty provided the copyright
53 notice and this notice are preserved.
54
56 The full documentation for libidn is maintained as a Texinfo manual.
57 If the info and libidn programs are properly installed at your site,
58 the command
59
60 info libidn
61
62 should give you access to the complete manual.
63
64
65
66libidn 1.18 tld_check_lz(3)