modernc.org/libc@v1.24.1/freebsd/table.cpp.c (about) 1 // +build ingore 2 3 // # @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94 4 // 5 // The compilation of software known as FreeBSD is distributed under the 6 // following terms: 7 // 8 // Copyright (c) 1992-2021 The FreeBSD Project. 9 // 10 // Redistribution and use in source and binary forms, with or without 11 // modification, are permitted provided that the following conditions 12 // are met: 13 // 1. Redistributions of source code must retain the above copyright 14 // notice, this list of conditions and the following disclaimer. 15 // 2. Redistributions in binary form must reproduce the above copyright 16 // notice, this list of conditions and the following disclaimer in the 17 // documentation and/or other materials provided with the distribution. 18 // 19 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 20 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 // ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 23 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 // SUCH DAMAGE. 30 // 31 // The 4.4BSD and 4.4BSD-Lite software is distributed under the following 32 // terms: 33 // 34 // All of the documentation and software included in the 4.4BSD and 4.4BSD-Lite 35 // Releases is copyrighted by The Regents of the University of California. 36 // 37 // Copyright 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 38 // The Regents of the University of California. All rights reserved. 39 // 40 // Redistribution and use in source and binary forms, with or without 41 // modification, are permitted provided that the following conditions 42 // are met: 43 // 1. Redistributions of source code must retain the above copyright 44 // notice, this list of conditions and the following disclaimer. 45 // 2. Redistributions in binary form must reproduce the above copyright 46 // notice, this list of conditions and the following disclaimer in the 47 // documentation and/or other materials provided with the distribution. 48 // 3. All advertising materials mentioning features or use of this software 49 // must display the following acknowledgement: 50 // This product includes software developed by the University of 51 // California, Berkeley and its contributors. 52 // 4. Neither the name of the University nor the names of its contributors 53 // may be used to endorse or promote products derived from this software 54 // without specific prior written permission. 55 // 56 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 57 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 58 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 59 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 60 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 61 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 62 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 63 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 64 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 65 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 66 // SUCH DAMAGE. 67 // 68 // The Institute of Electrical and Electronics Engineers and the American 69 // National Standards Committee X3, on Information Processing Systems have 70 // given us permission to reprint portions of their documentation. 71 // 72 // In the following statement, the phrase ``this text'' refers to portions 73 // of the system documentation. 74 // 75 // Portions of this text are reprinted and reproduced in electronic form in 76 // the second BSD Networking Software Release, from IEEE Std 1003.1-1988, IEEE 77 // Standard Portable Operating System Interface for Computer Environments 78 // (POSIX), copyright C 1988 by the Institute of Electrical and Electronics 79 // Engineers, Inc. In the event of any discrepancy between these versions 80 // and the original IEEE Standard, the original IEEE Standard is the referee 81 // document. 82 // 83 // In the following statement, the phrase ``This material'' refers to portions 84 // of the system documentation. 85 // 86 // This material is reproduced with permission from American National 87 // Standards Committee X3, on Information Processing Systems. Computer and 88 // Business Equipment Manufacturers Association (CBEMA), 311 First St., NW, 89 // Suite 500, Washington, DC 20001-2178. The developmental work of 90 // Programming Language C was completed by the X3J11 Technical Committee. 91 // 92 // The views and conclusions contained in the software and documentation are 93 // those of the authors and should not be interpreted as representing official 94 // policies, either expressed or implied, of the Regents of the University 95 // of California. 96 // 97 // 98 // NOTE: The copyright of UC Berkeley's Berkeley Software Distribution ("BSD") 99 // source has been updated. The copyright addendum may be found at 100 // ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change and is 101 // included below. 102 // 103 // July 22, 1999 104 // 105 // To All Licensees, Distributors of Any Version of BSD: 106 // 107 // As you know, certain of the Berkeley Software Distribution ("BSD") source 108 // code files require that further distributions of products containing all or 109 // portions of the software, acknowledge within their advertising materials 110 // that such products contain software developed by UC Berkeley and its 111 // contributors. 112 // 113 // Specifically, the provision reads: 114 // 115 // " * 3. All advertising materials mentioning features or use of this software 116 // * must display the following acknowledgement: 117 // * This product includes software developed by the University of 118 // * California, Berkeley and its contributors." 119 // 120 // Effective immediately, licensees and distributors are no longer required to 121 // include the acknowledgement within advertising materials. Accordingly, the 122 // foregoing paragraph of those BSD Unix files containing it is hereby deleted 123 // in its entirety. 124 // 125 // William Hoskins 126 // Director, Office of Technology Licensing 127 // University of California, Berkeley 128 129 // Preprocessed and manualy edited https://github.com/freebsd/freebsd-src/blob/main/lib/libc/locale/table.c 130 131 132 /// __asm__(".ident\t\"" 133 /// "$FreeBSD$" 134 /// "\""); 135 /// 136 /// typedef signed char __int8_t; 137 /// typedef unsigned char __uint8_t; 138 /// typedef short __int16_t; 139 /// typedef unsigned short __uint16_t; 140 /// typedef int __int32_t; 141 /// typedef unsigned int __uint32_t; 142 /// 143 /// typedef long __int64_t; 144 typedef unsigned long __uint64_t; 145 /// 146 /// typedef __int32_t __clock_t; 147 /// typedef __int64_t __critical_t; 148 /// 149 /// typedef double __double_t; 150 /// typedef float __float_t; 151 /// 152 /// typedef __int64_t __intfptr_t; 153 /// typedef __int64_t __intptr_t; 154 /// 155 /// typedef __int64_t __intmax_t; 156 /// typedef __int32_t __int_fast8_t; 157 /// typedef __int32_t __int_fast16_t; 158 /// typedef __int32_t __int_fast32_t; 159 /// typedef __int64_t __int_fast64_t; 160 /// typedef __int8_t __int_least8_t; 161 /// typedef __int16_t __int_least16_t; 162 /// typedef __int32_t __int_least32_t; 163 /// typedef __int64_t __int_least64_t; 164 /// 165 /// typedef __int64_t __ptrdiff_t; 166 /// typedef __int64_t __register_t; 167 /// typedef __int64_t __segsz_t; 168 typedef __uint64_t __size_t; 169 /// typedef __int64_t __ssize_t; 170 /// typedef __int64_t __time_t; 171 /// typedef __uint64_t __uintfptr_t; 172 /// typedef __uint64_t __uintptr_t; 173 /// 174 /// typedef __uint64_t __uintmax_t; 175 /// typedef __uint32_t __uint_fast8_t; 176 /// typedef __uint32_t __uint_fast16_t; 177 /// typedef __uint32_t __uint_fast32_t; 178 /// typedef __uint64_t __uint_fast64_t; 179 /// typedef __uint8_t __uint_least8_t; 180 /// typedef __uint16_t __uint_least16_t; 181 /// typedef __uint32_t __uint_least32_t; 182 /// typedef __uint64_t __uint_least64_t; 183 /// 184 /// typedef __uint64_t __u_register_t; 185 /// typedef __uint64_t __vm_offset_t; 186 /// typedef __uint64_t __vm_paddr_t; 187 /// typedef __uint64_t __vm_size_t; 188 /// 189 /// typedef int ___wchar_t; 190 /// 191 /// typedef __int32_t __blksize_t; 192 /// typedef __int64_t __blkcnt_t; 193 /// typedef __int32_t __clockid_t; 194 /// typedef __uint32_t __fflags_t; 195 /// typedef __uint64_t __fsblkcnt_t; 196 /// typedef __uint64_t __fsfilcnt_t; 197 /// typedef __uint32_t __gid_t; 198 /// typedef __int64_t __id_t; 199 /// typedef __uint64_t __ino_t; 200 /// typedef long __key_t; 201 /// typedef __int32_t __lwpid_t; 202 /// typedef __uint16_t __mode_t; 203 /// typedef int __accmode_t; 204 /// typedef int __nl_item; 205 /// typedef __uint64_t __nlink_t; 206 /// typedef __int64_t __off_t; 207 /// typedef __int64_t __off64_t; 208 /// typedef __int32_t __pid_t; 209 /// typedef __int64_t __rlim_t; 210 /// 211 /// 212 /// typedef __uint8_t __sa_family_t; 213 /// typedef __uint32_t __socklen_t; 214 /// typedef long __suseconds_t; 215 /// typedef struct __timer *__timer_t; 216 /// typedef struct __mq *__mqd_t; 217 /// typedef __uint32_t __uid_t; 218 /// typedef unsigned int __useconds_t; 219 /// typedef int __cpuwhich_t; 220 /// typedef int __cpulevel_t; 221 /// typedef int __cpusetid_t; 222 /// typedef __int64_t __daddr_t; 223 /// 224 typedef int __ct_rune_t; 225 typedef __ct_rune_t __rune_t; 226 /// typedef __ct_rune_t __wint_t; 227 /// 228 /// 229 /// 230 /// typedef __uint_least16_t __char16_t; 231 /// typedef __uint_least32_t __char32_t; 232 /// 233 /// 234 /// 235 /// 236 /// 237 /// 238 /// 239 /// typedef struct { 240 /// long long __max_align1 __attribute__((__aligned__(_Alignof(long long)))); 241 /// 242 /// long double __max_align2 __attribute__((__aligned__(_Alignof(long double)))); 243 /// 244 /// } __max_align_t; 245 /// 246 /// typedef __uint64_t __dev_t; 247 /// 248 /// typedef __uint32_t __fixpt_t; 249 /// 250 /// 251 /// 252 /// 253 /// 254 /// typedef union { 255 /// char __mbstate8[128]; 256 /// __int64_t _mbstateL; 257 /// } __mbstate_t; 258 /// 259 /// typedef __uintmax_t __rman_res_t; 260 /// 261 /// 262 /// 263 /// 264 /// 265 /// 266 /// typedef __builtin_va_list __va_list; 267 /// 268 /// 269 /// 270 /// 271 /// 272 /// 273 /// typedef __va_list __gnuc_va_list; 274 /// 275 /// 276 /// 277 /// 278 /// unsigned long ___runetype(__ct_rune_t) __attribute__((__pure__)); 279 /// __ct_rune_t ___tolower(__ct_rune_t) __attribute__((__pure__)); 280 /// __ct_rune_t ___toupper(__ct_rune_t) __attribute__((__pure__)); 281 /// 282 /// 283 /// extern int __mb_sb_limit; 284 285 typedef struct { 286 __rune_t __min; 287 __rune_t __max; 288 __rune_t __map; 289 unsigned long *__types; 290 } _RuneEntry; 291 292 typedef struct { 293 int __nranges; 294 _RuneEntry *__ranges; 295 } _RuneRange; 296 297 typedef struct { 298 char __magic[8]; 299 char __encoding[32]; 300 301 __rune_t (*__sgetrune)(const char *, __size_t, char const **); 302 int (*__sputrune)(__rune_t, char *, __size_t, char **); 303 __rune_t __invalid_rune; 304 305 unsigned long __runetype[(1 <<8 )]; 306 __rune_t __maplower[(1 <<8 )]; 307 __rune_t __mapupper[(1 <<8 )]; 308 309 310 311 312 313 314 _RuneRange __runetype_ext; 315 _RuneRange __maplower_ext; 316 _RuneRange __mapupper_ext; 317 318 void *__variable; 319 int __variable_len; 320 } _RuneLocale; 321 /// 322 /// extern const _RuneLocale _DefaultRuneLocale; 323 /// extern const _RuneLocale *_CurrentRuneLocale; 324 /// 325 /// 326 /// 327 /// extern _Thread_local const _RuneLocale *_ThreadRuneLocale; 328 /// static __inline const _RuneLocale *__getCurrentRuneLocale(void) 329 /// { 330 /// 331 /// if (_ThreadRuneLocale) 332 /// return _ThreadRuneLocale; 333 /// return _CurrentRuneLocale; 334 /// } 335 /// 336 /// 337 /// 338 /// 339 /// 340 /// static __inline int 341 /// __maskrune(__ct_rune_t _c, unsigned long _f) 342 /// { 343 /// return ((_c < 0 || _c >= (1 <<8 )) ? ___runetype(_c) : 344 /// (__getCurrentRuneLocale())->__runetype[_c]) & _f; 345 /// } 346 /// 347 /// static __inline int 348 /// __sbmaskrune(__ct_rune_t _c, unsigned long _f) 349 /// { 350 /// return (_c < 0 || _c >= __mb_sb_limit) ? 0 : 351 /// (__getCurrentRuneLocale())->__runetype[_c] & _f; 352 /// } 353 /// 354 /// static __inline int 355 /// __istype(__ct_rune_t _c, unsigned long _f) 356 /// { 357 /// return (!!__maskrune(_c, _f)); 358 /// } 359 /// 360 /// static __inline int 361 /// __sbistype(__ct_rune_t _c, unsigned long _f) 362 /// { 363 /// return (!!__sbmaskrune(_c, _f)); 364 /// } 365 /// 366 /// static __inline int 367 /// __isctype(__ct_rune_t _c, unsigned long _f) 368 /// { 369 /// return (_c < 0 || _c >= 128) ? 0 : 370 /// !!(_DefaultRuneLocale.__runetype[_c] & _f); 371 /// } 372 /// 373 /// static __inline __ct_rune_t 374 /// __toupper(__ct_rune_t _c) 375 /// { 376 /// return (_c < 0 || _c >= (1 <<8 )) ? ___toupper(_c) : 377 /// (__getCurrentRuneLocale())->__mapupper[_c]; 378 /// } 379 /// 380 /// static __inline __ct_rune_t 381 /// __sbtoupper(__ct_rune_t _c) 382 /// { 383 /// return (_c < 0 || _c >= __mb_sb_limit) ? _c : 384 /// (__getCurrentRuneLocale())->__mapupper[_c]; 385 /// } 386 /// 387 /// static __inline __ct_rune_t 388 /// __tolower(__ct_rune_t _c) 389 /// { 390 /// return (_c < 0 || _c >= (1 <<8 )) ? ___tolower(_c) : 391 /// (__getCurrentRuneLocale())->__maplower[_c]; 392 /// } 393 /// 394 /// static __inline __ct_rune_t 395 /// __sbtolower(__ct_rune_t _c) 396 /// { 397 /// return (_c < 0 || _c >= __mb_sb_limit) ? _c : 398 /// (__getCurrentRuneLocale())->__maplower[_c]; 399 /// } 400 /// 401 /// static __inline int 402 /// __wcwidth(__ct_rune_t _c) 403 /// { 404 /// unsigned int _x; 405 /// 406 /// if (_c == 0) 407 /// return (0); 408 /// _x = (unsigned int)__maskrune(_c, 0xe0000000L|0x00040000L); 409 /// if ((_x & 0xe0000000L) != 0) 410 /// return ((_x & 0xe0000000L) >> 30); 411 /// return ((_x & 0x00040000L) != 0 ? 1 : -1); 412 /// } 413 /// 414 /// 415 /// 416 /// int isalnum(int); 417 /// int isalpha(int); 418 /// int iscntrl(int); 419 /// int isdigit(int); 420 /// int isgraph(int); 421 /// int islower(int); 422 /// int isprint(int); 423 /// int ispunct(int); 424 /// int isspace(int); 425 /// int isupper(int); 426 /// int isxdigit(int); 427 /// int tolower(int); 428 /// int toupper(int); 429 /// 430 /// 431 /// int isascii(int); 432 /// int toascii(int); 433 /// 434 /// 435 /// 436 /// int isblank(int); 437 /// 438 /// 439 /// 440 /// int digittoint(int); 441 /// int ishexnumber(int); 442 /// int isideogram(int); 443 /// int isnumber(int); 444 /// int isphonogram(int); 445 /// int isrune(int); 446 /// int isspecial(int); 447 /// 448 /// 449 /// 450 /// 451 /// 452 /// typedef struct _xlocale *locale_t; 453 /// 454 /// 455 /// 456 /// 457 /// unsigned long ___runetype_l(__ct_rune_t, locale_t) __attribute__((__pure__)); 458 /// __ct_rune_t ___tolower_l(__ct_rune_t, locale_t) __attribute__((__pure__)); 459 /// __ct_rune_t ___toupper_l(__ct_rune_t, locale_t) __attribute__((__pure__)); 460 /// _RuneLocale *__runes_for_locale(locale_t, int*); 461 /// 462 /// inline int 463 /// __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); 464 /// inline int 465 /// __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); 466 /// 467 /// inline int 468 /// __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) 469 /// { 470 /// int __limit; 471 /// _RuneLocale *runes = __runes_for_locale(__loc, &__limit); 472 /// return (__c < 0 || __c >= __limit) ? 0 : 473 /// runes->__runetype[__c] & __f; 474 /// } 475 /// 476 /// inline int 477 /// __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) 478 /// { 479 /// return (!!__sbmaskrune_l(__c, __f, __loc)); 480 /// } 481 /// 482 /// 483 /// 484 /// 485 /// 486 /// 487 /// 488 /// inline int isalnum_l(int, locale_t); inline int isalnum_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000100L|0x00000400L|0x00400000L, __l); } 489 /// inline int isalpha_l(int, locale_t); inline int isalpha_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000100L, __l); } 490 /// inline int isblank_l(int, locale_t); inline int isblank_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00020000L, __l); } 491 /// inline int iscntrl_l(int, locale_t); inline int iscntrl_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000200L, __l); } 492 /// inline int isdigit_l(int, locale_t); inline int isdigit_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000400L, __l); } 493 /// inline int isgraph_l(int, locale_t); inline int isgraph_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000800L, __l); } 494 /// inline int ishexnumber_l(int, locale_t); inline int ishexnumber_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00010000L, __l); } 495 /// inline int isideogram_l(int, locale_t); inline int isideogram_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00080000L, __l); } 496 /// inline int islower_l(int, locale_t); inline int islower_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00001000L, __l); } 497 /// inline int isnumber_l(int, locale_t); inline int isnumber_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000400L|0x00400000L, __l); } 498 /// inline int isphonogram_l(int, locale_t); inline int isphonogram_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00200000L, __l); } 499 /// inline int isprint_l(int, locale_t); inline int isprint_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00040000L, __l); } 500 /// inline int ispunct_l(int, locale_t); inline int ispunct_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00002000L, __l); } 501 /// inline int isrune_l(int, locale_t); inline int isrune_l(int __c, locale_t __l) { return __sbistype_l(__c, 0xFFFFFF00L, __l); } 502 /// inline int isspace_l(int, locale_t); inline int isspace_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00004000L, __l); } 503 /// inline int isspecial_l(int, locale_t); inline int isspecial_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00100000L, __l); } 504 /// inline int isupper_l(int, locale_t); inline int isupper_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00008000L, __l); } 505 /// inline int isxdigit_l(int, locale_t); inline int isxdigit_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00010000L, __l); } 506 /// 507 /// inline int digittoint_l(int, locale_t); 508 /// inline int tolower_l(int, locale_t); 509 /// inline int toupper_l(int, locale_t); 510 /// 511 /// inline int digittoint_l(int __c, locale_t __l) 512 /// { return __sbmaskrune_l((__c), 0xFF, __l); } 513 /// 514 /// inline int tolower_l(int __c, locale_t __l) 515 /// { 516 /// int __limit; 517 /// _RuneLocale *__runes = __runes_for_locale(__l, &__limit); 518 /// return (__c < 0 || __c >= __limit) ? __c : 519 /// __runes->__maplower[__c]; 520 /// } 521 /// inline int toupper_l(int __c, locale_t __l) 522 /// { 523 /// int __limit; 524 /// _RuneLocale *__runes = __runes_for_locale(__l, &__limit); 525 /// return (__c < 0 || __c >= __limit) ? __c : 526 /// __runes->__mapupper[__c]; 527 /// } 528 /// 529 /// 530 /// 531 /// 532 /// 533 /// 534 /// 535 /// 536 /// 537 /// 538 /// 539 /// 540 /// 541 /// 542 /// 543 /// typedef __mbstate_t mbstate_t; 544 /// 545 /// 546 /// 547 /// 548 /// typedef __size_t size_t; 549 /// 550 /// 551 /// 552 /// 553 /// 554 /// typedef __va_list va_list; 555 /// 556 /// 557 /// 558 /// 559 /// 560 /// 561 /// typedef ___wchar_t wchar_t; 562 /// 563 /// 564 /// 565 /// 566 /// 567 /// typedef __wint_t wint_t; 568 /// 569 /// typedef struct __sFILE FILE; 570 /// 571 /// struct tm; 572 /// 573 /// 574 /// wint_t btowc(int); 575 /// wint_t fgetwc(FILE *); 576 /// wchar_t * 577 /// fgetws(wchar_t * restrict, int, FILE * restrict); 578 /// wint_t fputwc(wchar_t, FILE *); 579 /// int fputws(const wchar_t * restrict, FILE * restrict); 580 /// int fwide(FILE *, int); 581 /// int fwprintf(FILE * restrict, const wchar_t * restrict, ...); 582 /// int fwscanf(FILE * restrict, const wchar_t * restrict, ...); 583 /// wint_t getwc(FILE *); 584 /// wint_t getwchar(void); 585 /// size_t mbrlen(const char * restrict, size_t, mbstate_t * restrict); 586 /// size_t mbrtowc(wchar_t * restrict, const char * restrict, size_t, 587 /// mbstate_t * restrict); 588 /// int mbsinit(const mbstate_t *); 589 /// size_t mbsrtowcs(wchar_t * restrict, const char ** restrict, size_t, 590 /// mbstate_t * restrict); 591 /// wint_t putwc(wchar_t, FILE *); 592 /// wint_t putwchar(wchar_t); 593 /// int swprintf(wchar_t * restrict, size_t n, const wchar_t * restrict, 594 /// ...); 595 /// int swscanf(const wchar_t * restrict, const wchar_t * restrict, ...); 596 /// wint_t ungetwc(wint_t, FILE *); 597 /// int vfwprintf(FILE * restrict, const wchar_t * restrict, 598 /// __va_list); 599 /// int vswprintf(wchar_t * restrict, size_t n, const wchar_t * restrict, 600 /// __va_list); 601 /// int vwprintf(const wchar_t * restrict, __va_list); 602 /// size_t wcrtomb(char * restrict, wchar_t, mbstate_t * restrict); 603 /// wchar_t *wcscat(wchar_t * restrict, const wchar_t * restrict); 604 /// wchar_t *wcschr(const wchar_t *, wchar_t) __attribute__((__pure__)); 605 /// int wcscmp(const wchar_t *, const wchar_t *) __attribute__((__pure__)); 606 /// int wcscoll(const wchar_t *, const wchar_t *); 607 /// wchar_t *wcscpy(wchar_t * restrict, const wchar_t * restrict); 608 /// size_t wcscspn(const wchar_t *, const wchar_t *) __attribute__((__pure__)); 609 /// size_t wcsftime(wchar_t * restrict, size_t, const wchar_t * restrict, 610 /// const struct tm * restrict); 611 /// size_t wcslen(const wchar_t *) __attribute__((__pure__)); 612 /// wchar_t *wcsncat(wchar_t * restrict, const wchar_t * restrict, 613 /// size_t); 614 /// int wcsncmp(const wchar_t *, const wchar_t *, size_t) __attribute__((__pure__)); 615 /// wchar_t *wcsncpy(wchar_t * restrict , const wchar_t * restrict, size_t); 616 /// wchar_t *wcspbrk(const wchar_t *, const wchar_t *) __attribute__((__pure__)); 617 /// wchar_t *wcsrchr(const wchar_t *, wchar_t) __attribute__((__pure__)); 618 /// size_t wcsrtombs(char * restrict, const wchar_t ** restrict, size_t, 619 /// mbstate_t * restrict); 620 /// size_t wcsspn(const wchar_t *, const wchar_t *) __attribute__((__pure__)); 621 /// wchar_t *wcsstr(const wchar_t * restrict, const wchar_t * restrict) 622 /// __attribute__((__pure__)); 623 /// size_t wcsxfrm(wchar_t * restrict, const wchar_t * restrict, size_t); 624 /// int wctob(wint_t); 625 /// double wcstod(const wchar_t * restrict, wchar_t ** restrict); 626 /// wchar_t *wcstok(wchar_t * restrict, const wchar_t * restrict, 627 /// wchar_t ** restrict); 628 /// long wcstol(const wchar_t * restrict, wchar_t ** restrict, int); 629 /// unsigned long 630 /// wcstoul(const wchar_t * restrict, wchar_t ** restrict, int); 631 /// wchar_t *wmemchr(const wchar_t *, wchar_t, size_t) __attribute__((__pure__)); 632 /// int wmemcmp(const wchar_t *, const wchar_t *, size_t) __attribute__((__pure__)); 633 /// wchar_t *wmemcpy(wchar_t * restrict, const wchar_t * restrict, size_t); 634 /// wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); 635 /// wchar_t *wmemset(wchar_t *, wchar_t, size_t); 636 /// int wprintf(const wchar_t * restrict, ...); 637 /// int wscanf(const wchar_t * restrict, ...); 638 /// 639 /// 640 /// extern FILE *__stdinp; 641 /// extern FILE *__stdoutp; 642 /// extern FILE *__stderrp; 643 /// 644 /// int vfwscanf(FILE * restrict, const wchar_t * restrict, 645 /// __va_list); 646 /// int vswscanf(const wchar_t * restrict, const wchar_t * restrict, 647 /// __va_list); 648 /// int vwscanf(const wchar_t * restrict, __va_list); 649 /// float wcstof(const wchar_t * restrict, wchar_t ** restrict); 650 /// long double 651 /// wcstold(const wchar_t * restrict, wchar_t ** restrict); 652 /// 653 /// 654 /// long long 655 /// wcstoll(const wchar_t * restrict, wchar_t ** restrict, int); 656 /// 657 /// unsigned long long 658 /// wcstoull(const wchar_t * restrict, wchar_t ** restrict, int); 659 /// 660 /// 661 /// 662 /// 663 /// int wcswidth(const wchar_t *, size_t); 664 /// int wcwidth(wchar_t); 665 /// 666 /// 667 /// 668 /// 669 /// size_t mbsnrtowcs(wchar_t * restrict, const char ** restrict, size_t, 670 /// size_t, mbstate_t * restrict); 671 /// FILE *open_wmemstream(wchar_t **, size_t *); 672 /// wchar_t *wcpcpy(wchar_t * restrict, const wchar_t * restrict); 673 /// wchar_t *wcpncpy(wchar_t * restrict, const wchar_t * restrict, size_t); 674 /// wchar_t *wcsdup(const wchar_t *) __attribute__((__malloc__)); 675 /// int wcscasecmp(const wchar_t *, const wchar_t *); 676 /// int wcsncasecmp(const wchar_t *, const wchar_t *, size_t n); 677 /// size_t wcsnlen(const wchar_t *, size_t) __attribute__((__pure__)); 678 /// size_t wcsnrtombs(char * restrict, const wchar_t ** restrict, size_t, 679 /// size_t, mbstate_t * restrict); 680 /// 681 /// 682 /// 683 /// wchar_t *fgetwln(FILE * restrict, size_t * restrict); 684 /// size_t wcslcat(wchar_t *, const wchar_t *, size_t); 685 /// size_t wcslcpy(wchar_t *, const wchar_t *, size_t); 686 /// 687 /// 688 /// 689 /// 690 /// 691 /// int wcscasecmp_l(const wchar_t *, const wchar_t *, 692 /// locale_t); 693 /// int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, 694 /// locale_t); 695 /// int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); 696 /// size_t wcsxfrm_l(wchar_t * restrict, 697 /// const wchar_t * restrict, size_t, locale_t); 698 /// 699 /// 700 /// 701 /// 702 /// 703 /// 704 /// 705 /// 706 /// 707 /// 708 /// 709 /// 710 /// struct lconv { 711 /// char *decimal_point; 712 /// char *thousands_sep; 713 /// char *grouping; 714 /// char *int_curr_symbol; 715 /// char *currency_symbol; 716 /// char *mon_decimal_point; 717 /// char *mon_thousands_sep; 718 /// char *mon_grouping; 719 /// char *positive_sign; 720 /// char *negative_sign; 721 /// char int_frac_digits; 722 /// char frac_digits; 723 /// char p_cs_precedes; 724 /// char p_sep_by_space; 725 /// char n_cs_precedes; 726 /// char n_sep_by_space; 727 /// char p_sign_posn; 728 /// char n_sign_posn; 729 /// char int_p_cs_precedes; 730 /// char int_n_cs_precedes; 731 /// char int_p_sep_by_space; 732 /// char int_n_sep_by_space; 733 /// char int_p_sign_posn; 734 /// char int_n_sign_posn; 735 /// }; 736 /// 737 /// 738 /// struct lconv *localeconv(void); 739 /// char *setlocale(int, const char *); 740 /// 741 /// 742 /// 743 /// 744 /// locale_t duplocale(locale_t base); 745 /// void freelocale(locale_t loc); 746 /// locale_t newlocale(int mask, const char *locale, locale_t base); 747 /// const char *querylocale(int mask, locale_t loc); 748 /// locale_t uselocale(locale_t loc); 749 /// 750 /// 751 /// 752 /// 753 /// 754 /// 755 /// 756 /// 757 /// 758 /// 759 /// 760 /// wint_t btowc_l(int, locale_t); 761 /// wint_t fgetwc_l(FILE *, locale_t); 762 /// wchar_t *fgetws_l(wchar_t * restrict, int, FILE * restrict, 763 /// locale_t); 764 /// wint_t fputwc_l(wchar_t, FILE *, locale_t); 765 /// int fputws_l(const wchar_t * restrict, FILE * restrict, 766 /// locale_t); 767 /// int fwprintf_l(FILE * restrict, locale_t, 768 /// const wchar_t * restrict, ...); 769 /// int fwscanf_l(FILE * restrict, locale_t, 770 /// const wchar_t * restrict, ...); 771 /// wint_t getwc_l(FILE *, locale_t); 772 /// wint_t getwchar_l(locale_t); 773 /// size_t mbrlen_l(const char * restrict, size_t, 774 /// mbstate_t * restrict, locale_t); 775 /// size_t mbrtowc_l(wchar_t * restrict, 776 /// const char * restrict, size_t, 777 /// mbstate_t * restrict, locale_t); 778 /// int mbsinit_l(const mbstate_t *, locale_t); 779 /// size_t mbsrtowcs_l(wchar_t * restrict, 780 /// const char ** restrict, size_t, 781 /// mbstate_t * restrict, locale_t); 782 /// wint_t putwc_l(wchar_t, FILE *, locale_t); 783 /// wint_t putwchar_l(wchar_t, locale_t); 784 /// int swprintf_l(wchar_t * restrict, size_t n, locale_t, 785 /// const wchar_t * restrict, ...); 786 /// int swscanf_l(const wchar_t * restrict, locale_t, 787 /// const wchar_t * restrict, ...); 788 /// wint_t ungetwc_l(wint_t, FILE *, locale_t); 789 /// int vfwprintf_l(FILE * restrict, locale_t, 790 /// const wchar_t * restrict, __va_list); 791 /// int vswprintf_l(wchar_t * restrict, size_t n, locale_t, 792 /// const wchar_t * restrict, __va_list); 793 /// int vwprintf_l(locale_t, const wchar_t * restrict, 794 /// __va_list); 795 /// size_t wcrtomb_l(char * restrict, wchar_t, 796 /// mbstate_t * restrict, locale_t); 797 /// size_t wcsftime_l(wchar_t * restrict, size_t, 798 /// const wchar_t * restrict, 799 /// const struct tm * restrict, locale_t); 800 /// size_t wcsrtombs_l(char * restrict, 801 /// const wchar_t ** restrict, size_t, 802 /// mbstate_t * restrict, locale_t); 803 /// double wcstod_l(const wchar_t * restrict, 804 /// wchar_t ** restrict, locale_t); 805 /// long wcstol_l(const wchar_t * restrict, 806 /// wchar_t ** restrict, int, locale_t); 807 /// unsigned long wcstoul_l(const wchar_t * restrict, 808 /// wchar_t ** restrict, int, locale_t); 809 /// int wcswidth_l(const wchar_t *, size_t, locale_t); 810 /// int wctob_l(wint_t, locale_t); 811 /// int wcwidth_l(wchar_t, locale_t); 812 /// int wprintf_l(locale_t, const wchar_t * restrict, ...); 813 /// int wscanf_l(locale_t, const wchar_t * restrict, ...); 814 /// int vfwscanf_l(FILE * restrict, locale_t, 815 /// const wchar_t * restrict, __va_list); 816 /// int vswscanf_l(const wchar_t * restrict, locale_t, 817 /// const wchar_t *restrict, __va_list); 818 /// int vwscanf_l(locale_t, const wchar_t * restrict, 819 /// __va_list); 820 /// float wcstof_l(const wchar_t * restrict, 821 /// wchar_t ** restrict, locale_t); 822 /// long double wcstold_l(const wchar_t * restrict, 823 /// wchar_t ** restrict, locale_t); 824 /// long long wcstoll_l(const wchar_t * restrict, 825 /// wchar_t ** restrict, int, locale_t); 826 /// unsigned long long wcstoull_l(const wchar_t * restrict, 827 /// wchar_t ** restrict, int, locale_t); 828 /// size_t mbsnrtowcs_l(wchar_t * restrict, 829 /// const char ** restrict, size_t, size_t, 830 /// mbstate_t * restrict, locale_t); 831 /// size_t wcsnrtombs_l(char * restrict, 832 /// const wchar_t ** restrict, size_t, size_t, 833 /// mbstate_t * restrict, locale_t); 834 /// 835 /// 836 /// 837 /// 838 /// 839 /// struct lconv *localeconv_l(locale_t); 840 /// 841 /// 842 /// 843 /// 844 /// 845 /// 846 /// 847 /// 848 /// 849 /// typedef __rune_t rune_t; 850 /// 851 /// typedef struct { 852 /// int quot; 853 /// int rem; 854 /// } div_t; 855 /// 856 /// typedef struct { 857 /// long quot; 858 /// long rem; 859 /// } ldiv_t; 860 /// 861 /// 862 /// 863 /// 864 /// 865 /// double atof_l(const char *, locale_t); 866 /// int atoi_l(const char *, locale_t); 867 /// long atol_l(const char *, locale_t); 868 /// long long atoll_l(const char *, locale_t); 869 /// int mblen_l(const char *, size_t, locale_t); 870 /// size_t mbstowcs_l(wchar_t * restrict, 871 /// const char * restrict, size_t, locale_t); 872 /// int mbtowc_l(wchar_t * restrict, 873 /// const char * restrict, size_t, locale_t); 874 /// double strtod_l(const char *, char **, locale_t); 875 /// float strtof_l(const char *, char **, locale_t); 876 /// long strtol_l(const char *, char **, int, locale_t); 877 /// long double strtold_l(const char *, char **, locale_t); 878 /// long long strtoll_l(const char *, char **, int, locale_t); 879 /// unsigned long strtoul_l(const char *, char **, int, locale_t); 880 /// unsigned long long strtoull_l(const char *, char **, int, locale_t); 881 /// size_t wcstombs_l(char * restrict, 882 /// const wchar_t * restrict, size_t, locale_t); 883 /// int wctomb_l(char *, wchar_t, locale_t); 884 /// 885 /// int ___mb_cur_max_l(locale_t); 886 /// 887 /// 888 /// extern int __mb_cur_max; 889 /// extern int ___mb_cur_max(void); 890 /// 891 /// 892 /// _Noreturn void abort(void); 893 /// int abs(int) __attribute__((__const__)); 894 /// int atexit(void (* )(void)); 895 /// double atof(const char *); 896 /// int atoi(const char *); 897 /// long atol(const char *); 898 /// void *bsearch(const void *, const void *, size_t, 899 /// size_t, int (*)(const void * , const void *)); 900 /// void *calloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) 901 /// __attribute__((__alloc_size__(1, 2))); 902 /// div_t div(int, int) __attribute__((__const__)); 903 /// _Noreturn void exit(int); 904 /// void free(void *); 905 /// char *getenv(const char *); 906 /// long labs(long) __attribute__((__const__)); 907 /// ldiv_t ldiv(long, long) __attribute__((__const__)); 908 /// void *malloc(size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(1))); 909 /// int mblen(const char *, size_t); 910 /// size_t mbstowcs(wchar_t * restrict , const char * restrict, size_t); 911 /// int mbtowc(wchar_t * restrict, const char * restrict, size_t); 912 /// void qsort(void *, size_t, size_t, 913 /// int (* )(const void *, const void *)); 914 /// int rand(void); 915 /// void *realloc(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2))); 916 /// void srand(unsigned); 917 /// double strtod(const char * restrict, char ** restrict); 918 /// float strtof(const char * restrict, char ** restrict); 919 /// long strtol(const char * restrict, char ** restrict, int); 920 /// long double 921 /// strtold(const char * restrict, char ** restrict); 922 /// unsigned long 923 /// strtoul(const char * restrict, char ** restrict, int); 924 /// int system(const char *); 925 /// int wctomb(char *, wchar_t); 926 /// size_t wcstombs(char * restrict, const wchar_t * restrict, size_t); 927 /// 928 /// typedef struct { 929 /// long long quot; 930 /// long long rem; 931 /// } lldiv_t; 932 /// 933 /// 934 /// long long 935 /// atoll(const char *); 936 /// 937 /// long long 938 /// llabs(long long) __attribute__((__const__)); 939 /// 940 /// lldiv_t lldiv(long long, long long) __attribute__((__const__)); 941 /// 942 /// long long 943 /// strtoll(const char * restrict, char ** restrict, int); 944 /// 945 /// unsigned long long 946 /// strtoull(const char * restrict, char ** restrict, int); 947 /// 948 /// 949 /// _Noreturn void _Exit(int); 950 /// 951 /// 952 /// 953 /// 954 /// 955 /// 956 /// void * aligned_alloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__alloc_align__(1))) 957 /// __attribute__((__alloc_size__(2))); 958 /// int at_quick_exit(void (*)(void)); 959 /// _Noreturn void 960 /// quick_exit(int); 961 /// 962 /// 963 /// 964 /// 965 /// 966 /// char *realpath(const char * restrict, char * restrict); 967 /// 968 /// 969 /// int rand_r(unsigned *); 970 /// 971 /// 972 /// int posix_memalign(void **, size_t, size_t); 973 /// int setenv(const char *, const char *, int); 974 /// int unsetenv(const char *); 975 /// 976 /// 977 /// 978 /// int getsubopt(char **, char *const *, char **); 979 /// 980 /// char *mkdtemp(char *); 981 /// 982 /// 983 /// 984 /// int mkstemp(char *); 985 /// 986 /// long a64l(const char *); 987 /// double drand48(void); 988 /// 989 /// double erand48(unsigned short[3]); 990 /// 991 /// 992 /// char *initstate(unsigned int, char *, size_t); 993 /// long jrand48(unsigned short[3]); 994 /// char *l64a(long); 995 /// void lcong48(unsigned short[7]); 996 /// long lrand48(void); 997 /// 998 /// char *mktemp(char *); 999 /// 1000 /// 1001 /// long mrand48(void); 1002 /// long nrand48(unsigned short[3]); 1003 /// int putenv(char *); 1004 /// long random(void); 1005 /// unsigned short 1006 /// *seed48(unsigned short[3]); 1007 /// char *setstate( char *); 1008 /// void srand48(long); 1009 /// void srandom(unsigned int); 1010 /// 1011 /// 1012 /// 1013 /// int grantpt(int); 1014 /// int posix_openpt(int); 1015 /// char *ptsname(int); 1016 /// int unlockpt(int); 1017 /// 1018 /// 1019 /// 1020 /// int ptsname_r(int, char *, size_t); 1021 /// 1022 /// 1023 /// 1024 /// extern const char *malloc_conf; 1025 /// extern void (*malloc_message)(void *, const char *); 1026 /// 1027 /// void abort2(const char *, int, void **) __attribute__((__noreturn__)); 1028 /// __uint32_t 1029 /// arc4random(void); 1030 /// void arc4random_buf(void *, size_t); 1031 /// __uint32_t 1032 /// arc4random_uniform(__uint32_t); 1033 /// 1034 /// 1035 /// 1036 /// 1037 /// 1038 /// 1039 /// char *getbsize(int *, long *); 1040 /// 1041 /// char *cgetcap(char *, const char *, int); 1042 /// int cgetclose(void); 1043 /// int cgetent(char **, char **, const char *); 1044 /// int cgetfirst(char **, char **); 1045 /// int cgetmatch(const char *, const char *); 1046 /// int cgetnext(char **, char **); 1047 /// int cgetnum(char *, const char *, long *); 1048 /// int cgetset(const char *); 1049 /// int cgetstr(char *, const char *, char **); 1050 /// int cgetustr(char *, const char *, char **); 1051 /// 1052 /// int daemon(int, int); 1053 /// int daemonfd(int, int); 1054 /// char *devname(__dev_t, __mode_t); 1055 /// char *devname_r(__dev_t, __mode_t, char *, int); 1056 /// char *fdevname(int); 1057 /// char *fdevname_r(int, char *, int); 1058 /// int getloadavg(double [], int); 1059 /// const char * 1060 /// getprogname(void); 1061 /// 1062 /// int heapsort(void *, size_t, size_t, 1063 /// int (* )(const void *, const void *)); 1064 /// 1065 /// 1066 /// 1067 /// 1068 /// 1069 /// 1070 /// int l64a_r(long, char *, int); 1071 /// int mergesort(void *, size_t, size_t, int (*)(const void *, const void *)); 1072 /// 1073 /// 1074 /// 1075 /// int mkostemp(char *, int); 1076 /// int mkostemps(char *, int, int); 1077 /// int mkostempsat(int, char *, int, int); 1078 /// void qsort_r(void *, size_t, size_t, void *, 1079 /// int (*)(void *, const void *, const void *)); 1080 /// int radixsort(const unsigned char **, int, const unsigned char *, 1081 /// unsigned); 1082 /// void *reallocarray(void *, size_t, size_t) __attribute__((__warn_unused_result__)) 1083 /// __attribute__((__alloc_size__(2, 3))); 1084 /// void *reallocf(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2))); 1085 /// int rpmatch(const char *); 1086 /// void setprogname(const char *); 1087 /// int sradixsort(const unsigned char **, int, const unsigned char *, 1088 /// unsigned); 1089 /// void srandomdev(void); 1090 /// long long 1091 /// strtonum(const char *, long long, long long, const char **); 1092 /// 1093 /// 1094 /// __int64_t 1095 /// strtoq(const char *, char **, int); 1096 /// __uint64_t 1097 /// strtouq(const char *, char **, int); 1098 /// 1099 /// extern char *suboptarg; 1100 /// 1101 /// 1102 /// 1103 /// 1104 /// 1105 /// 1106 /// typedef size_t rsize_t; 1107 /// 1108 /// 1109 /// 1110 /// 1111 /// typedef int errno_t; 1112 /// 1113 /// 1114 /// 1115 /// typedef void (*constraint_handler_t)(const char * restrict, 1116 /// void * restrict, errno_t); 1117 /// 1118 /// constraint_handler_t set_constraint_handler_s(constraint_handler_t handler); 1119 /// 1120 /// _Noreturn void abort_handler_s(const char * restrict, void * restrict, 1121 /// errno_t); 1122 /// 1123 /// void ignore_handler_s(const char * restrict, void * restrict, errno_t); 1124 /// 1125 /// errno_t qsort_s(void *, rsize_t, rsize_t, 1126 /// int (*)(const void *, const void *, void *), void *); 1127 /// 1128 /// 1129 /// 1130 /// 1131 /// 1132 /// 1133 /// 1134 /// 1135 /// 1136 /// 1137 /// 1138 /// 1139 /// 1140 /// 1141 /// 1142 /// 1143 /// 1144 /// 1145 /// 1146 /// 1147 /// 1148 /// 1149 /// 1150 /// typedef __int8_t int8_t; 1151 /// 1152 /// 1153 /// 1154 /// 1155 /// typedef __int16_t int16_t; 1156 /// 1157 /// 1158 /// 1159 /// 1160 /// typedef __int32_t int32_t; 1161 /// 1162 /// 1163 /// 1164 /// 1165 /// typedef __int64_t int64_t; 1166 /// 1167 /// 1168 /// 1169 /// 1170 /// typedef __uint8_t uint8_t; 1171 /// 1172 /// 1173 /// 1174 /// 1175 /// typedef __uint16_t uint16_t; 1176 /// 1177 /// 1178 /// 1179 /// 1180 /// typedef __uint32_t uint32_t; 1181 /// 1182 /// 1183 /// 1184 /// 1185 /// typedef __uint64_t uint64_t; 1186 /// 1187 /// 1188 /// 1189 /// 1190 /// typedef __intptr_t intptr_t; 1191 /// 1192 /// 1193 /// 1194 /// typedef __uintptr_t uintptr_t; 1195 /// 1196 /// 1197 /// 1198 /// typedef __intmax_t intmax_t; 1199 /// 1200 /// 1201 /// 1202 /// typedef __uintmax_t uintmax_t; 1203 /// 1204 /// 1205 /// typedef __int_least8_t int_least8_t; 1206 /// typedef __int_least16_t int_least16_t; 1207 /// typedef __int_least32_t int_least32_t; 1208 /// typedef __int_least64_t int_least64_t; 1209 /// 1210 /// typedef __uint_least8_t uint_least8_t; 1211 /// typedef __uint_least16_t uint_least16_t; 1212 /// typedef __uint_least32_t uint_least32_t; 1213 /// typedef __uint_least64_t uint_least64_t; 1214 /// 1215 /// typedef __int_fast8_t int_fast8_t; 1216 /// typedef __int_fast16_t int_fast16_t; 1217 /// typedef __int_fast32_t int_fast32_t; 1218 /// typedef __int_fast64_t int_fast64_t; 1219 /// 1220 /// typedef __uint_fast8_t uint_fast8_t; 1221 /// typedef __uint_fast16_t uint_fast16_t; 1222 /// typedef __uint_fast32_t uint_fast32_t; 1223 /// typedef __uint_fast64_t uint_fast64_t; 1224 /// 1225 /// 1226 /// 1227 /// 1228 /// 1229 /// 1230 /// 1231 /// 1232 /// 1233 /// 1234 /// 1235 /// 1236 /// 1237 /// 1238 /// 1239 /// 1240 /// 1241 /// struct pthread; 1242 /// struct pthread_attr; 1243 /// struct pthread_cond; 1244 /// struct pthread_cond_attr; 1245 /// struct pthread_mutex; 1246 /// struct pthread_mutex_attr; 1247 /// struct pthread_once; 1248 /// struct pthread_rwlock; 1249 /// struct pthread_rwlockattr; 1250 /// struct pthread_barrier; 1251 /// struct pthread_barrier_attr; 1252 /// struct pthread_spinlock; 1253 /// 1254 /// typedef struct pthread *pthread_t; 1255 /// 1256 /// 1257 /// typedef struct pthread_attr *pthread_attr_t; 1258 /// typedef struct pthread_mutex *pthread_mutex_t; 1259 /// typedef struct pthread_mutex_attr *pthread_mutexattr_t; 1260 /// typedef struct pthread_cond *pthread_cond_t; 1261 /// typedef struct pthread_cond_attr *pthread_condattr_t; 1262 /// typedef int pthread_key_t; 1263 /// typedef struct pthread_once pthread_once_t; 1264 /// typedef struct pthread_rwlock *pthread_rwlock_t; 1265 /// typedef struct pthread_rwlockattr *pthread_rwlockattr_t; 1266 /// typedef struct pthread_barrier *pthread_barrier_t; 1267 /// typedef struct pthread_barrierattr *pthread_barrierattr_t; 1268 /// typedef struct pthread_spinlock *pthread_spinlock_t; 1269 /// 1270 /// 1271 /// 1272 /// 1273 /// 1274 /// 1275 /// 1276 /// typedef void *pthread_addr_t; 1277 /// typedef void *(*pthread_startroutine_t)(void *); 1278 /// 1279 /// 1280 /// 1281 /// 1282 /// struct pthread_once { 1283 /// int state; 1284 /// pthread_mutex_t mutex; 1285 /// }; 1286 /// 1287 /// 1288 /// 1289 /// typedef unsigned char u_char; 1290 /// typedef unsigned short u_short; 1291 /// typedef unsigned int u_int; 1292 /// typedef unsigned long u_long; 1293 /// 1294 /// typedef unsigned short ushort; 1295 /// typedef unsigned int uint; 1296 /// 1297 /// typedef __uint8_t u_int8_t; 1298 /// typedef __uint16_t u_int16_t; 1299 /// typedef __uint32_t u_int32_t; 1300 /// typedef __uint64_t u_int64_t; 1301 /// 1302 /// typedef __uint64_t u_quad_t; 1303 /// typedef __int64_t quad_t; 1304 /// typedef quad_t * qaddr_t; 1305 /// 1306 /// typedef char * caddr_t; 1307 /// typedef const char * c_caddr_t; 1308 /// 1309 /// 1310 /// typedef __blksize_t blksize_t; 1311 /// 1312 /// 1313 /// 1314 /// typedef __cpuwhich_t cpuwhich_t; 1315 /// typedef __cpulevel_t cpulevel_t; 1316 /// typedef __cpusetid_t cpusetid_t; 1317 /// 1318 /// 1319 /// typedef __blkcnt_t blkcnt_t; 1320 /// 1321 /// 1322 /// 1323 /// 1324 /// typedef __clock_t clock_t; 1325 /// 1326 /// 1327 /// 1328 /// 1329 /// typedef __clockid_t clockid_t; 1330 /// 1331 /// 1332 /// 1333 /// typedef __critical_t critical_t; 1334 /// typedef __daddr_t daddr_t; 1335 /// 1336 /// 1337 /// typedef __dev_t dev_t; 1338 /// 1339 /// 1340 /// 1341 /// 1342 /// typedef __fflags_t fflags_t; 1343 /// 1344 /// 1345 /// 1346 /// typedef __fixpt_t fixpt_t; 1347 /// 1348 /// 1349 /// typedef __fsblkcnt_t fsblkcnt_t; 1350 /// typedef __fsfilcnt_t fsfilcnt_t; 1351 /// 1352 /// 1353 /// 1354 /// 1355 /// typedef __gid_t gid_t; 1356 /// 1357 /// 1358 /// 1359 /// 1360 /// typedef __uint32_t in_addr_t; 1361 /// 1362 /// 1363 /// 1364 /// 1365 /// typedef __uint16_t in_port_t; 1366 /// 1367 /// 1368 /// 1369 /// 1370 /// typedef __id_t id_t; 1371 /// 1372 /// 1373 /// 1374 /// 1375 /// typedef __ino_t ino_t; 1376 /// 1377 /// 1378 /// 1379 /// 1380 /// typedef __key_t key_t; 1381 /// 1382 /// 1383 /// 1384 /// 1385 /// typedef __lwpid_t lwpid_t; 1386 /// 1387 /// 1388 /// 1389 /// 1390 /// typedef __mode_t mode_t; 1391 /// 1392 /// 1393 /// 1394 /// 1395 /// typedef __accmode_t accmode_t; 1396 /// 1397 /// 1398 /// 1399 /// 1400 /// typedef __nlink_t nlink_t; 1401 /// 1402 /// 1403 /// 1404 /// 1405 /// typedef __off_t off_t; 1406 /// 1407 /// 1408 /// 1409 /// 1410 /// typedef __off64_t off64_t; 1411 /// 1412 /// 1413 /// 1414 /// 1415 /// typedef __pid_t pid_t; 1416 /// 1417 /// 1418 /// 1419 /// typedef __register_t register_t; 1420 /// 1421 /// 1422 /// typedef __rlim_t rlim_t; 1423 /// 1424 /// 1425 /// 1426 /// typedef __int64_t sbintime_t; 1427 /// 1428 /// typedef __segsz_t segsz_t; 1429 /// 1430 /// 1431 /// 1432 /// 1433 /// 1434 /// 1435 /// 1436 /// typedef __ssize_t ssize_t; 1437 /// 1438 /// 1439 /// 1440 /// 1441 /// typedef __suseconds_t suseconds_t; 1442 /// 1443 /// 1444 /// 1445 /// 1446 /// typedef __time_t time_t; 1447 /// 1448 /// 1449 /// 1450 /// 1451 /// typedef __timer_t timer_t; 1452 /// 1453 /// 1454 /// 1455 /// 1456 /// typedef __mqd_t mqd_t; 1457 /// 1458 /// 1459 /// 1460 /// typedef __u_register_t u_register_t; 1461 /// 1462 /// 1463 /// typedef __uid_t uid_t; 1464 /// 1465 /// 1466 /// 1467 /// 1468 /// typedef __useconds_t useconds_t; 1469 /// 1470 /// 1471 /// 1472 /// 1473 /// 1474 /// typedef unsigned long cap_ioctl_t; 1475 /// 1476 /// 1477 /// 1478 /// 1479 /// struct cap_rights; 1480 /// 1481 /// typedef struct cap_rights cap_rights_t; 1482 /// 1483 /// typedef __uint64_t kpaddr_t; 1484 /// typedef __uint64_t kvaddr_t; 1485 /// typedef __uint64_t ksize_t; 1486 /// typedef __int64_t kssize_t; 1487 /// 1488 /// typedef __vm_offset_t vm_offset_t; 1489 /// typedef __uint64_t vm_ooffset_t; 1490 /// typedef __vm_paddr_t vm_paddr_t; 1491 /// typedef __uint64_t vm_pindex_t; 1492 /// typedef __vm_size_t vm_size_t; 1493 /// 1494 /// typedef __rman_res_t rman_res_t; 1495 /// 1496 /// static __inline __uint16_t 1497 /// __bitcount16(__uint16_t _x) 1498 /// { 1499 /// 1500 /// _x = (_x & 0x5555) + ((_x & 0xaaaa) >> 1); 1501 /// _x = (_x & 0x3333) + ((_x & 0xcccc) >> 2); 1502 /// _x = (_x + (_x >> 4)) & 0x0f0f; 1503 /// _x = (_x + (_x >> 8)) & 0x00ff; 1504 /// return (_x); 1505 /// } 1506 /// 1507 /// static __inline __uint32_t 1508 /// __bitcount32(__uint32_t _x) 1509 /// { 1510 /// 1511 /// _x = (_x & 0x55555555) + ((_x & 0xaaaaaaaa) >> 1); 1512 /// _x = (_x & 0x33333333) + ((_x & 0xcccccccc) >> 2); 1513 /// _x = (_x + (_x >> 4)) & 0x0f0f0f0f; 1514 /// _x = (_x + (_x >> 8)); 1515 /// _x = (_x + (_x >> 16)) & 0x000000ff; 1516 /// return (_x); 1517 /// } 1518 /// 1519 /// 1520 /// static __inline __uint64_t 1521 /// __bitcount64(__uint64_t _x) 1522 /// { 1523 /// 1524 /// _x = (_x & 0x5555555555555555) + ((_x & 0xaaaaaaaaaaaaaaaa) >> 1); 1525 /// _x = (_x & 0x3333333333333333) + ((_x & 0xcccccccccccccccc) >> 2); 1526 /// _x = (_x + (_x >> 4)) & 0x0f0f0f0f0f0f0f0f; 1527 /// _x = (_x + (_x >> 8)); 1528 /// _x = (_x + (_x >> 16)); 1529 /// _x = (_x + (_x >> 32)) & 0x000000ff; 1530 /// return (_x); 1531 /// } 1532 /// 1533 /// 1534 /// 1535 /// 1536 /// 1537 /// typedef struct __sigset { 1538 /// __uint32_t __bits[4]; 1539 /// } __sigset_t; 1540 /// 1541 /// 1542 /// 1543 /// struct timeval { 1544 /// time_t tv_sec; 1545 /// suseconds_t tv_usec; 1546 /// }; 1547 /// 1548 /// 1549 /// 1550 /// 1551 /// 1552 /// struct timespec { 1553 /// time_t tv_sec; 1554 /// long tv_nsec; 1555 /// }; 1556 /// 1557 /// 1558 /// struct itimerspec { 1559 /// struct timespec it_interval; 1560 /// struct timespec it_value; 1561 /// }; 1562 /// 1563 /// 1564 /// typedef unsigned long __fd_mask; 1565 /// 1566 /// typedef __fd_mask fd_mask; 1567 /// 1568 /// 1569 /// 1570 /// 1571 /// typedef __sigset_t sigset_t; 1572 /// 1573 /// typedef struct fd_set { 1574 /// __fd_mask __fds_bits[(((1024) + (((sizeof(__fd_mask) * 8)) - 1)) / ((sizeof(__fd_mask) * 8)))]; 1575 /// } fd_set; 1576 /// 1577 /// 1578 /// int pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict, 1579 /// const struct timespec *restrict, const sigset_t *restrict); 1580 /// 1581 /// 1582 /// 1583 /// int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); 1584 /// 1585 /// 1586 /// 1587 /// 1588 /// static __inline int 1589 /// __major(dev_t _d) 1590 /// { 1591 /// return (((_d >> 32) & 0xffffff00) | ((_d >> 8) & 0xff)); 1592 /// } 1593 /// 1594 /// static __inline int 1595 /// __minor(dev_t _d) 1596 /// { 1597 /// return (((_d >> 24) & 0xff00) | (_d & 0xffff00ff)); 1598 /// } 1599 /// 1600 /// static __inline dev_t 1601 /// __makedev(int _Major, int _Minor) 1602 /// { 1603 /// return (((dev_t)(_Major & 0xffffff00) << 32) | ((_Major & 0xff) << 8) | 1604 /// ((dev_t)(_Minor & 0xff00) << 24) | (_Minor & 0xffff00ff)); 1605 /// } 1606 /// 1607 /// 1608 /// 1609 /// 1610 /// 1611 /// 1612 /// 1613 /// 1614 /// 1615 /// 1616 /// int ftruncate(int, off_t); 1617 /// 1618 /// 1619 /// 1620 /// off_t lseek(int, off_t, int); 1621 /// 1622 /// 1623 /// 1624 /// void * mmap(void *, size_t, int, int, int, off_t); 1625 /// 1626 /// 1627 /// 1628 /// int truncate(const char *, off_t); 1629 /// 1630 /// 1631 /// 1632 /// 1633 /// 1634 /// 1635 /// 1636 /// 1637 /// static __inline int atomic_cmpset_char(volatile u_char *dst, u_char expect, u_char src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "char" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_char(volatile u_char *dst, u_char *expect, u_char src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "char" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; 1638 /// static __inline int atomic_cmpset_short(volatile u_short *dst, u_short expect, u_short src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "short" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_short(volatile u_short *dst, u_short *expect, u_short src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "short" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; 1639 /// static __inline int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "int" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_int(volatile u_int *dst, u_int *expect, u_int src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "int" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; 1640 /// static __inline int atomic_cmpset_long(volatile u_long *dst, u_long expect, u_long src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "long" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_long(volatile u_long *dst, u_long *expect, u_long src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "long" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; 1641 /// 1642 /// 1643 /// 1644 /// 1645 /// 1646 /// static __inline u_int 1647 /// atomic_fetchadd_int(volatile u_int *p, u_int v) 1648 /// { 1649 /// 1650 /// __asm volatile( 1651 /// " " "lock ; " " " 1652 /// " xaddl %0,%1 ; " 1653 /// "# atomic_fetchadd_int" 1654 /// : "+r" (v), 1655 /// "+m" (*p) 1656 /// : : "cc"); 1657 /// return (v); 1658 /// } 1659 /// 1660 /// 1661 /// 1662 /// 1663 /// 1664 /// static __inline u_long 1665 /// atomic_fetchadd_long(volatile u_long *p, u_long v) 1666 /// { 1667 /// 1668 /// __asm volatile( 1669 /// " " "lock ; " " " 1670 /// " xaddq %0,%1 ; " 1671 /// "# atomic_fetchadd_long" 1672 /// : "+r" (v), 1673 /// "+m" (*p) 1674 /// : : "cc"); 1675 /// return (v); 1676 /// } 1677 /// 1678 /// static __inline int 1679 /// atomic_testandset_int(volatile u_int *p, u_int v) 1680 /// { 1681 /// u_char res; 1682 /// 1683 /// __asm volatile( 1684 /// " " "lock ; " " " 1685 /// " btsl %2,%1 ; " 1686 /// "# atomic_testandset_int" 1687 /// : "=@ccc" (res), 1688 /// "+m" (*p) 1689 /// : "Ir" (v & 0x1f) 1690 /// : "cc"); 1691 /// return (res); 1692 /// } 1693 /// 1694 /// static __inline int 1695 /// atomic_testandset_long(volatile u_long *p, u_int v) 1696 /// { 1697 /// u_char res; 1698 /// 1699 /// __asm volatile( 1700 /// " " "lock ; " " " 1701 /// " btsq %2,%1 ; " 1702 /// "# atomic_testandset_long" 1703 /// : "=@ccc" (res), 1704 /// "+m" (*p) 1705 /// : "Jr" ((u_long)(v & 0x3f)) 1706 /// : "cc"); 1707 /// return (res); 1708 /// } 1709 /// 1710 /// static __inline int 1711 /// atomic_testandclear_int(volatile u_int *p, u_int v) 1712 /// { 1713 /// u_char res; 1714 /// 1715 /// __asm volatile( 1716 /// " " "lock ; " " " 1717 /// " btrl %2,%1 ; " 1718 /// "# atomic_testandclear_int" 1719 /// : "=@ccc" (res), 1720 /// "+m" (*p) 1721 /// : "Ir" (v & 0x1f) 1722 /// : "cc"); 1723 /// return (res); 1724 /// } 1725 /// 1726 /// static __inline int 1727 /// atomic_testandclear_long(volatile u_long *p, u_int v) 1728 /// { 1729 /// u_char res; 1730 /// 1731 /// __asm volatile( 1732 /// " " "lock ; " " " 1733 /// " btrq %2,%1 ; " 1734 /// "# atomic_testandclear_long" 1735 /// : "=@ccc" (res), 1736 /// "+m" (*p) 1737 /// : "Jr" ((u_long)(v & 0x3f)) 1738 /// : "cc"); 1739 /// return (res); 1740 /// } 1741 /// 1742 /// static __inline void 1743 /// __storeload_barrier(void) 1744 /// { 1745 /// 1746 /// __asm volatile("lock; addl $0,-8(%%rsp)" : : : "memory", "cc"); 1747 /// } 1748 /// 1749 /// static __inline void 1750 /// atomic_thread_fence_acq(void) 1751 /// { 1752 /// 1753 /// __asm volatile(" " : : : "memory"); 1754 /// } 1755 /// 1756 /// static __inline void 1757 /// atomic_thread_fence_rel(void) 1758 /// { 1759 /// 1760 /// __asm volatile(" " : : : "memory"); 1761 /// } 1762 /// 1763 /// static __inline void 1764 /// atomic_thread_fence_acq_rel(void) 1765 /// { 1766 /// 1767 /// __asm volatile(" " : : : "memory"); 1768 /// } 1769 /// 1770 /// static __inline void 1771 /// atomic_thread_fence_seq_cst(void) 1772 /// { 1773 /// 1774 /// __storeload_barrier(); 1775 /// } 1776 /// 1777 /// 1778 /// 1779 /// static __inline void atomic_set_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "orb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_set_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "orb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; 1780 /// static __inline void atomic_clear_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "andb %b1,%0" : "+m" (*p) : "iq" (~v) : "cc"); } static __inline void atomic_clear_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "andb %b1,%0" : "+m" (*p) : "iq" (~v) : "memory", "cc"); } struct __hack; 1781 /// static __inline void atomic_add_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "addb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_add_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "addb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; 1782 /// static __inline void atomic_subtract_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "subb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_subtract_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "subb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; 1783 /// 1784 /// static __inline void atomic_set_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "orw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_set_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "orw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; 1785 /// static __inline void atomic_clear_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "andw %w1,%0" : "+m" (*p) : "ir" (~v) : "cc"); } static __inline void atomic_clear_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "andw %w1,%0" : "+m" (*p) : "ir" (~v) : "memory", "cc"); } struct __hack; 1786 /// static __inline void atomic_add_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "addw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_add_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "addw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; 1787 /// static __inline void atomic_subtract_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "subw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_subtract_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "subw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; 1788 /// 1789 /// static __inline void atomic_set_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "orl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_set_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "orl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; 1790 /// static __inline void atomic_clear_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "andl %1,%0" : "+m" (*p) : "ir" (~v) : "cc"); } static __inline void atomic_clear_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "andl %1,%0" : "+m" (*p) : "ir" (~v) : "memory", "cc"); } struct __hack; 1791 /// static __inline void atomic_add_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "addl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_add_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "addl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; 1792 /// static __inline void atomic_subtract_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "subl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_subtract_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "subl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; 1793 /// 1794 /// static __inline void atomic_set_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "orq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_set_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "orq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; 1795 /// static __inline void atomic_clear_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "andq %1,%0" : "+m" (*p) : "er" (~v) : "cc"); } static __inline void atomic_clear_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "andq %1,%0" : "+m" (*p) : "er" (~v) : "memory", "cc"); } struct __hack; 1796 /// static __inline void atomic_add_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "addq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_add_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "addq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; 1797 /// static __inline void atomic_subtract_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "subq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_subtract_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "subq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; 1798 /// 1799 /// 1800 /// 1801 /// 1802 /// 1803 /// static __inline u_char atomic_load_acq_char(volatile u_char *p) { u_char res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_char(volatile u_char *p, u_char v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; 1804 /// static __inline u_short atomic_load_acq_short(volatile u_short *p) { u_short res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_short(volatile u_short *p, u_short v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; 1805 /// static __inline u_int atomic_load_acq_int(volatile u_int *p) { u_int res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_int(volatile u_int *p, u_int v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; 1806 /// static __inline u_long atomic_load_acq_long(volatile u_long *p) { u_long res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_long(volatile u_long *p, u_long v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; 1807 /// 1808 /// static __inline u_int 1809 /// atomic_swap_int(volatile u_int *p, u_int v) 1810 /// { 1811 /// 1812 /// __asm volatile( 1813 /// " xchgl %1,%0 ; " 1814 /// "# atomic_swap_int" 1815 /// : "+r" (v), 1816 /// "+m" (*p)); 1817 /// return (v); 1818 /// } 1819 /// 1820 /// static __inline u_long 1821 /// atomic_swap_long(volatile u_long *p, u_long v) 1822 /// { 1823 /// 1824 /// __asm volatile( 1825 /// " xchgq %1,%0 ; " 1826 /// "# atomic_swap_long" 1827 /// : "+r" (v), 1828 /// "+m" (*p)); 1829 /// return (v); 1830 /// } 1831 /// 1832 /// 1833 /// 1834 /// 1835 /// 1836 /// extern char *_PathLocale; 1837 /// 1838 /// int __detect_path_locale(void); 1839 /// int __wrap_setrunelocale(const char *); 1840 /// 1841 /// 1842 /// enum { 1843 /// XLC_COLLATE = 0, 1844 /// XLC_CTYPE, 1845 /// XLC_MONETARY, 1846 /// XLC_NUMERIC, 1847 /// XLC_TIME, 1848 /// XLC_MESSAGES, 1849 /// XLC_LAST 1850 /// }; 1851 /// 1852 /// _Static_assert(XLC_LAST - XLC_COLLATE == 6, "XLC values should be contiguous"); 1853 /// _Static_assert(XLC_COLLATE == 1854 /// 1855 /// 1 1856 /// 1857 /// - 1, 1858 /// "XLC_COLLATE doesn't match the LC_COLLATE value."); 1859 /// _Static_assert(XLC_CTYPE == 1860 /// 1861 /// 2 1862 /// 1863 /// - 1, 1864 /// "XLC_CTYPE doesn't match the LC_CTYPE value."); 1865 /// _Static_assert(XLC_MONETARY == 1866 /// 1867 /// 3 1868 /// 1869 /// - 1, 1870 /// "XLC_MONETARY doesn't match the LC_MONETARY value."); 1871 /// _Static_assert(XLC_NUMERIC == 1872 /// 1873 /// 4 1874 /// 1875 /// - 1, 1876 /// "XLC_NUMERIC doesn't match the LC_NUMERIC value."); 1877 /// _Static_assert(XLC_TIME == 1878 /// 1879 /// 5 1880 /// 1881 /// - 1, 1882 /// "XLC_TIME doesn't match the LC_TIME value."); 1883 /// _Static_assert(XLC_MESSAGES == 1884 /// 1885 /// 6 1886 /// 1887 /// - 1, 1888 /// "XLC_MESSAGES doesn't match the LC_MESSAGES value."); 1889 /// 1890 /// struct xlocale_refcounted { 1891 /// 1892 /// long retain_count; 1893 /// 1894 /// void(*destructor)(void*); 1895 /// }; 1896 /// 1897 /// 1898 /// 1899 /// 1900 /// 1901 /// 1902 /// 1903 /// struct xlocale_component { 1904 /// struct xlocale_refcounted header; 1905 /// 1906 /// char locale[31 +1]; 1907 /// 1908 /// char version[12]; 1909 /// }; 1910 /// 1911 /// 1912 /// 1913 /// 1914 /// struct _xlocale { 1915 /// struct xlocale_refcounted header; 1916 /// 1917 /// struct xlocale_component *components[XLC_LAST]; 1918 /// 1919 /// 1920 /// int monetary_locale_changed; 1921 /// 1922 /// 1923 /// int using_monetary_locale; 1924 /// 1925 /// 1926 /// int numeric_locale_changed; 1927 /// 1928 /// 1929 /// int using_numeric_locale; 1930 /// 1931 /// 1932 /// int using_time_locale; 1933 /// 1934 /// 1935 /// int using_messages_locale; 1936 /// 1937 /// struct lconv lconv; 1938 /// 1939 /// char *csym; 1940 /// }; 1941 /// 1942 /// 1943 /// 1944 /// 1945 /// __attribute__((unused)) static void* 1946 /// xlocale_retain(void *val) 1947 /// { 1948 /// struct xlocale_refcounted *obj = val; 1949 /// atomic_add_long(&(obj->retain_count), 1); 1950 /// return (val); 1951 /// } 1952 /// 1953 /// 1954 /// 1955 /// 1956 /// __attribute__((unused)) static void 1957 /// xlocale_release(void *val) 1958 /// { 1959 /// struct xlocale_refcounted *obj = val; 1960 /// long count; 1961 /// 1962 /// count = atomic_fetchadd_long(&(obj->retain_count), -1) - 1; 1963 /// if (count < 0 && obj->destructor != 1964 /// 1965 /// ((void *)0) 1966 /// 1967 /// ) 1968 /// obj->destructor(obj); 1969 /// } 1970 /// 1971 /// 1972 /// 1973 /// 1974 /// 1975 /// extern void* __collate_load(const char*, locale_t); 1976 /// extern void* __ctype_load(const char*, locale_t); 1977 /// extern void* __messages_load(const char*, locale_t); 1978 /// extern void* __monetary_load(const char*, locale_t); 1979 /// extern void* __numeric_load(const char*, locale_t); 1980 /// extern void* __time_load(const char*, locale_t); 1981 /// 1982 /// extern struct _xlocale __xlocale_global_locale; 1983 /// extern struct _xlocale __xlocale_C_locale; 1984 /// 1985 /// 1986 /// 1987 /// 1988 /// void __set_thread_rune_locale(locale_t loc); 1989 /// 1990 /// 1991 /// 1992 /// 1993 /// extern int __has_thread_locale; 1994 /// 1995 /// 1996 /// 1997 /// 1998 /// 1999 /// extern _Thread_local locale_t __thread_locale; 2000 /// 2001 /// 2002 /// 2003 /// 2004 /// 2005 /// 2006 /// 2007 /// static inline locale_t __get_locale(void) 2008 /// { 2009 /// 2010 /// if (!__has_thread_locale) { 2011 /// return (&__xlocale_global_locale); 2012 /// } 2013 /// return (__thread_locale ? __thread_locale : &__xlocale_global_locale); 2014 /// } 2015 /// 2016 /// 2017 /// 2018 /// 2019 /// 2020 /// static inline locale_t get_real_locale(locale_t locale) 2021 /// { 2022 /// switch ((intptr_t)locale) { 2023 /// case 0: return (&__xlocale_C_locale); 2024 /// case -1: return (&__xlocale_global_locale); 2025 /// default: return (locale); 2026 /// } 2027 /// } 2028 /// 2029 /// 2030 /// 2031 /// 2032 /// 2033 /// 2034 /// 2035 /// 2036 /// struct xlocale_ctype { 2037 /// struct xlocale_component header; 2038 /// _RuneLocale *runes; 2039 /// size_t (*__mbrtowc)(wchar_t * 2040 /// 2041 /// restrict 2042 /// 2043 /// , const char * 2044 /// 2045 /// restrict 2046 /// 2047 /// , 2048 /// size_t, mbstate_t * 2049 /// 2050 /// restrict 2051 /// 2052 /// ); 2053 /// int (*__mbsinit)(const mbstate_t *); 2054 /// size_t (*__mbsnrtowcs)(wchar_t * 2055 /// 2056 /// restrict 2057 /// 2058 /// , const char ** 2059 /// 2060 /// restrict 2061 /// 2062 /// , 2063 /// size_t, size_t, mbstate_t * 2064 /// 2065 /// restrict 2066 /// 2067 /// ); 2068 /// size_t (*__wcrtomb)(char * 2069 /// 2070 /// restrict 2071 /// 2072 /// , wchar_t, mbstate_t * 2073 /// 2074 /// restrict 2075 /// 2076 /// ); 2077 /// size_t (*__wcsnrtombs)(char * 2078 /// 2079 /// restrict 2080 /// 2081 /// , const wchar_t ** 2082 /// 2083 /// restrict 2084 /// 2085 /// , 2086 /// size_t, size_t, mbstate_t * 2087 /// 2088 /// restrict 2089 /// 2090 /// ); 2091 /// int __mb_cur_max; 2092 /// int __mb_sb_limit; 2093 /// 2094 /// __mbstate_t mblen; 2095 /// 2096 /// __mbstate_t mbrlen; 2097 /// 2098 /// __mbstate_t mbrtoc16; 2099 /// 2100 /// __mbstate_t mbrtoc32; 2101 /// 2102 /// __mbstate_t mbrtowc; 2103 /// 2104 /// __mbstate_t mbsnrtowcs; 2105 /// 2106 /// __mbstate_t mbsrtowcs; 2107 /// 2108 /// __mbstate_t mbtowc; 2109 /// 2110 /// __mbstate_t c16rtomb; 2111 /// 2112 /// __mbstate_t c32rtomb; 2113 /// 2114 /// __mbstate_t wcrtomb; 2115 /// 2116 /// __mbstate_t wcsnrtombs; 2117 /// 2118 /// __mbstate_t wcsrtombs; 2119 /// 2120 /// __mbstate_t wctomb; 2121 /// }; 2122 /// 2123 /// extern struct xlocale_ctype __xlocale_global_ctype; 2124 /// 2125 /// 2126 /// 2127 /// 2128 /// int _none_init(struct xlocale_ctype *, _RuneLocale *) 2129 /// 2130 /// __attribute__((__visibility__("hidden"))) 2131 /// 2132 /// ; 2133 /// int _UTF8_init(struct xlocale_ctype *, _RuneLocale *) 2134 /// 2135 /// __attribute__((__visibility__("hidden"))) 2136 /// 2137 /// ; 2138 /// int _EUC_CN_init(struct xlocale_ctype *, _RuneLocale *) 2139 /// 2140 /// __attribute__((__visibility__("hidden"))) 2141 /// 2142 /// ; 2143 /// int _EUC_JP_init(struct xlocale_ctype *, _RuneLocale *) 2144 /// 2145 /// __attribute__((__visibility__("hidden"))) 2146 /// 2147 /// ; 2148 /// int _EUC_KR_init(struct xlocale_ctype *, _RuneLocale *) 2149 /// 2150 /// __attribute__((__visibility__("hidden"))) 2151 /// 2152 /// ; 2153 /// int _EUC_TW_init(struct xlocale_ctype *, _RuneLocale *) 2154 /// 2155 /// __attribute__((__visibility__("hidden"))) 2156 /// 2157 /// ; 2158 /// int _GB18030_init(struct xlocale_ctype *, _RuneLocale *) 2159 /// 2160 /// __attribute__((__visibility__("hidden"))) 2161 /// 2162 /// ; 2163 /// int _GB2312_init(struct xlocale_ctype *, _RuneLocale *) 2164 /// 2165 /// __attribute__((__visibility__("hidden"))) 2166 /// 2167 /// ; 2168 /// int _GBK_init(struct xlocale_ctype *, _RuneLocale *) 2169 /// 2170 /// __attribute__((__visibility__("hidden"))) 2171 /// 2172 /// ; 2173 /// int _BIG5_init(struct xlocale_ctype *, _RuneLocale *) 2174 /// 2175 /// __attribute__((__visibility__("hidden"))) 2176 /// 2177 /// ; 2178 /// int _MSKanji_init(struct xlocale_ctype *, _RuneLocale *) 2179 /// 2180 /// __attribute__((__visibility__("hidden"))) 2181 /// 2182 /// ; 2183 /// int _ascii_init(struct xlocale_ctype *, _RuneLocale *) 2184 /// 2185 /// __attribute__((__visibility__("hidden"))) 2186 /// 2187 /// ; 2188 /// 2189 /// typedef size_t (*mbrtowc_pfn_t)(wchar_t * 2190 /// 2191 /// restrict 2192 /// 2193 /// , 2194 /// const char * 2195 /// 2196 /// restrict 2197 /// 2198 /// , size_t, mbstate_t * 2199 /// 2200 /// restrict 2201 /// 2202 /// ); 2203 /// typedef size_t (*wcrtomb_pfn_t)(char * 2204 /// 2205 /// restrict 2206 /// 2207 /// , wchar_t, 2208 /// mbstate_t * 2209 /// 2210 /// restrict 2211 /// 2212 /// ); 2213 /// size_t __mbsnrtowcs_std(wchar_t * 2214 /// 2215 /// restrict 2216 /// 2217 /// , const char ** 2218 /// 2219 /// restrict 2220 /// 2221 /// , 2222 /// size_t, size_t, mbstate_t * 2223 /// 2224 /// restrict 2225 /// 2226 /// , mbrtowc_pfn_t); 2227 /// size_t __wcsnrtombs_std(char * 2228 /// 2229 /// restrict 2230 /// 2231 /// , const wchar_t ** 2232 /// 2233 /// restrict 2234 /// 2235 /// , 2236 /// size_t, size_t, mbstate_t * 2237 /// 2238 /// restrict 2239 /// 2240 /// , wcrtomb_pfn_t); 2241 /// 2242 2243 const _RuneLocale _DefaultRuneLocale = { 2244 2245 2246 "RuneMagi" 2247 2248 , 2249 "NONE", 2250 2251 2252 ((void *)0) 2253 2254 , 2255 2256 2257 ((void *)0) 2258 2259 , 2260 0xFFFD, 2261 2262 { 2263 2264 0x00000200L 2265 2266 , 2267 2268 2269 0x00000200L 2270 2271 , 2272 2273 2274 0x00000200L 2275 2276 , 2277 2278 2279 0x00000200L 2280 2281 , 2282 2283 2284 0x00000200L 2285 2286 , 2287 2288 2289 0x00000200L 2290 2291 , 2292 2293 2294 0x00000200L 2295 2296 , 2297 2298 2299 0x00000200L 2300 2301 , 2302 2303 2304 0x00000200L 2305 2306 , 2307 2308 2309 0x00000200L 2310 2311 | 2312 2313 0x00004000L 2314 2315 | 2316 2317 0x00020000L 2318 2319 , 2320 2321 2322 0x00000200L 2323 2324 | 2325 2326 0x00004000L 2327 2328 , 2329 2330 2331 0x00000200L 2332 2333 | 2334 2335 0x00004000L 2336 2337 , 2338 2339 2340 0x00000200L 2341 2342 | 2343 2344 0x00004000L 2345 2346 , 2347 2348 2349 0x00000200L 2350 2351 | 2352 2353 0x00004000L 2354 2355 , 2356 2357 2358 0x00000200L 2359 2360 , 2361 2362 2363 0x00000200L 2364 2365 , 2366 2367 2368 0x00000200L 2369 2370 , 2371 2372 2373 0x00000200L 2374 2375 , 2376 2377 2378 0x00000200L 2379 2380 , 2381 2382 2383 0x00000200L 2384 2385 , 2386 2387 2388 0x00000200L 2389 2390 , 2391 2392 2393 0x00000200L 2394 2395 , 2396 2397 2398 0x00000200L 2399 2400 , 2401 2402 2403 0x00000200L 2404 2405 , 2406 2407 2408 0x00000200L 2409 2410 , 2411 2412 2413 0x00000200L 2414 2415 , 2416 2417 2418 0x00000200L 2419 2420 , 2421 2422 2423 0x00000200L 2424 2425 , 2426 2427 2428 0x00000200L 2429 2430 , 2431 2432 2433 0x00000200L 2434 2435 , 2436 2437 2438 0x00000200L 2439 2440 , 2441 2442 2443 0x00000200L 2444 2445 , 2446 2447 2448 0x00004000L 2449 2450 | 2451 2452 0x00020000L 2453 2454 | 2455 2456 0x00040000L 2457 2458 , 2459 2460 2461 0x00002000L 2462 2463 | 2464 2465 0x00040000L 2466 2467 | 2468 2469 0x00000800L 2470 2471 , 2472 2473 2474 0x00002000L 2475 2476 | 2477 2478 0x00040000L 2479 2480 | 2481 2482 0x00000800L 2483 2484 , 2485 2486 2487 0x00002000L 2488 2489 | 2490 2491 0x00040000L 2492 2493 | 2494 2495 0x00000800L 2496 2497 , 2498 2499 2500 0x00002000L 2501 2502 | 2503 2504 0x00040000L 2505 2506 | 2507 2508 0x00000800L 2509 2510 , 2511 2512 2513 0x00002000L 2514 2515 | 2516 2517 0x00040000L 2518 2519 | 2520 2521 0x00000800L 2522 2523 , 2524 2525 2526 0x00002000L 2527 2528 | 2529 2530 0x00040000L 2531 2532 | 2533 2534 0x00000800L 2535 2536 , 2537 2538 2539 0x00002000L 2540 2541 | 2542 2543 0x00040000L 2544 2545 | 2546 2547 0x00000800L 2548 2549 , 2550 2551 2552 0x00002000L 2553 2554 | 2555 2556 0x00040000L 2557 2558 | 2559 2560 0x00000800L 2561 2562 , 2563 2564 2565 0x00002000L 2566 2567 | 2568 2569 0x00040000L 2570 2571 | 2572 2573 0x00000800L 2574 2575 , 2576 2577 2578 0x00002000L 2579 2580 | 2581 2582 0x00040000L 2583 2584 | 2585 2586 0x00000800L 2587 2588 , 2589 2590 2591 0x00002000L 2592 2593 | 2594 2595 0x00040000L 2596 2597 | 2598 2599 0x00000800L 2600 2601 , 2602 2603 2604 0x00002000L 2605 2606 | 2607 2608 0x00040000L 2609 2610 | 2611 2612 0x00000800L 2613 2614 , 2615 2616 2617 0x00002000L 2618 2619 | 2620 2621 0x00040000L 2622 2623 | 2624 2625 0x00000800L 2626 2627 , 2628 2629 2630 0x00002000L 2631 2632 | 2633 2634 0x00040000L 2635 2636 | 2637 2638 0x00000800L 2639 2640 , 2641 2642 2643 0x00002000L 2644 2645 | 2646 2647 0x00040000L 2648 2649 | 2650 2651 0x00000800L 2652 2653 , 2654 2655 2656 0x00000400L 2657 2658 | 2659 2660 0x00040000L 2661 2662 | 2663 2664 0x00000800L 2665 2666 | 2667 2668 0x00010000L 2669 2670 | 2671 2672 0x00400000L 2673 2674 |0, 2675 2676 2677 0x00000400L 2678 2679 | 2680 2681 0x00040000L 2682 2683 | 2684 2685 0x00000800L 2686 2687 | 2688 2689 0x00010000L 2690 2691 | 2692 2693 0x00400000L 2694 2695 |1, 2696 2697 2698 0x00000400L 2699 2700 | 2701 2702 0x00040000L 2703 2704 | 2705 2706 0x00000800L 2707 2708 | 2709 2710 0x00010000L 2711 2712 | 2713 2714 0x00400000L 2715 2716 |2, 2717 2718 2719 0x00000400L 2720 2721 | 2722 2723 0x00040000L 2724 2725 | 2726 2727 0x00000800L 2728 2729 | 2730 2731 0x00010000L 2732 2733 | 2734 2735 0x00400000L 2736 2737 |3, 2738 2739 2740 0x00000400L 2741 2742 | 2743 2744 0x00040000L 2745 2746 | 2747 2748 0x00000800L 2749 2750 | 2751 2752 0x00010000L 2753 2754 | 2755 2756 0x00400000L 2757 2758 |4, 2759 2760 2761 0x00000400L 2762 2763 | 2764 2765 0x00040000L 2766 2767 | 2768 2769 0x00000800L 2770 2771 | 2772 2773 0x00010000L 2774 2775 | 2776 2777 0x00400000L 2778 2779 |5, 2780 2781 2782 0x00000400L 2783 2784 | 2785 2786 0x00040000L 2787 2788 | 2789 2790 0x00000800L 2791 2792 | 2793 2794 0x00010000L 2795 2796 | 2797 2798 0x00400000L 2799 2800 |6, 2801 2802 2803 0x00000400L 2804 2805 | 2806 2807 0x00040000L 2808 2809 | 2810 2811 0x00000800L 2812 2813 | 2814 2815 0x00010000L 2816 2817 | 2818 2819 0x00400000L 2820 2821 |7, 2822 2823 2824 0x00000400L 2825 2826 | 2827 2828 0x00040000L 2829 2830 | 2831 2832 0x00000800L 2833 2834 | 2835 2836 0x00010000L 2837 2838 | 2839 2840 0x00400000L 2841 2842 |8, 2843 2844 2845 0x00000400L 2846 2847 | 2848 2849 0x00040000L 2850 2851 | 2852 2853 0x00000800L 2854 2855 | 2856 2857 0x00010000L 2858 2859 | 2860 2861 0x00400000L 2862 2863 |9, 2864 2865 2866 0x00002000L 2867 2868 | 2869 2870 0x00040000L 2871 2872 | 2873 2874 0x00000800L 2875 2876 , 2877 2878 2879 0x00002000L 2880 2881 | 2882 2883 0x00040000L 2884 2885 | 2886 2887 0x00000800L 2888 2889 , 2890 2891 2892 0x00002000L 2893 2894 | 2895 2896 0x00040000L 2897 2898 | 2899 2900 0x00000800L 2901 2902 , 2903 2904 2905 0x00002000L 2906 2907 | 2908 2909 0x00040000L 2910 2911 | 2912 2913 0x00000800L 2914 2915 , 2916 2917 2918 0x00002000L 2919 2920 | 2921 2922 0x00040000L 2923 2924 | 2925 2926 0x00000800L 2927 2928 , 2929 2930 2931 0x00002000L 2932 2933 | 2934 2935 0x00040000L 2936 2937 | 2938 2939 0x00000800L 2940 2941 , 2942 2943 2944 0x00002000L 2945 2946 | 2947 2948 0x00040000L 2949 2950 | 2951 2952 0x00000800L 2953 2954 , 2955 2956 2957 0x00008000L 2958 2959 | 2960 2961 0x00010000L 2962 2963 | 2964 2965 0x00040000L 2966 2967 | 2968 2969 0x00000800L 2970 2971 | 2972 2973 0x00000100L 2974 2975 |10, 2976 2977 2978 0x00008000L 2979 2980 | 2981 2982 0x00010000L 2983 2984 | 2985 2986 0x00040000L 2987 2988 | 2989 2990 0x00000800L 2991 2992 | 2993 2994 0x00000100L 2995 2996 |11, 2997 2998 2999 0x00008000L 3000 3001 | 3002 3003 0x00010000L 3004 3005 | 3006 3007 0x00040000L 3008 3009 | 3010 3011 0x00000800L 3012 3013 | 3014 3015 0x00000100L 3016 3017 |12, 3018 3019 3020 0x00008000L 3021 3022 | 3023 3024 0x00010000L 3025 3026 | 3027 3028 0x00040000L 3029 3030 | 3031 3032 0x00000800L 3033 3034 | 3035 3036 0x00000100L 3037 3038 |13, 3039 3040 3041 0x00008000L 3042 3043 | 3044 3045 0x00010000L 3046 3047 | 3048 3049 0x00040000L 3050 3051 | 3052 3053 0x00000800L 3054 3055 | 3056 3057 0x00000100L 3058 3059 |14, 3060 3061 3062 0x00008000L 3063 3064 | 3065 3066 0x00010000L 3067 3068 | 3069 3070 0x00040000L 3071 3072 | 3073 3074 0x00000800L 3075 3076 | 3077 3078 0x00000100L 3079 3080 |15, 3081 3082 3083 0x00008000L 3084 3085 | 3086 3087 0x00040000L 3088 3089 | 3090 3091 0x00000800L 3092 3093 | 3094 3095 0x00000100L 3096 3097 , 3098 3099 3100 0x00008000L 3101 3102 | 3103 3104 0x00040000L 3105 3106 | 3107 3108 0x00000800L 3109 3110 | 3111 3112 0x00000100L 3113 3114 , 3115 3116 3117 0x00008000L 3118 3119 | 3120 3121 0x00040000L 3122 3123 | 3124 3125 0x00000800L 3126 3127 | 3128 3129 0x00000100L 3130 3131 , 3132 3133 3134 0x00008000L 3135 3136 | 3137 3138 0x00040000L 3139 3140 | 3141 3142 0x00000800L 3143 3144 | 3145 3146 0x00000100L 3147 3148 , 3149 3150 3151 0x00008000L 3152 3153 | 3154 3155 0x00040000L 3156 3157 | 3158 3159 0x00000800L 3160 3161 | 3162 3163 0x00000100L 3164 3165 , 3166 3167 3168 0x00008000L 3169 3170 | 3171 3172 0x00040000L 3173 3174 | 3175 3176 0x00000800L 3177 3178 | 3179 3180 0x00000100L 3181 3182 , 3183 3184 3185 0x00008000L 3186 3187 | 3188 3189 0x00040000L 3190 3191 | 3192 3193 0x00000800L 3194 3195 | 3196 3197 0x00000100L 3198 3199 , 3200 3201 3202 0x00008000L 3203 3204 | 3205 3206 0x00040000L 3207 3208 | 3209 3210 0x00000800L 3211 3212 | 3213 3214 0x00000100L 3215 3216 , 3217 3218 3219 0x00008000L 3220 3221 | 3222 3223 0x00040000L 3224 3225 | 3226 3227 0x00000800L 3228 3229 | 3230 3231 0x00000100L 3232 3233 , 3234 3235 3236 0x00008000L 3237 3238 | 3239 3240 0x00040000L 3241 3242 | 3243 3244 0x00000800L 3245 3246 | 3247 3248 0x00000100L 3249 3250 , 3251 3252 3253 0x00008000L 3254 3255 | 3256 3257 0x00040000L 3258 3259 | 3260 3261 0x00000800L 3262 3263 | 3264 3265 0x00000100L 3266 3267 , 3268 3269 3270 0x00008000L 3271 3272 | 3273 3274 0x00040000L 3275 3276 | 3277 3278 0x00000800L 3279 3280 | 3281 3282 0x00000100L 3283 3284 , 3285 3286 3287 0x00008000L 3288 3289 | 3290 3291 0x00040000L 3292 3293 | 3294 3295 0x00000800L 3296 3297 | 3298 3299 0x00000100L 3300 3301 , 3302 3303 3304 0x00008000L 3305 3306 | 3307 3308 0x00040000L 3309 3310 | 3311 3312 0x00000800L 3313 3314 | 3315 3316 0x00000100L 3317 3318 , 3319 3320 3321 0x00008000L 3322 3323 | 3324 3325 0x00040000L 3326 3327 | 3328 3329 0x00000800L 3330 3331 | 3332 3333 0x00000100L 3334 3335 , 3336 3337 3338 0x00008000L 3339 3340 | 3341 3342 0x00040000L 3343 3344 | 3345 3346 0x00000800L 3347 3348 | 3349 3350 0x00000100L 3351 3352 , 3353 3354 3355 0x00008000L 3356 3357 | 3358 3359 0x00040000L 3360 3361 | 3362 3363 0x00000800L 3364 3365 | 3366 3367 0x00000100L 3368 3369 , 3370 3371 3372 0x00008000L 3373 3374 | 3375 3376 0x00040000L 3377 3378 | 3379 3380 0x00000800L 3381 3382 | 3383 3384 0x00000100L 3385 3386 , 3387 3388 3389 0x00008000L 3390 3391 | 3392 3393 0x00040000L 3394 3395 | 3396 3397 0x00000800L 3398 3399 | 3400 3401 0x00000100L 3402 3403 , 3404 3405 3406 0x00008000L 3407 3408 | 3409 3410 0x00040000L 3411 3412 | 3413 3414 0x00000800L 3415 3416 | 3417 3418 0x00000100L 3419 3420 , 3421 3422 3423 0x00002000L 3424 3425 | 3426 3427 0x00040000L 3428 3429 | 3430 3431 0x00000800L 3432 3433 , 3434 3435 3436 0x00002000L 3437 3438 | 3439 3440 0x00040000L 3441 3442 | 3443 3444 0x00000800L 3445 3446 , 3447 3448 3449 0x00002000L 3450 3451 | 3452 3453 0x00040000L 3454 3455 | 3456 3457 0x00000800L 3458 3459 , 3460 3461 3462 0x00002000L 3463 3464 | 3465 3466 0x00040000L 3467 3468 | 3469 3470 0x00000800L 3471 3472 , 3473 3474 3475 0x00002000L 3476 3477 | 3478 3479 0x00040000L 3480 3481 | 3482 3483 0x00000800L 3484 3485 , 3486 3487 3488 0x00002000L 3489 3490 | 3491 3492 0x00040000L 3493 3494 | 3495 3496 0x00000800L 3497 3498 , 3499 3500 3501 0x00001000L 3502 3503 | 3504 3505 0x00010000L 3506 3507 | 3508 3509 0x00040000L 3510 3511 | 3512 3513 0x00000800L 3514 3515 | 3516 3517 0x00000100L 3518 3519 |10, 3520 3521 3522 0x00001000L 3523 3524 | 3525 3526 0x00010000L 3527 3528 | 3529 3530 0x00040000L 3531 3532 | 3533 3534 0x00000800L 3535 3536 | 3537 3538 0x00000100L 3539 3540 |11, 3541 3542 3543 0x00001000L 3544 3545 | 3546 3547 0x00010000L 3548 3549 | 3550 3551 0x00040000L 3552 3553 | 3554 3555 0x00000800L 3556 3557 | 3558 3559 0x00000100L 3560 3561 |12, 3562 3563 3564 0x00001000L 3565 3566 | 3567 3568 0x00010000L 3569 3570 | 3571 3572 0x00040000L 3573 3574 | 3575 3576 0x00000800L 3577 3578 | 3579 3580 0x00000100L 3581 3582 |13, 3583 3584 3585 0x00001000L 3586 3587 | 3588 3589 0x00010000L 3590 3591 | 3592 3593 0x00040000L 3594 3595 | 3596 3597 0x00000800L 3598 3599 | 3600 3601 0x00000100L 3602 3603 |14, 3604 3605 3606 0x00001000L 3607 3608 | 3609 3610 0x00010000L 3611 3612 | 3613 3614 0x00040000L 3615 3616 | 3617 3618 0x00000800L 3619 3620 | 3621 3622 0x00000100L 3623 3624 |15, 3625 3626 3627 0x00001000L 3628 3629 | 3630 3631 0x00040000L 3632 3633 | 3634 3635 0x00000800L 3636 3637 | 3638 3639 0x00000100L 3640 3641 , 3642 3643 3644 0x00001000L 3645 3646 | 3647 3648 0x00040000L 3649 3650 | 3651 3652 0x00000800L 3653 3654 | 3655 3656 0x00000100L 3657 3658 , 3659 3660 3661 0x00001000L 3662 3663 | 3664 3665 0x00040000L 3666 3667 | 3668 3669 0x00000800L 3670 3671 | 3672 3673 0x00000100L 3674 3675 , 3676 3677 3678 0x00001000L 3679 3680 | 3681 3682 0x00040000L 3683 3684 | 3685 3686 0x00000800L 3687 3688 | 3689 3690 0x00000100L 3691 3692 , 3693 3694 3695 0x00001000L 3696 3697 | 3698 3699 0x00040000L 3700 3701 | 3702 3703 0x00000800L 3704 3705 | 3706 3707 0x00000100L 3708 3709 , 3710 3711 3712 0x00001000L 3713 3714 | 3715 3716 0x00040000L 3717 3718 | 3719 3720 0x00000800L 3721 3722 | 3723 3724 0x00000100L 3725 3726 , 3727 3728 3729 0x00001000L 3730 3731 | 3732 3733 0x00040000L 3734 3735 | 3736 3737 0x00000800L 3738 3739 | 3740 3741 0x00000100L 3742 3743 , 3744 3745 3746 0x00001000L 3747 3748 | 3749 3750 0x00040000L 3751 3752 | 3753 3754 0x00000800L 3755 3756 | 3757 3758 0x00000100L 3759 3760 , 3761 3762 3763 0x00001000L 3764 3765 | 3766 3767 0x00040000L 3768 3769 | 3770 3771 0x00000800L 3772 3773 | 3774 3775 0x00000100L 3776 3777 , 3778 3779 3780 0x00001000L 3781 3782 | 3783 3784 0x00040000L 3785 3786 | 3787 3788 0x00000800L 3789 3790 | 3791 3792 0x00000100L 3793 3794 , 3795 3796 3797 0x00001000L 3798 3799 | 3800 3801 0x00040000L 3802 3803 | 3804 3805 0x00000800L 3806 3807 | 3808 3809 0x00000100L 3810 3811 , 3812 3813 3814 0x00001000L 3815 3816 | 3817 3818 0x00040000L 3819 3820 | 3821 3822 0x00000800L 3823 3824 | 3825 3826 0x00000100L 3827 3828 , 3829 3830 3831 0x00001000L 3832 3833 | 3834 3835 0x00040000L 3836 3837 | 3838 3839 0x00000800L 3840 3841 | 3842 3843 0x00000100L 3844 3845 , 3846 3847 3848 0x00001000L 3849 3850 | 3851 3852 0x00040000L 3853 3854 | 3855 3856 0x00000800L 3857 3858 | 3859 3860 0x00000100L 3861 3862 , 3863 3864 3865 0x00001000L 3866 3867 | 3868 3869 0x00040000L 3870 3871 | 3872 3873 0x00000800L 3874 3875 | 3876 3877 0x00000100L 3878 3879 , 3880 3881 3882 0x00001000L 3883 3884 | 3885 3886 0x00040000L 3887 3888 | 3889 3890 0x00000800L 3891 3892 | 3893 3894 0x00000100L 3895 3896 , 3897 3898 3899 0x00001000L 3900 3901 | 3902 3903 0x00040000L 3904 3905 | 3906 3907 0x00000800L 3908 3909 | 3910 3911 0x00000100L 3912 3913 , 3914 3915 3916 0x00001000L 3917 3918 | 3919 3920 0x00040000L 3921 3922 | 3923 3924 0x00000800L 3925 3926 | 3927 3928 0x00000100L 3929 3930 , 3931 3932 3933 0x00001000L 3934 3935 | 3936 3937 0x00040000L 3938 3939 | 3940 3941 0x00000800L 3942 3943 | 3944 3945 0x00000100L 3946 3947 , 3948 3949 3950 0x00001000L 3951 3952 | 3953 3954 0x00040000L 3955 3956 | 3957 3958 0x00000800L 3959 3960 | 3961 3962 0x00000100L 3963 3964 , 3965 3966 3967 0x00002000L 3968 3969 | 3970 3971 0x00040000L 3972 3973 | 3974 3975 0x00000800L 3976 3977 , 3978 3979 3980 0x00002000L 3981 3982 | 3983 3984 0x00040000L 3985 3986 | 3987 3988 0x00000800L 3989 3990 , 3991 3992 3993 0x00002000L 3994 3995 | 3996 3997 0x00040000L 3998 3999 | 4000 4001 0x00000800L 4002 4003 , 4004 4005 4006 0x00002000L 4007 4008 | 4009 4010 0x00040000L 4011 4012 | 4013 4014 0x00000800L 4015 4016 , 4017 4018 4019 0x00000200L 4020 4021 , 4022 }, 4023 { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 4024 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 4025 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 4026 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 4027 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 4028 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 4029 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 4030 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 4031 0x40, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 4032 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 4033 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 4034 'x', 'y', 'z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 4035 0x60, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 4036 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 4037 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 4038 'x', 'y', 'z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 4039 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 4040 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 4041 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 4042 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 4043 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 4044 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 4045 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 4046 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 4047 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 4048 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 4049 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 4050 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 4051 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 4052 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 4053 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 4054 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 4055 }, 4056 { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 4057 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 4058 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 4059 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 4060 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 4061 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 4062 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 4063 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 4064 0x40, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 4065 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 4066 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 4067 'X', 'Y', 'Z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 4068 0x60, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 4069 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 4070 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 4071 'X', 'Y', 'Z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 4072 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 4073 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 4074 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 4075 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 4076 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 4077 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 4078 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 4079 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 4080 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 4081 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 4082 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 4083 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 4084 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 4085 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 4086 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 4087 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 4088 }, 4089 }; 4090 4091 4092 const _RuneLocale *_CurrentRuneLocale = &_DefaultRuneLocale; 4093 4094 /// _RuneLocale * 4095 /// __runes_for_locale(locale_t locale, int *mb_sb_limit) 4096 /// { 4097 /// (locale = get_real_locale(locale)); 4098 /// struct xlocale_ctype *c = ((struct xlocale_ctype*)(locale)->components[XLC_CTYPE]); 4099 /// *mb_sb_limit = c->__mb_sb_limit; 4100 /// return c->runes; 4101 /// }