1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>tld</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
<link rel="home" href="index.html" title="GNU Libidn API Reference Manual">
<link rel="up" href="ch01.html" title="GNU Libidn API Reference Manual">
<link rel="prev" href="libidn-punycode.html" title="punycode">
<link rel="next" href="libidn-stringprep.html" title="stringprep">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="ch01.html" title="GNU Libidn API Reference Manual">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="libidn-punycode.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GNU Libidn API Reference Manual</th>
<td><a accesskey="n" href="libidn-stringprep.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libidn-tld.synopsis" class="shortcut">Top</a>
|
<a href="#libidn-tld.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="tld">
<a name="libidn-tld"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libidn-tld.top_of_page"></a>tld</span></h2>
<p>tld</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="libidn-tld.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#define <a class="link" href="libidn-idna.html#IDNAPI--CAPS" title="IDNAPI">IDNAPI</a>
typedef <a class="link" href="libidn-tld.html#Tld-table-element" title="Tld_table_element">Tld_table_element</a>;
typedef <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a>;
enum <a class="link" href="libidn-tld.html#Tld-rc" title="enum Tld_rc">Tld_rc</a>;
const char * <a class="link" href="libidn-tld.html#tld-strerror" title="tld_strerror ()">tld_strerror</a> (<a class="link" href="libidn-tld.html#Tld-rc" title="enum Tld_rc">Tld_rc</a> rc);
int <a class="link" href="libidn-tld.html#tld-get-4" title="tld_get_4 ()">tld_get_4</a> (const uint32_t *in,
size_t inlen,
char **out);
int <a class="link" href="libidn-tld.html#tld-get-4z" title="tld_get_4z ()">tld_get_4z</a> (const uint32_t *in,
char **out);
int <a class="link" href="libidn-tld.html#tld-get-z" title="tld_get_z ()">tld_get_z</a> (const char *in,
char **out);
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> * <a class="link" href="libidn-tld.html#tld-get-table" title="tld_get_table ()">tld_get_table</a> (const char *tld,
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> **tables);
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> * <a class="link" href="libidn-tld.html#tld-default-table" title="tld_default_table ()">tld_default_table</a> (const char *tld,
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> **overrides);
int <a class="link" href="libidn-tld.html#tld-check-4t" title="tld_check_4t ()">tld_check_4t</a> (const uint32_t *in,
size_t inlen,
size_t *errpos,
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> *tld);
int <a class="link" href="libidn-tld.html#tld-check-4tz" title="tld_check_4tz ()">tld_check_4tz</a> (const uint32_t *in,
size_t *errpos,
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> *tld);
int <a class="link" href="libidn-tld.html#tld-check-4" title="tld_check_4 ()">tld_check_4</a> (const uint32_t *in,
size_t inlen,
size_t *errpos,
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> **overrides);
int <a class="link" href="libidn-tld.html#tld-check-4z" title="tld_check_4z ()">tld_check_4z</a> (const uint32_t *in,
size_t *errpos,
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> **overrides);
int <a class="link" href="libidn-tld.html#tld-check-8z" title="tld_check_8z ()">tld_check_8z</a> (const char *in,
size_t *errpos,
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> **overrides);
int <a class="link" href="libidn-tld.html#tld-check-lz" title="tld_check_lz ()">tld_check_lz</a> (const char *in,
size_t *errpos,
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> **overrides);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="libidn-tld.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1" title="Details">
<a name="libidn-tld.details"></a><h2>Details</h2>
<div class="refsect2" title="IDNAPI">
<a name="IDNAPI--CAPS"></a><h3>IDNAPI</h3>
<pre class="programlisting">#define IDNAPI</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="Tld_table_element">
<a name="Tld-table-element"></a><h3>Tld_table_element</h3>
<pre class="programlisting"> typedef struct Tld_table_element Tld_table_element;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="Tld_table">
<a name="Tld-table"></a><h3>Tld_table</h3>
<pre class="programlisting"> typedef struct Tld_table Tld_table;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="enum Tld_rc">
<a name="Tld-rc"></a><h3>enum Tld_rc</h3>
<pre class="programlisting"> typedef enum
{
TLD_SUCCESS = 0,
TLD_INVALID = 1, /* Invalid character found. */
TLD_NODATA = 2, /* Char, domain or inlen = 0. */
TLD_MALLOC_ERROR = 3,
TLD_ICONV_ERROR = 4,
TLD_NO_TLD = 5,
/* Workaround typo in earlier versions. */
TLD_NOTLD = TLD_NO_TLD
} Tld_rc;
</pre>
<p>
Enumerated return codes of the TLD checking functions.
The value 0 is guaranteed to always correspond to success.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="TLD-SUCCESS--CAPS"></a><span class="term"><code class="literal">TLD_SUCCESS</code></span></p></td>
<td> Successful operation. This value is guaranteed to
always be zero, the remaining ones are only guaranteed to hold
non-zero values, for logical comparison purposes.
</td>
</tr>
<tr>
<td><p><a name="TLD-INVALID--CAPS"></a><span class="term"><code class="literal">TLD_INVALID</code></span></p></td>
<td> Invalid character found.
</td>
</tr>
<tr>
<td><p><a name="TLD-NODATA--CAPS"></a><span class="term"><code class="literal">TLD_NODATA</code></span></p></td>
<td> No input data was provided.
</td>
</tr>
<tr>
<td><p><a name="TLD-MALLOC-ERROR--CAPS"></a><span class="term"><code class="literal">TLD_MALLOC_ERROR</code></span></p></td>
<td> Error during memory allocation.
</td>
</tr>
<tr>
<td><p><a name="TLD-ICONV-ERROR--CAPS"></a><span class="term"><code class="literal">TLD_ICONV_ERROR</code></span></p></td>
<td> Error during iconv string conversion.
</td>
</tr>
<tr>
<td><p><a name="TLD-NO-TLD--CAPS"></a><span class="term"><code class="literal">TLD_NO_TLD</code></span></p></td>
<td> No top-level domain found in domain string.
</td>
</tr>
<tr>
<td><p><a name="TLD-NOTLD--CAPS"></a><span class="term"><code class="literal">TLD_NOTLD</code></span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="tld_strerror ()">
<a name="tld-strerror"></a><h3>tld_strerror ()</h3>
<pre class="programlisting">const char * tld_strerror (<a class="link" href="libidn-tld.html#Tld-rc" title="enum Tld_rc">Tld_rc</a> rc);</pre>
<p>
Convert a return code integer to a text string. This string can be
used to output a diagnostic message to the user.
</p>
<p>
TLD_SUCCESS: Successful operation. This value is guaranteed to
always be zero, the remaining ones are only guaranteed to hold
non-zero values, for logical comparison purposes.
TLD_INVALID: Invalid character found.
TLD_NODATA: No input data was provided.
TLD_MALLOC_ERROR: Error during memory allocation.
TLD_ICONV_ERROR: Error during iconv string conversion.
TLD_NO_TLD: No top-level domain found in domain string.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>rc</code></em> :</span></p></td>
<td> tld return code
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Returns a pointer to a statically allocated string
containing a description of the error with the return code <em class="parameter"><code>rc</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="tld_get_4 ()">
<a name="tld-get-4"></a><h3>tld_get_4 ()</h3>
<pre class="programlisting">int tld_get_4 (const uint32_t *in,
size_t inlen,
char **out);</pre>
<p>
Isolate the top-level domain of <em class="parameter"><code>in</code></em> and return it as an ASCII
string in <em class="parameter"><code>out</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td> Array of unicode code points to process. Does not need to be
zero terminated.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>inlen</code></em> :</span></p></td>
<td> Number of unicode code points.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td> Zero terminated ascii result string pointer.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Return <a class="link" href="libidn-tld.html#TLD-SUCCESS--CAPS"><code class="literal">TLD_SUCCESS</code></a> on success, or the corresponding
<a class="link" href="libidn-tld.html#Tld-rc" title="enum Tld_rc"><span class="type">Tld_rc</span></a> error code otherwise.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="tld_get_4z ()">
<a name="tld-get-4z"></a><h3>tld_get_4z ()</h3>
<pre class="programlisting">int tld_get_4z (const uint32_t *in,
char **out);</pre>
<p>
Isolate the top-level domain of <em class="parameter"><code>in</code></em> and return it as an ASCII
string in <em class="parameter"><code>out</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td> Zero terminated array of unicode code points to process.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td> Zero terminated ascii result string pointer.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Return <a class="link" href="libidn-tld.html#TLD-SUCCESS--CAPS"><code class="literal">TLD_SUCCESS</code></a> on success, or the corresponding
<a class="link" href="libidn-tld.html#Tld-rc" title="enum Tld_rc"><span class="type">Tld_rc</span></a> error code otherwise.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="tld_get_z ()">
<a name="tld-get-z"></a><h3>tld_get_z ()</h3>
<pre class="programlisting">int tld_get_z (const char *in,
char **out);</pre>
<p>
Isolate the top-level domain of <em class="parameter"><code>in</code></em> and return it as an ASCII
string in <em class="parameter"><code>out</code></em>. The input string <em class="parameter"><code>in</code></em> may be UTF-8, ISO-8859-1 or
any ASCII compatible character encoding.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td> Zero terminated character array to process.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td> Zero terminated ascii result string pointer.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Return <a class="link" href="libidn-tld.html#TLD-SUCCESS--CAPS"><code class="literal">TLD_SUCCESS</code></a> on success, or the corresponding
<a class="link" href="libidn-tld.html#Tld-rc" title="enum Tld_rc"><span class="type">Tld_rc</span></a> error code otherwise.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="tld_get_table ()">
<a name="tld-get-table"></a><h3>tld_get_table ()</h3>
<pre class="programlisting">const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> * tld_get_table (const char *tld,
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> **tables);</pre>
<p>
Get the TLD table for a named TLD by searching through the given
TLD table array.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>tld</code></em> :</span></p></td>
<td> TLD name (e.g. "com") as zero terminated ASCII byte string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tables</code></em> :</span></p></td>
<td> Zero terminated array of <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table"><span class="type">Tld_table</span></a> info-structures for
TLDs.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Return structure corresponding to TLD <em class="parameter"><code>tld</code></em> by going
thru <em class="parameter"><code>tables</code></em>, or return <code class="literal">NULL</code> if no such structure is found.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="tld_default_table ()">
<a name="tld-default-table"></a><h3>tld_default_table ()</h3>
<pre class="programlisting">const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> * tld_default_table (const char *tld,
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> **overrides);</pre>
<p>
Get the TLD table for a named TLD, using the internal defaults,
possibly overrided by the (optional) supplied tables.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>tld</code></em> :</span></p></td>
<td> TLD name (e.g. "com") as zero terminated ASCII byte string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>overrides</code></em> :</span></p></td>
<td> Additional zero terminated array of <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table"><span class="type">Tld_table</span></a>
info-structures for TLDs, or <code class="literal">NULL</code> to only use library deault
tables.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Return structure corresponding to TLD <em class="parameter"><code>tld_str</code></em>, first
looking through <em class="parameter"><code>overrides</code></em> then thru built-in list, or <code class="literal">NULL</code> if
no such structure found.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="tld_check_4t ()">
<a name="tld-check-4t"></a><h3>tld_check_4t ()</h3>
<pre class="programlisting">int tld_check_4t (const uint32_t *in,
size_t inlen,
size_t *errpos,
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> *tld);</pre>
<p>
Test each of the code points in <em class="parameter"><code>in</code></em> for whether or not
they are allowed by the data structure in <em class="parameter"><code>tld</code></em>, return
the position of the first character for which this is not
the case in <em class="parameter"><code>errpos</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td> Array of unicode code points to process. Does not need to be
zero terminated.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>inlen</code></em> :</span></p></td>
<td> Number of unicode code points.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>errpos</code></em> :</span></p></td>
<td> Position of offending character is returned here.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tld</code></em> :</span></p></td>
<td> A <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table"><span class="type">Tld_table</span></a> data structure representing the restrictions for
which the input should be tested.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Returns the <a class="link" href="libidn-tld.html#Tld-rc" title="enum Tld_rc"><span class="type">Tld_rc</span></a> value <a class="link" href="libidn-tld.html#TLD-SUCCESS--CAPS"><code class="literal">TLD_SUCCESS</code></a> if all code
points are valid or when <em class="parameter"><code>tld</code></em> is null, <a class="link" href="libidn-tld.html#TLD-INVALID--CAPS"><code class="literal">TLD_INVALID</code></a> if a
character is not allowed, or additional error codes on general
failure conditions.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="tld_check_4tz ()">
<a name="tld-check-4tz"></a><h3>tld_check_4tz ()</h3>
<pre class="programlisting">int tld_check_4tz (const uint32_t *in,
size_t *errpos,
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> *tld);</pre>
<p>
Test each of the code points in <em class="parameter"><code>in</code></em> for whether or not
they are allowed by the data structure in <em class="parameter"><code>tld</code></em>, return
the position of the first character for which this is not
the case in <em class="parameter"><code>errpos</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td> Zero terminated array of unicode code points to process.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>errpos</code></em> :</span></p></td>
<td> Position of offending character is returned here.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tld</code></em> :</span></p></td>
<td> A <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table"><span class="type">Tld_table</span></a> data structure representing the restrictions for
which the input should be tested.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Returns the <a class="link" href="libidn-tld.html#Tld-rc" title="enum Tld_rc"><span class="type">Tld_rc</span></a> value <a class="link" href="libidn-tld.html#TLD-SUCCESS--CAPS"><code class="literal">TLD_SUCCESS</code></a> if all code
points are valid or when <em class="parameter"><code>tld</code></em> is null, <a class="link" href="libidn-tld.html#TLD-INVALID--CAPS"><code class="literal">TLD_INVALID</code></a> if a
character is not allowed, or additional error codes on general
failure conditions.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="tld_check_4 ()">
<a name="tld-check-4"></a><h3>tld_check_4 ()</h3>
<pre class="programlisting">int tld_check_4 (const uint32_t *in,
size_t inlen,
size_t *errpos,
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> **overrides);</pre>
<p>
Test each of the code points in <em class="parameter"><code>in</code></em> for whether or not they are
allowed by the information in <em class="parameter"><code>overrides</code></em> or by the built-in TLD
restriction data. When data for the same TLD is available both
internally and in <em class="parameter"><code>overrides</code></em>, the information in <em class="parameter"><code>overrides</code></em> takes
precedence. If several entries for a specific TLD are found, the
first one is used. If <em class="parameter"><code>overrides</code></em> is <code class="literal">NULL</code>, only the built-in
information is used. The position of the first offending character
is returned in <em class="parameter"><code>errpos</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td> Array of unicode code points to process. Does not need to be
zero terminated.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>inlen</code></em> :</span></p></td>
<td> Number of unicode code points.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>errpos</code></em> :</span></p></td>
<td> Position of offending character is returned here.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>overrides</code></em> :</span></p></td>
<td> A <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table"><span class="type">Tld_table</span></a> array of additional domain restriction
structures that complement and supersede the built-in information.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Returns the <a class="link" href="libidn-tld.html#Tld-rc" title="enum Tld_rc"><span class="type">Tld_rc</span></a> value <a class="link" href="libidn-tld.html#TLD-SUCCESS--CAPS"><code class="literal">TLD_SUCCESS</code></a> if all code
points are valid or when <em class="parameter"><code>tld</code></em> is null, <a class="link" href="libidn-tld.html#TLD-INVALID--CAPS"><code class="literal">TLD_INVALID</code></a> if a
character is not allowed, or additional error codes on general
failure conditions.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="tld_check_4z ()">
<a name="tld-check-4z"></a><h3>tld_check_4z ()</h3>
<pre class="programlisting">int tld_check_4z (const uint32_t *in,
size_t *errpos,
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> **overrides);</pre>
<p>
Test each of the code points in <em class="parameter"><code>in</code></em> for whether or not they are
allowed by the information in <em class="parameter"><code>overrides</code></em> or by the built-in TLD
restriction data. When data for the same TLD is available both
internally and in <em class="parameter"><code>overrides</code></em>, the information in <em class="parameter"><code>overrides</code></em> takes
precedence. If several entries for a specific TLD are found, the
first one is used. If <em class="parameter"><code>overrides</code></em> is <code class="literal">NULL</code>, only the built-in
information is used. The position of the first offending character
is returned in <em class="parameter"><code>errpos</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td> Zero-terminated array of unicode code points to process.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>errpos</code></em> :</span></p></td>
<td> Position of offending character is returned here.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>overrides</code></em> :</span></p></td>
<td> A <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table"><span class="type">Tld_table</span></a> array of additional domain restriction
structures that complement and supersede the built-in information.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Returns the <a class="link" href="libidn-tld.html#Tld-rc" title="enum Tld_rc"><span class="type">Tld_rc</span></a> value <a class="link" href="libidn-tld.html#TLD-SUCCESS--CAPS"><code class="literal">TLD_SUCCESS</code></a> if all code
points are valid or when <em class="parameter"><code>tld</code></em> is null, <a class="link" href="libidn-tld.html#TLD-INVALID--CAPS"><code class="literal">TLD_INVALID</code></a> if a
character is not allowed, or additional error codes on general
failure conditions.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="tld_check_8z ()">
<a name="tld-check-8z"></a><h3>tld_check_8z ()</h3>
<pre class="programlisting">int tld_check_8z (const char *in,
size_t *errpos,
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> **overrides);</pre>
<p>
Test each of the characters in <em class="parameter"><code>in</code></em> for whether or not they are
allowed by the information in <em class="parameter"><code>overrides</code></em> or by the built-in TLD
restriction data. When data for the same TLD is available both
internally and in <em class="parameter"><code>overrides</code></em>, the information in <em class="parameter"><code>overrides</code></em> takes
precedence. If several entries for a specific TLD are found, the
first one is used. If <em class="parameter"><code>overrides</code></em> is <code class="literal">NULL</code>, only the built-in
information is used. The position of the first offending character
is returned in <em class="parameter"><code>errpos</code></em>. Note that the error position refers to the
decoded character offset rather than the byte position in the
string.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td> Zero-terminated UTF8 string to process.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>errpos</code></em> :</span></p></td>
<td> Position of offending character is returned here.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>overrides</code></em> :</span></p></td>
<td> A <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table"><span class="type">Tld_table</span></a> array of additional domain restriction
structures that complement and supersede the built-in information.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Returns the <a class="link" href="libidn-tld.html#Tld-rc" title="enum Tld_rc"><span class="type">Tld_rc</span></a> value <a class="link" href="libidn-tld.html#TLD-SUCCESS--CAPS"><code class="literal">TLD_SUCCESS</code></a> if all
characters are valid or when <em class="parameter"><code>tld</code></em> is null, <a class="link" href="libidn-tld.html#TLD-INVALID--CAPS"><code class="literal">TLD_INVALID</code></a> if a
character is not allowed, or additional error codes on general
failure conditions.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="tld_check_lz ()">
<a name="tld-check-lz"></a><h3>tld_check_lz ()</h3>
<pre class="programlisting">int tld_check_lz (const char *in,
size_t *errpos,
const <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table">Tld_table</a> **overrides);</pre>
<p>
Test each of the characters in <em class="parameter"><code>in</code></em> for whether or not they are
allowed by the information in <em class="parameter"><code>overrides</code></em> or by the built-in TLD
restriction data. When data for the same TLD is available both
internally and in <em class="parameter"><code>overrides</code></em>, the information in <em class="parameter"><code>overrides</code></em> takes
precedence. If several entries for a specific TLD are found, the
first one is used. If <em class="parameter"><code>overrides</code></em> is <code class="literal">NULL</code>, only the built-in
information is used. The position of the first offending character
is returned in <em class="parameter"><code>errpos</code></em>. Note that the error position refers to the
decoded character offset rather than the byte position in the
string.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td> Zero-terminated string in the current locales encoding to process.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>errpos</code></em> :</span></p></td>
<td> Position of offending character is returned here.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>overrides</code></em> :</span></p></td>
<td> A <a class="link" href="libidn-tld.html#Tld-table" title="Tld_table"><span class="type">Tld_table</span></a> array of additional domain restriction
structures that complement and supersede the built-in information.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Returns the <a class="link" href="libidn-tld.html#Tld-rc" title="enum Tld_rc"><span class="type">Tld_rc</span></a> value <a class="link" href="libidn-tld.html#TLD-SUCCESS--CAPS"><code class="literal">TLD_SUCCESS</code></a> if all
characters are valid or when <em class="parameter"><code>tld</code></em> is null, <a class="link" href="libidn-tld.html#TLD-INVALID--CAPS"><code class="literal">TLD_INVALID</code></a> if a
character is not allowed, or additional error codes on general
failure conditions.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.11</div>
</body>
</html>
|