1299
Open Watcom C Library Reference Version 2.0

Open Watcom C Library Reference · Preface This manual describes the Open Watcom C Library. It includes the Standard C Library (as defined in the ISO/ANSI C Standard) plus many additional

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

  • Open Watcom C Library Reference

    Version 2.0

  • Notice of Copyright

    Copyright 2002-2020 the Open Watcom Contributors. Portions Copyright 1984-2002 Sybase, Inc.and its subsidiaries. All rights reserved.

    Any part of this publication may be reproduced, transmitted, or translated in any form or by any means,electronic, mechanical, manual, optical, or otherwise, without the prior written permission of anyone.

    For more information please visit http://www.openwatcom.org/

    ii

  • PrefaceThis manual describes the Open Watcom C Library. It includes the Standard C Library (as defined in theISO/ANSI C Standard) plus many additional library routines which make application development forpersonal computers much easier.

    Acknowledgements

    This book was produced with the Open Watcom GML electronic publishing system, a software tooldeveloped by WATCOM. In this system, writers use an ASCII text editor to create source files containingtext annotated with tags. These tags label the structural elements of the document, such as chapters,sections, paragraphs, and lists. The Open Watcom GML software, which runs on a variety of operatingsystems, interprets the tags to format the text into a form such as you see here. Writers can produce outputfor a variety of printers, including laser printers, using separately specified layout directives for such thingsas font selection, column width and height, number of columns, etc. The result is type-set quality copycontaining integrated text and graphics.

    July, 1997.

    Trademarks Used in this Manual

    IBM is a registered trademark of International Business Machines Corp.

    Intel is a registered trademark of Intel Corp.

    Microsoft, MS, MS-DOS, Windows, Win32, Win32s, Windows NT and Windows 2000 are eitherregistered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

    NetWare, NetWare 386, and Novell are registered trademarks of Novell, Inc.

    UNIX is a registered trademark of The Open Group.

    WATCOM is a trademark of Sybase, Inc. and its subsidiaries.

    iii

  • iv

  • Table of Contents

    Open Watcom C Library Reference ............................................................................................................... 1

    1 C Library Overview .......................................................................................................................... 31.1 Classes of Functions ........................................................................................................... 3

    1.1.1 Character Manipulation Functions ...................................................................... 51.1.2 Wide Character Manipulation Functions ............................................................. 61.1.3 Multibyte Character Manipulation Functions ...................................................... 61.1.4 Memory Manipulation Functions ........................................................................ 81.1.5 String Manipulation Functions ............................................................................ 81.1.6 Wide String Manipulation Functions .................................................................. 101.1.7 Multibyte String Manipulation Functions ........................................................... 111.1.8 Conversion Functions .......................................................................................... 131.1.9 Memory Allocation Functions ............................................................................. 141.1.10 Heap Functions .................................................................................................. 151.1.11 Math Functions .................................................................................................. 151.1.12 Searching Functions .......................................................................................... 171.1.13 Time Functions .................................................................................................. 171.1.14 Variable-length Argument Lists ........................................................................ 181.1.15 Stream I/O Functions ......................................................................................... 181.1.16 Wide Character Stream I/O Functions ............................................................... 201.1.17 Process Primitive Functions .............................................................................. 211.1.18 Process Environment ......................................................................................... 221.1.19 Directory Functions ........................................................................................... 231.1.20 Operating System I/O Functions ....................................................................... 231.1.21 File Manipulation Functions .............................................................................. 241.1.22 Console I/O Functions ....................................................................................... 251.1.23 Default Windowing Functions ........................................................................... 251.1.24 BIOS Functions ................................................................................................. 251.1.25 DOS-Specific Functions .................................................................................... 261.1.26 Intel 80x86 Architecture-Specific Functions ..................................................... 261.1.27 Intel Pentium Multimedia Extension Functions ................................................ 271.1.28 Miscellaneous Functions ................................................................................... 281.1.29 DOS LFN aware Functions ............................................................................... 29

    1.2 Header Files ....................................................................................................................... 301.2.1 Header Files in /watcom/h ................................................................................... 301.2.2 Header Files in /watcom/h/sys ............................................................................. 33

    1.3 Global Data ........................................................................................................................ 341.4 The TZ Environment Variable ........................................................................................... 381.5 The OS/2 TZ Environment Variable .................................................................................. 41

    2 Graphics Library ............................................................................................................................... 432.1 Graphics Functions ............................................................................................................ 432.2 Graphics Adapters .............................................................................................................. 432.3 Classes of Graphics Functions ........................................................................................... 44

    2.3.1 Environment Functions ........................................................................................ 442.3.2 Coordinate System Functions .............................................................................. 452.3.3 Attribute Functions .............................................................................................. 462.3.4 Drawing Functions .............................................................................................. 462.3.5 Text Functions ..................................................................................................... 472.3.6 Graphics Text Functions ...................................................................................... 472.3.7 Image Manipulation Functions ............................................................................ 482.3.8 Font Manipulation Functions ............................................................................... 48

    v

  • Table of Contents

    2.3.9 Presentation Graphics Functions ......................................................................... 492.3.9.1 Display Functions .................................................................................. 492.3.9.2 Analyze Functions ................................................................................. 502.3.9.3 Utility Functions .................................................................................... 50

    2.4 Graphics Header Files ........................................................................................................ 50

    3 DOS Considerations ......................................................................................................................... 513.1 DOS Devices ...................................................................................................................... 513.2 DOS Directories ................................................................................................................. 513.3 DOS File Names ................................................................................................................ 523.4 DOS Files ........................................................................................................................... 533.5 DOS Commands ................................................................................................................. 543.6 DOS Interrupts ................................................................................................................... 543.7 DOS Processes ................................................................................................................... 54

    4 Library Functions and Macros .......................................................................................................... 55abort ................................................................................................................... 58abort_handler_s ................................................................................................. 59abs ..................................................................................................................... 60access, _access, _waccess ................................................................................. 61acos .................................................................................................................... 63acosh .................................................................................................................. 64alloca ................................................................................................................. 65_arc, _arc_w, _arc_wxy .................................................................................... 66asctime Functions .............................................................................................. 68asctime_s, _wasctime_s .................................................................................... 70asin .................................................................................................................... 73asinh .................................................................................................................. 74assert .................................................................................................................. 75atan .................................................................................................................... 76atan2 .................................................................................................................. 77atanh .................................................................................................................. 78atexit .................................................................................................................. 79atof, _wtof ......................................................................................................... 80atoi, _wtoi .......................................................................................................... 81atol, _wtol .......................................................................................................... 82atoll, _wtoll ....................................................................................................... 83_atouni ............................................................................................................... 84basename ........................................................................................................... 85bdos ................................................................................................................... 86_beginthread, _beginthreadex ........................................................................... 87bessel Functions ................................................................................................ 91bcmp .................................................................................................................. 92bcopy ................................................................................................................. 93_bfreeseg ........................................................................................................... 94_bgetcmd ........................................................................................................... 96_bheapseg .......................................................................................................... 97_bios_disk ......................................................................................................... 99_bios_equiplist .................................................................................................. 101_bios_keybrd ..................................................................................................... 102_bios_memsize .................................................................................................. 104_bios_printer ..................................................................................................... 105

    vi

  • Table of Contents

    _bios_serialcom ................................................................................................. 106_bios_timeofday ................................................................................................ 108_bprintf, _bwprintf ............................................................................................ 109break... Functions .............................................................................................. 110bsearch ............................................................................................................... 111bsearch_s ........................................................................................................... 113btowc ................................................................................................................. 115bzero .................................................................................................................. 116cabs .................................................................................................................... 117calloc Functions ................................................................................................ 118cbrt ..................................................................................................................... 120ceil ..................................................................................................................... 121cgets ................................................................................................................... 122_chain_intr ......................................................................................................... 123chdir, _chdir, _wchdir ....................................................................................... 124_chdrive ............................................................................................................. 126chmod, _chmod, _wchmod ............................................................................... 127chsize, _chsize ................................................................................................... 129_clear87 ............................................................................................................. 130clearenv ............................................................................................................. 131clearerr ............................................................................................................... 132_clearscreen ....................................................................................................... 133clock .................................................................................................................. 134clock_getres ....................................................................................................... 135clock_gettime .................................................................................................... 136clock_nanosleep ................................................................................................ 137clock_settime ..................................................................................................... 138clone .................................................................................................................. 139close, _close ...................................................................................................... 141closedir, _wclosedir ........................................................................................... 142_cmdname ......................................................................................................... 144_commit ............................................................................................................. 145_control87 ......................................................................................................... 146_controlfp .......................................................................................................... 148copysign ............................................................................................................ 150cos ..................................................................................................................... 151cosh ................................................................................................................... 152cprintf ................................................................................................................ 153cputs .................................................................................................................. 154creat, _creat, _wcreat ......................................................................................... 155cscanf ................................................................................................................. 157ctime Functions ................................................................................................. 158ctime_s, _wctime_s ........................................................................................... 160cwait, _cwait ..................................................................................................... 162delay .................................................................................................................. 165_dieeetomsbin .................................................................................................... 166difftime .............................................................................................................. 167dirname .............................................................................................................. 168_disable ............................................................................................................. 169_displaycursor ................................................................................................... 170div ...................................................................................................................... 171_dmsbintoieee .................................................................................................... 172

    vii

  • Table of Contents

    _dos_allocmem .................................................................................................. 173_dos_close ......................................................................................................... 174_dos_commit ..................................................................................................... 175_dos_creat ......................................................................................................... 176_dos_creatnew ................................................................................................... 177dosexterr ............................................................................................................ 179_dos_find... Functions ....................................................................................... 181_dos_freemem ................................................................................................... 184_dos_getdate ...................................................................................................... 185_dos_getdiskfree ............................................................................................... 186_dos_getdrive .................................................................................................... 187_dos_getfileattr .................................................................................................. 188_dos_getftime .................................................................................................... 190_dos_gettime ..................................................................................................... 192_dos_getvect ...................................................................................................... 193_dos_keep .......................................................................................................... 194_dos_open ......................................................................................................... 195_dos_read .......................................................................................................... 197_dos_setblock .................................................................................................... 198_dos_setdate ...................................................................................................... 200_dos_setdrive ..................................................................................................... 202_dos_setfileattr .................................................................................................. 203_dos_setftime .................................................................................................... 205_dos_settime ...................................................................................................... 207_dos_setvect ...................................................................................................... 209_dos_write ......................................................................................................... 210dup, _dup ........................................................................................................... 211dup2, _dup2 ....................................................................................................... 212_dwDeleteOnClose ............................................................................................ 214_dwSetAboutDlg ............................................................................................... 215_dwSetAppTitle ................................................................................................ 216_dwSetConTitle ................................................................................................. 217_dwShutDown ................................................................................................... 218_dwYield ........................................................................................................... 219ecvt, _ecvt, _wecvt ............................................................................................ 220_ellipse, _ellipse_w, _ellipse_wxy .................................................................... 222_enable .............................................................................................................. 224endhostent ......................................................................................................... 225endnetent ........................................................................................................... 226endprotoent ........................................................................................................ 227endpwent ........................................................................................................... 228endservent ......................................................................................................... 229_endthread, _endthreadex ................................................................................. 230eof, _eof ............................................................................................................. 232erf ...................................................................................................................... 233erfc ..................................................................................................................... 234exec... Functions ................................................................................................ 235_Exit, _exit ........................................................................................................ 239exit ..................................................................................................................... 240exp ..................................................................................................................... 241exp2 ................................................................................................................... 242expm1 ................................................................................................................ 243

    viii

  • Table of Contents

    _expand Functions ............................................................................................ 244fabs .................................................................................................................... 246fclose ................................................................................................................. 247fcloseall ............................................................................................................. 248fcvt, _fcvt, _wfcvt ............................................................................................. 249fdim ................................................................................................................... 251fdopen, _fdopen, _wfdopen ............................................................................... 252feclearexcept ..................................................................................................... 253fedisableexcept, __fedisableexcept ................................................................... 254feenableexcept, __feenableexcept ..................................................................... 255fegetenv ............................................................................................................. 256fegetexceptflag .................................................................................................. 257fegetround ......................................................................................................... 258feholdexcept ...................................................................................................... 259feof .................................................................................................................... 260feraiseexcept ...................................................................................................... 261ferror .................................................................................................................. 262fesetenv ............................................................................................................. 263fesetexceptflag ................................................................................................... 264fesetround .......................................................................................................... 265fetestexcept ........................................................................................................ 266feupdateenv ....................................................................................................... 267fflush ................................................................................................................. 268ffs ....................................................................................................................... 269fgetc, fgetwc ...................................................................................................... 270fgetchar, _fgetchar, _fgetwchar ......................................................................... 271fgetpos ............................................................................................................... 272fgets, fgetws ...................................................................................................... 273_fieeetomsbin .................................................................................................... 274filelength, _filelength, _filelengthi64 ................................................................ 275FILENAME_MAX ........................................................................................... 276fileno ................................................................................................................. 277_findclose .......................................................................................................... 278_findfirst, _findfirsti64, _wfindfirst, _wfindfirsti64 ......................................... 279_findnext, _findnexti64, _wfindnext, _wfindnexti64 ....................................... 281_finite ................................................................................................................ 283_floodfill, _floodfill_w ...................................................................................... 284floor ................................................................................................................... 285flushall ............................................................................................................... 286fma ..................................................................................................................... 287fmax ................................................................................................................... 288fmin ................................................................................................................... 289fmod .................................................................................................................. 290_fmsbintoieee .................................................................................................... 291fnmatch .............................................................................................................. 292fopen, _wfopen .................................................................................................. 294fopen_s, _wfopen_s ........................................................................................... 296FP_OFF ............................................................................................................. 299FP_SEG ............................................................................................................. 300fpclassify ........................................................................................................... 301_fpreset .............................................................................................................. 302fprintf, fwprintf ................................................................................................. 303

    ix

  • Table of Contents

    fprintf_s, fwprintf_s .......................................................................................... 304fputc, fputwc ..................................................................................................... 306fputchar, _fputchar, _fputwchar ........................................................................ 307fputs, fputws ...................................................................................................... 308fread ................................................................................................................... 309free Functions .................................................................................................... 310_freect ................................................................................................................ 312freopen, _wfreopen ........................................................................................... 313freopen_s, _wfreopen_s .................................................................................... 314frexp .................................................................................................................. 316fscanf, fwscanf .................................................................................................. 317fscanf_s, fwscanf_s ........................................................................................... 318fseek .................................................................................................................. 320fsetpos ............................................................................................................... 322_fsopen, _wfsopen ............................................................................................. 323fstat, _fstat, _fstati64, _wfstat, _wfstati64 ........................................................ 326fsync .................................................................................................................. 330ftell .................................................................................................................... 332ftime .................................................................................................................. 333_fullpath, _wfullpath ......................................................................................... 334fwide .................................................................................................................. 336fwrite ................................................................................................................. 337gcvt, _gcvt, _wgcvt ........................................................................................... 338_getactivepage ................................................................................................... 339_getarcinfo ......................................................................................................... 340_getbkcolor ........................................................................................................ 342getc, getwc ......................................................................................................... 343getch .................................................................................................................. 344getchar, getwchar .............................................................................................. 345getche ................................................................................................................ 346_getcliprgn ......................................................................................................... 347getcmd ............................................................................................................... 348_getcolor ............................................................................................................ 349_getcurrentposition, _getcurrentposition_w ...................................................... 350getcwd, _wgetcwd ............................................................................................. 351_getdcwd, _wgetdcwd ....................................................................................... 353getdelim ............................................................................................................. 355_getdiskfree ....................................................................................................... 356_getdrive ............................................................................................................ 357getegid ............................................................................................................... 358getenv, _wgetenv ............................................................................................... 359getenv_s ............................................................................................................. 360geteuid ............................................................................................................... 362_getfillmask ....................................................................................................... 363_getfontinfo ....................................................................................................... 364getgid ................................................................................................................. 365_getgtextextent .................................................................................................. 366_getgtextvector .................................................................................................. 367gethostbyname ................................................................................................... 368gethostent .......................................................................................................... 370_getimage, _getimage_w, _getimage_wxy ....................................................... 372getline ................................................................................................................ 374

    x

  • Table of Contents

    _getlinestyle ...................................................................................................... 375_getmbcp ........................................................................................................... 376getnetbyaddr ...................................................................................................... 377getnetbyname .................................................................................................... 378getnetent ............................................................................................................ 379getopt ................................................................................................................. 380_get_osfhandle .................................................................................................. 383getpgrp ............................................................................................................... 385_getphyscoord ................................................................................................... 386getpid, _getpid ................................................................................................... 387_getpixel, _getpixel_w ...................................................................................... 388_getplotaction .................................................................................................... 389getppid ............................................................................................................... 390getprotobyname ................................................................................................. 391getprotobynumber ............................................................................................. 392getprotoent ......................................................................................................... 393getpwent ............................................................................................................ 394getpwnam .......................................................................................................... 395getpwuid ............................................................................................................ 396gets, _getws ....................................................................................................... 397gets_s ................................................................................................................. 398getservbyname ................................................................................................... 399getservbyport ..................................................................................................... 400getservent .......................................................................................................... 401_gettextcolor ...................................................................................................... 402_gettextcursor .................................................................................................... 403_gettextextent .................................................................................................... 404_gettextposition ................................................................................................. 406_gettextsettings .................................................................................................. 407_gettextwindow ................................................................................................. 408gettid .................................................................................................................. 409getuid ................................................................................................................. 410_getvideoconfig ................................................................................................. 411_getviewcoord, _getviewcoord_w, _getviewcoord_wxy .................................. 414_getvisualpage ................................................................................................... 415_getw ................................................................................................................. 416_getwindowcoord .............................................................................................. 417gmtime Functions .............................................................................................. 418gmtime_s ........................................................................................................... 420_grow_handles .................................................................................................. 422_grstatus ............................................................................................................ 424_grtext, _grtext_w ............................................................................................. 425halloc ................................................................................................................. 427_harderr, _hardresume, _hardretn ..................................................................... 428_hdopen ............................................................................................................. 431_heapchk Functions ........................................................................................... 432_heapenable ....................................................................................................... 434_heapgrow Functions ........................................................................................ 435_heapmin Functions .......................................................................................... 436_heapset Functions ............................................................................................ 437_heapshrink Functions ...................................................................................... 439_heapwalk Functions ......................................................................................... 440

    xi

  • Table of Contents

    hfree ................................................................................................................... 443hypot .................................................................................................................. 444ignore_handler_s ............................................................................................... 445ilogb ................................................................................................................... 446_imagesize, _imagesize_w, _imagesize_wxy ................................................... 447imaxabs .............................................................................................................. 448imaxdiv .............................................................................................................. 449inp ...................................................................................................................... 450inpd .................................................................................................................... 451inpw ................................................................................................................... 452int386 ................................................................................................................. 453int386x ............................................................................................................... 454int86 ................................................................................................................... 456int86x ................................................................................................................. 457intdos ................................................................................................................. 458intdosx ............................................................................................................... 459intr ..................................................................................................................... 461intrf .................................................................................................................... 462isalnum, iswalnum ............................................................................................. 463isalpha, iswalpha ............................................................................................... 464isascii, __isascii, iswascii .................................................................................. 465isatty, _isatty ..................................................................................................... 467isblank, iswblank ............................................................................................... 468iscntrl, iswcntrl .................................................................................................. 470iscsym, __iscsym, __iswcsym ........................................................................... 471iscsymf, __iscsymf, __iswcsymf ....................................................................... 473isdigit, iswdigit .................................................................................................. 475isfinite ................................................................................................................ 476isgraph, iswgraph .............................................................................................. 477isinf .................................................................................................................... 478isleadbyte ........................................................................................................... 479islower, iswlower .............................................................................................. 481_ismbbalnum ..................................................................................................... 482_ismbbalpha ...................................................................................................... 484_ismbbgraph ...................................................................................................... 486_ismbbkalnum ................................................................................................... 488_ismbbkana ........................................................................................................ 490_ismbbkalpha .................................................................................................... 492_ismbbkprint ..................................................................................................... 494_ismbbkpunct .................................................................................................... 496_ismbblead ........................................................................................................ 498_ismbbprint ....................................................................................................... 500_ismbbpunct ...................................................................................................... 502_ismbbtrail ......................................................................................................... 504_ismbcalnum ..................................................................................................... 506_ismbcalpha ....................................................................................................... 508_ismbccntrl ........................................................................................................ 510_ismbcdigit ........................................................................................................ 512_ismbcgraph ...................................................................................................... 514_ismbchira ......................................................................................................... 516_ismbckata ......................................................................................................... 518_ismbcl0 ............................................................................................................ 520

    xii

  • Table of Contents

    _ismbcl1 ............................................................................................................ 522_ismbcl2 ............................................................................................................ 524_ismbclegal ........................................................................................................ 526_ismbclower ...................................................................................................... 528_ismbcprint ........................................................................................................ 530_ismbcpunct ...................................................................................................... 532_ismbcspace ...................................................................................................... 534_ismbcsymbol .................................................................................................... 536_ismbcupper ...................................................................................................... 538_ismbcxdigit ...................................................................................................... 540isnan .................................................................................................................. 542isnormal ............................................................................................................. 543isprint, iswprint ................................................................................................. 544ispunct, iswpunct ............................................................................................... 545isspace, iswspace ............................................................................................... 547isupper, iswupper .............................................................................................. 549iswctype ............................................................................................................. 550isxdigit, iswxdigit .............................................................................................. 552itoa, _itoa, _itow ................................................................................................ 553kbhit, _kbhit ...................................................................................................... 555labs .................................................................................................................... 556ldexp .................................................................................................................. 557ldiv ..................................................................................................................... 558lfind ................................................................................................................... 559lgamma .............................................................................................................. 561lgamma_r ........................................................................................................... 562_lineto, _lineto_w .............................................................................................. 563llabs ................................................................................................................... 565lldiv ................................................................................................................... 566localeconv ......................................................................................................... 567localtime Functions ........................................................................................... 570localtime_s ........................................................................................................ 572lock .................................................................................................................... 574locking, _locking ............................................................................................... 575log ...................................................................................................................... 577log10 .................................................................................................................. 578log1p .................................................................................................................. 579log2 .................................................................................................................... 580logb .................................................................................................................... 581longjmp ............................................................................................................. 582_lrotl .................................................................................................................. 583_lrotr .................................................................................................................. 584lsearch ............................................................................................................... 585lseek, _lseek, _lseeki64 ..................................................................................... 587lltoa, _lltoa, _lltow ............................................................................................ 590ltoa, _ltoa, _ltow ................................................................................................ 592main, wmain, WinMain, wWinMain ................................................................ 594_makepath, _wmakepath ................................................................................... 598malloc Functions ............................................................................................... 600matherr .............................................................................................................. 602max .................................................................................................................... 604_mbbtombc ........................................................................................................ 605

    xiii

  • Table of Contents

    _mbbtype ........................................................................................................... 606_mbccmp, _fmbccmp ........................................................................................ 609_mbccpy, _fmbccpy .......................................................................................... 611_mbcicmp, _fmbcicmp ...................................................................................... 612_mbcjistojms ..................................................................................................... 614_mbcjmstojis ..................................................................................................... 615_mbclen, _fmbclen ............................................................................................ 616_mbctolower ...................................................................................................... 618_mbctoupper ...................................................................................................... 620_mbctohira ......................................................................................................... 622_mbctokata ........................................................................................................ 624_mbctombb ........................................................................................................ 626_mbgetcode, _fmbgetcode ................................................................................ 627mblen, _fmblen .................................................................................................. 628_mbputchar, _fmbputchar ................................................................................. 631mbrlen, _fmbrlen ............................................................................................... 632mbrtowc, _fmbrtowc ......................................................................................... 635_mbsbtype, _fmbsbtype .................................................................................... 638_mbsnbcat, _fmbsnbcat ..................................................................................... 641_mbsnbcmp, _fmbsnbcmp ................................................................................ 643_mbsnbcnt, _fmbsnbcnt, _strncnt, _wcsncnt .................................................... 644_mbsnbcpy, _fmbsnbcpy ................................................................................... 646_mbsnbicmp, _fmbsnbicmp .............................................................................. 648_mbsnbset, _fmbsnbset ..................................................................................... 649_mbsnccnt, _fmbsnccnt, _strncnt, _wcsncnt ..................................................... 650_mbsnextc, _fmbsnextc, _strnextc, _wcsnextc ................................................. 652mbsrtowcs, _fmbsrtowcs ................................................................................... 654mbsrtowcs_s, _fmbsrtowcs_s ............................................................................ 657mbstowcs, _fmbstowcs ...................................................................................... 660mbstowcs_s, _fmbstowcs_s .............................................................................. 661_mbterm, _fmbterm ........................................................................................... 663mbtowc, _fmbtowc ............................................................................................ 665_mbvtop, _fmbvtop ........................................................................................... 667_memavl ............................................................................................................ 669memccpy, _fmemccpy ...................................................................................... 670memchr, _fmemchr, wmemchr ......................................................................... 671memcmp, _fmemcmp, wmemcmp .................................................................... 672memcpy, _fmemcpy, wmemcpy ....................................................................... 673memcpy_s, wmemcpy_s ................................................................................... 674memicmp, _memicmp, _fmemicmp .................................................................. 675_memmax .......................................................................................................... 676memmove, _fmemmove, wmemmove .............................................................. 677memmove_s, wmemmove_s ............................................................................. 678_m_empty .......................................................................................................... 680memset, _fmemset, wmemset ........................................................................... 682_m_from_int ...................................................................................................... 683min ..................................................................................................................... 684mkdir, _mkdir, _wmkdir ................................................................................... 685MK_FP .............................................................................................................. 686mkstemp ............................................................................................................ 687_mktemp, _wmktemp ........................................................................................ 689mktime ............................................................................................................... 691

    xiv

  • Table of Contents

    mlock ................................................................................................................. 693mlockall ............................................................................................................. 694mmap ................................................................................................................. 695modf .................................................................................................................. 697movedata ........................................................................................................... 698_moveto, _moveto_w ........................................................................................ 699_m_packssdw .................................................................................................... 700_m_packsswb .................................................................................................... 702_m_packuswb .................................................................................................... 704_m_paddb .......................................................................................................... 706_m_paddd .......................................................................................................... 707_m_paddsb ........................................................................................................ 708_m_paddsw ........................................................................................................ 709_m_paddusb ...................................................................................................... 710_m_paddusw ...................................................................................................... 711_m_paddw ......................................................................................................... 712_m_pand ............................................................................................................ 713_m_pandn .......................................................................................................... 714_m_pcmpeqb ..................................................................................................... 715_m_pcmpeqd ..................................................................................................... 716_m_pcmpeqw .................................................................................................... 717_m_pcmpgtb ...................................................................................................... 718_m_pcmpgtd ...................................................................................................... 719_m_pcmpgtw ..................................................................................................... 720_m_pmaddwd .................................................................................................... 721_m_pmulhw ....................................................................................................... 722_m_pmullw ........................................................................................................ 723_m_por .............................................................................................................. 724mprotect ............................................................................................................. 725_m_pslld ............................................................................................................ 726_m_pslldi ........................................................................................................... 727_m_psllq ............................................................................................................ 728_m_psllqi ........................................................................................................... 729_m_psllw ........................................................................................................... 730_m_psllwi .......................................................................................................... 731_m_psrad ........................................................................................................... 732_m_psradi .......................................................................................................... 733_m_psraw .......................................................................................................... 734_m_psrawi ......................................................................................................... 735_m_psrld ............................................................................................................ 736_m_psrldi ........................................................................................................... 737_m_psrlq ............................................................................................................ 738_m_psrlqi ........................................................................................................... 739_m_psrlw ........................................................................................................... 740_m_psrlwi .......................................................................................................... 741_m_psubb .......................................................................................................... 742_m_psubd .......................................................................................................... 743_m_psubsb ......................................................................................................... 744_m_psubsw ........................................................................................................ 745_m_psubusb ....................................................................................................... 746_m_psubusw ...................................................................................................... 747_m_psubw ......................................................................................................... 748

    xv

  • Table of Contents

    _m_punpckhbw ................................................................................................. 749_m_punpckhdq .................................................................................................. 751_m_punpckhwd ................................................................................................. 752_m_punpcklbw .................................................................................................. 753_m_punpckldq ................................................................................................... 755_m_punpcklwd .................................................................................................. 756_m_pxor ............................................................................................................ 757_msize Functions ............................................................................................... 758msync ................................................................................................................ 759_m_to_int .......................................................................................................... 760munlock ............................................................................................................. 761munlockall ......................................................................................................... 762munmap ............................................................................................................. 763nan ..................................................................................................................... 764nearbyint ............................................................................................................ 765nextafter ............................................................................................................. 766nl_langinfo ........................................................................................................ 767nosound ............................................................................................................. 772offsetof .............................................................................................................. 773onexit ................................................................................................................. 774open, _open, _wopen ......................................................................................... 775opendir, _wopendir ........................................................................................... 778_open_osfhandle ............................................................................................... 781_os_handle ......................................................................................................... 784_outgtext ............................................................................................................ 785_outmem ............................................................................................................ 787outp .................................................................................................................... 788outpd .................................................................................................................. 789outpw ................................................................................................................. 790_outtext .............................................................................................................. 791pclose ................................................................................................................. 792_pclose ............................................................................................................... 793perror, _wperror ................................................................................................ 794_pg_analyzechart, _pg_analyzechartms ............................................................ 795_pg_analyzepie .................................................................................................. 797_pg_analyzescatter, _pg_analyzescatterms ....................................................... 799_pg_chart, _pg_chartms .................................................................................... 801_pg_chartpie ...................................................................................................... 804_pg_chartscatter, _pg_chartscatterms ............................................................... 807_pg_defaultchart ................................................................................................ 810_pg_getchardef .................................................................................................. 812_pg_getpalette ................................................................................................... 813_pg_getstyleset .................................................................................................. 815_pg_hlabelchart ................................................................................................. 817_pg_initchart ..................................................................................................... 818_pg_resetpalette ................................................................................................. 820_pg_resetstyleset ............................................................................................... 822_pg_setchardef .................................................................................................. 824_pg_setpalette .................................................................................................... 825_pg_setstyleset .................................................................................................. 827_pg_vlabelchart ................................................................................................. 829_pie, _pie_w, _pie_wxy .................................................................................... 830

    xvi

  • Table of Contents

    _pipe .................................................................................................................. 833_polygon, _polygon_w, _polygon_wxy ............................................................ 836popen ................................................................................................................. 838_popen, _wpopen .............................................................................................. 840pow .................................................................................................................... 842printf, wprintf .................................................................................................... 843printf_s, wprintf_s ............................................................................................. 849putc, putwc ........................................................................................................ 851putch .................................................................................................................. 852putchar, putwchar .............................................................................................. 853putenv, _putenv, _wputenv ............................................................................... 854_putimage, _putimage_w .................................................................................. 857puts, _putws ....................................................................................................... 859_putw ................................................................................................................. 860qsort ................................................................................................................... 861qsort_s ............................................................................................................... 862raise ................................................................................................................... 864rand .................................................................................................................... 866read, _read ......................................................................................................... 867readdir, _wreaddir ............................................................................................. 869realloc Functions ............................................................................................... 872_rectangle, _rectangle_w, _rectangle_wxy ....................................................... 874_registerfonts ..................................................................................................... 876remainder ........................................................................................................... 877_remapallpalette ................................................................................................ 878_remappalette .................................................................................................... 879remove, _wremove ............................................................................................ 880rename, _wrename ............................................................................................ 881rewind ................................................................................................................ 882rewinddir, _wrewinddir ..................................................................................... 883rint ..................................................................................................................... 885rmdir, _rmdir, _wrmdir ..................................................................................... 886_rotl ................................................................................................................... 887_rotr ................................................................................................................... 888round ................................................................................................................. 889sbrk .................................................................................................................... 890scalbn ................................................................................................................. 892scanf, wscanf ..................................................................................................... 893scanf_s, wscanf_s .............................................................................................. 899sched_getparam ................................................................................................. 900sched_get_priority_max .................................................................................... 901sched_get_priority_min ..................................................................................... 902sched_getscheduler ............................................................................................ 903sched_rr_get_interval ........................................................................................ 904sched_setparam ................................................................................................. 905sched_setscheduler ............................................................................................ 906sched_yield ........................................................................................................ 907_scrolltextwindow ............................................................................................. 908_searchenv, _wsearchenv .................................................................................. 909segread ............................................................................................................... 910_selectpalette ..................................................................................................... 911sem_destroy ....................................................................................................... 912

    xvii

  • Table of Contents

    sem_getvalue ..................................................................................................... 913sem_init ............................................................................................................. 914sem_post ............................................................................................................ 915sem_trywait ....................................................................................................... 916sem_wait ............................................................................................................ 917set_constraint_handler_s ................................................................................... 918_setactivepage ................................................................................................... 920_setbkcolor ........................................................................................................ 921setbuf ................................................................................................................. 922_setcharsize, _setcharsize_w ............................................................................. 923_setcharspacing, _setcharspacing_w ................................................................. 925_setcliprgn ......................................................................................................... 927_setcolor ............................................................................................................ 928setenv, _setenv, _wsetenv ................................................................................. 929_setfillmask ....................................................................................................... 931_setfont .............................................................................................................. 933_setgtextvector .................................................................................................. 935sethostent ........................................................................................................... 936setjmp ................................................................................................................ 937_setlinestyle ....................................................................................................... 938setlocale, _wsetlocale ........................................................................................ 940_set_matherr ...................................................................................................... 942_setmbcp ............................................................................................................ 944setmode, _setmode ............................................................................................ 945setnetent ............................................................................................................. 946set_new_handler, _set_new_handler ................................................................. 947_setpixel, _setpixel_w ....................................................................................... 949_setplotaction .................................................................................................... 950setprotoent ......................................................................................................... 951setpwent ............................................................................................................. 952setservent ........................................................................................................... 953_settextalign ...................................................................................................... 954_settextcolor ...................................................................................................... 956_settextcursor .................................................................................................... 957_settextorient ..................................................................................................... 958_settextpath ....................................................................................................... 959_settextposition ................................................................................................. 961_settextrows ....................................................................................................... 962_settextwindow ................................................................................................. 963setvbuf ............................................................................................................... 964_setvideomode ................................................................................................... 965_setvideomoderows ........................................................................................... 968_setvieworg ....................................................................................................... 969_setviewport ...................................................................................................... 970_setvisualpage ................................................................................................... 971_setwindow ....................................................................................................... 972signal ................................................................................................................. 974signbit ................................................................................................................ 977sin ...................................................................................................................... 978sinh .................................................................................................................... 979mbsinit, sisinit ................................................................................................... 980sleep ................................................................................................................... 983

    xviii

  • Table of Contents

    _snprintf, _snwprintf ......................................................................................... 984snprintf, snwprintf ............................................................................................. 986snprintf_s, snwprintf_s ...................................................................................... 988sopen, _sopen, _wsopen .................................................................................... 990sound ................................................................................................................. 994spawn... Functions ............................................................................................. 996_splitpath, _wsplitpath ...................................................................................... 1002_splitpath2, _wsplitpath2 .................................................................................. 1004sprintf, swprintf .....................................