oran
Library Reference
Borland® C++
Version 4.0
Borland may have.patents andbr pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents.
COPYRIGHT © 1987, 1993 by Borland International. All rights reserved. All Borland products are trademarks or registered trademarks of Borland International, Inc. Other brand and product names are trademarks or registered trademarks of their respective holders.
Borland International, Inc.
100 Borland Way, Scotts Valley, CA 95067-3249 PRINTED IN THE UNITED STATES OF AMERICA
1 EOR993
9394959697-9876543 Wi
Contents
Introduction 1 acos, acosl ... 28
alloca .· ... 29
Chapter 1 Library cross-reference 3 asctime ... 30
Reasons to access the run-time library source asin, asinl ... 30
code ... 3 assert ... ',' ... 31
The run-time libraries ... 4 atan, atanl ... 31
The static libraries ... : ... 4 atan2, atan21 ... ' ... 32
The dynamic-link libraries ... 6 atexit ... 33
The Borland C++ header files ... 7 atof, _atold ... 33
Library routines by category ... 9 atoi ... 34
C++ prototyped routines ... 9 atol ... 35
Classification routines ... 10 atold ... 35
Console I/O routines ... 10 bdos ... 35
Conversion routines ... 10 bdosptr ... , ... 36
Diagnostic routines ... 11 _beginthread ... 37
Directory control routines ... 11 _beginthreadNT ... 37
EasyWin routines ... 11 biosequip ... 39
Inline routines ... 12 _bios_equiplist ... 40
Input / output routines ... 12 bioskey ... 41
Interface routines ... 13 biosmemory ... 42
International locale API routines ... 14 bios memsize ... 42
Manipulation routines ... 14 biosthne ... : ... 43
Math routines ... ; ... 15 _bios_timeofday ... 43
Memory routines ... 16 bsearch ... " ... 44
Miscellaneous routines ... 16 cabs, cabsl ... 45
Obsolete definitions ... 16 calloc ... 46
Process control routines ... 17 ceil, ceill ... 46
Time and date routines ... 18 c exit ... " ... : ... 47
Variable argument list routines ... 18 - c;xit ... 47
Chapter 2 The main function 19 ~gets ... 48
19 chain intr ... 48
Arguments to main ... - - 49
Examining arguments to main ... 20 chdir ... 49
21 chdrive ... : ... . Wildcard arguments ... . . . . - 50
D GS OBJ 21 chmod ... . Linking with WIL AR. ) ... 22 ~hmod ... ~ ... 50
Using -p (Pascal calling conventions ... 22 chsize ... 51
The value main returns. . . .. . . 51
Passing file information to child processes ... 22 _clear87 ... " 52 23 clearerr ... . Multithread programs. . . 52
clock ... '" .... '.' ... .
Chapter 3 Run-time functions 25 close ... 53
Sample function entry ... " ... 25 ~lose ... " ... , ... 53
abort ... 27 closedir ... 53
abs ... 27 ,._ clreol ... 54
_control87 ... 55 eof ... 86
cos, cosl ... 55 execl, execle, execlp, execlpe, execv, cosh, coshl ... 56 execve,execvp,execvpe ... , ... 87
country ... 57 _exit ... 89
cprintf ... 58
cputs ... '" .. 59
exit ... 90
exp, expl ... 90
_creat ... 59 _expand ... 91
creat ... 59 fabs, fabsl ... 91
creatnew ... 60 farcalloc ... 92
creattemp ... 61 farfree ... 92
_crotl, _crotr ... 62 farmalloc ... 93
cscanf ... 63 farrealloc ... 93
ctime ... ' ... 63 fclose ... 94
ctrlbrk ... 64 fcloseall ... 94
cwait ... 65 fcvt ... 95
delline ... 66 fdopen ... 95
difftime ... 66 feof ... 96
disable, _disable, enable, _enable ... 67 ferror ... 97
div ... 67 fflush ... 97
_dos_close ... 68 fgetc ... ',' ... 98
_dos_commit ... 68 fgetchar . . . 98
_dos_creat ... 69 fgetpos ... " ... 98
_dos_creatnew ... 69 fgets .. , ... 99
dosexterr ... 70 filelength ... 99
_dos_findfirst ... 71 fileno ... 100
_dos_findnext ... 72 findfirst ... 100
_dos_getdate,_dos_setdate, getdate, setdate .. , 73 findnext ... , ... 102
_dos~etdiskfree ... 74 floor, floorl ... ' ... 103
_dos~etdrive, _dos_setdrive ... 75 flushall ... 103
_dos~etfileattr, _dos_setfileattr ... 75 _fmemccpy ... 103
_dos_getftime, _dos_setftime ... 76 _fmemchr ... 104
_dos_gettime, _dos_settime ... 77 _fmemcmp ... : ... 104
_dos~etvect ... 78 _fmemcpy ... 104
_dos_open ... 78 _fmemicmp ... 104
_dos_read ... 79 _fmemmove ... 104
_dos_setdate ... 80 _fmemset' ... 104
_dos_setdrive ... 80 fmod, fmodl ... 104
_dos_setfileattr ... 80 _fmovmem ... 105
_dos_setftime ... 81 fnmerge ... 105
_dos_settime ... 81 fnsplit ... 106
_dos_setvect ... 81 fopen ... 107
dostounix ... 81 FP _OFF, FP _SEG ... ~ ... 108
_dos_write ... 82 _fpreset ... ' ... ' ... 108
dup ... : ... 82 fprintf ... 109
dup2 ... ' ... 83 fputc ... 110
ecvt ... , .... 84 fputchar ... 110
__ emit_ _ ... 84 fputs ... ' ... 110
enable, _enable ... 86 fread ... 111
freopen ... 112 _heap set ... 140
frexp, frexpl ... 113 heapwalk ... 140
fscanf ... 113 _heapwalk ... 141
fseek ... 114 highvideo ... 141
fsetpos ... 115 hypot, hypotl ... 141
_fsopen ... 115 _InitEasyWin ... 142
fstat, stat ... 116 inp ... 142
_fstr* ... 118 inport ... 143
ftell ... 118 inportb ... 143
ftime ... 119 inpw ... l44 _fullpath ... 120 insline ... 144
fwrite ... 120 int86 ... 145
gcvt ... 121 int86x ... 145
geninterrupt ... 121 intdos ... 146
getc ... 122 intdosx ... ~ . . 147
getcbrk ... 122
getch ... : ... 122
intr ... " ... 147
ioctl ... 148
getchar ... 123 isalnum ... 150
getche ... 123 isalpha ... 150
getcurdir ... 124 isascii . . . 150
getcwd ... 124 isatty ... 151
getdate ... 125 iscntrl ... 151
~etdcwd ... 125 isdigit ... 152
getdfree ... 126 isgraph ... 152
getdisk, setdisk ... 126 islower . . . 152
getdta ... 127 isprint ... 153
getenv ... 127 ispunct . . . 153
getfat ... 128 isspace ... ~ . . . 154
getfatd ... 128 isupper ... 154
getftime, setftime ... 129 isxdigit .... ' ... 154
getpass . ' ... 130 itoa ... 155
getpid ... 130 kbhit ... 155
getpsp ... 130 labs ... 156
gets ... 131 ldexp, ldexpl ... 156
gettext ... 131 ldiv ... 157
gettextinfo ... 132 lfind ... 157
gettime, settime ... 133 localeconv . . . 158
getvect, setvect ... 134 local time ... 160
getverify ... 134 lock ... 161
getw ... 135 locking ... 161
gmtime ... 135 log, logl ... ' ... 162
gotoxy ... 136 log10, loglOl ... ,163
_heapadd ... 137 longjmp ... 164
heapcheck ... 137 lowvideo ... 165
heapcheckfree ... 137 _lrotl, _lrotr ... ' ... 165
heapchecknode ... 138 lsearch ... 166
_heapchk ... 138 lseek ... 166
heapfillfree ... 139 ltoa ... 167
malloc ... 169 puttext ... 203
_matherr,_matherrl ... 169 putw ... 204
max ... 171 qsort ... 204
mblen ... ' ... 172 raise ... 205
mbstowcs ... 172 rand ... 206
mbtowc ... 173 random ... 207
memccpy, _fmemccpy ... 174 randomize ... 207
memchr,_fmemchr ... 174 _read ... 207
memcmp,_fmemcmp ... 175 read ... 207
memcpy, _fmemcpy ... 175 readdir ... 208
memicmp, jmemicmp ... 176 realloc ... 209
memmove, _fmemmove ... 176 remove ... 210
memset, _fmemset ... 177 rename ... 210
min ... ' ... 177 rewind ... 211
mkdir ... 178 rewinddir ... 211
MK_FP ... 178 rmdir ... 212
mktemp ... 179 rmtmp ... 212
mktime ... 179 _rotl, _rotr ... 213
modf, modfl ... 180 _rtl_chmod ... 213
movedata ... ' ... 180 _rtl_close ... 214
movmem, _fmovmem ; ... 181 _rtl_creat ... 214
movetext ... 181 _rtl_heapwalk ... 215
_msize ... 182 _rtl_open ... 216
normvideo ... 182 _rtl_read ... 217
offsetof ... 182 _rtl_write ... ,218
_open ... 183 scanf ... 219
open ... 183 _searchenv ... 22,6 opendir ... 185 searchpath ... 227
outp ... 185 _searchstr ... 227
oUtport, outportb ... 186 segread ... 228
outpw ... 186 setbuf ... 228
parsfnm ... 187 setcbrk . ',' ... 229
_pclose ... 187 ...:..,setcursortype ... : ... 230
peek ... , ... 188 setda te ... 230
peekb ... 188 setdisk ... 230
perror ... : ... 189 setdta ... 230
_pipe ... 190 setftime ... 231
poke ... , .191 setjmp ... 231
pokeb ... 192 setlocale ... 232
poly, polyl ... 192 setmem ... 235
_popen ... 192 setmode ... 235
pow, powl ... 193 settime ... 236
pow10, pow10l ... 194 setvbuf ... 236
printf ... 195 setvect ... 237
putc ... 201 setverify ... 237
putch ... 201 signal ... 237
putchar ... 202 sin, sinl ... 241
putenv ... 202 sinh, sinhl ... 241
sopen ... 242 system ... 272
spawnl, spawnle, spawnlp, spawnlpe, spawnv, tan, tanl ... . . . 273
spawnve, spawnvp, spawnvpe ... 244 tanh, tanhl ... 273
_splitpath ... 247 tell ... 274
sprintf ... 248 tempnam ... 274
sqrt, sqrtl ... 249 textattr ... 275
srand ... 249 textbackground ... , ... 277
sscanf . " ... 250 textcolor ... 278
stackavail ... 250 textmode ... 279
stat ... ~ .... 251 time ... 280
_status87 ... 251 tmpfile ... : ... ,280
stime ... 251 tmpnam ... 281
stpcpy ... 251 to ascii ... 282
strcat, _fstrcat ... 252 _tolower ... 282
strchr, _fstrchr ... 252 tolower ... 282
strcmp, '_fstrcmp ... 253 _toupper ... 283
strcmpi ... 253 toupper ... 283
. strcoll ... 254 tzset ... 283
strcpy, _fstrcpy ... 255 ultoa ... 285
strcspn, _fstrcspn ... 255 umask ... 285
_strdate ... 255 ungetc ... 286
strdup, _fstrdup ... 256 ungetch ... 286
_strerror ... 256 unixtodos ... 287
strerror ... 257 unlink ... 287
strftime ... 257 unlock ... 288
stricmp, _fstricmp ... 259 utime ... 288
strlen, _fstrlen ... 260 va_arg,va_end,va_start ... 289
strlwr, _fstrlwr ... 260 vfprintf ... 290
strncat, _fstmcat ... 261 vfscanf ... 290
strncmp, _fstmcmp ... 261 vprintf ... 291
strncmpi ... 262 vscanf ... 292
strncpy, _fstrncpy ... 262 vsprintf ... ~ ... , ... 293
stmicmp, _fstmicmp ... 263 vsscanf ... 293
strnset, _fstmset ... 263 wait ... 294
strpbrk, _fstrpbrk ... 264 wcstombs ... 295
strrchr, _fstrrchr ... 264 wctomb ... 295
strrev, _fstrrev ... 265 wherex ... 296
strset, _fstrset ... 265 wherey ... 296
strspn, _fstrspn ... 266 window ... 297
strstr, _fstrstr ... 266 _write ... 297
_strtime ... 266 write ... 298
strtod, _strtold ... 267
strtok, _fstrtok ... 268
strtol ... 269
_strtold ... 270
strtoul ... 270
strupr, jstrupr ... 270
strxfrm ... 271
Chapter 4 Global variables 299 _8087 ... 299
_argc ... , ... 299
_argv ... 300
_ctype ... 300
_daylight ... " ... " ... 300
_directvideo ... 301
_environ ... 301
ermo, _doserrno, _sys_errlist, _sys_nerr ... 302
jloatconvert ... 304
_fmode ... 305
_new_handler ... 305
_osmajor, _osminor, _osversion ... 306
_psp ... 307
_threadid ... 307
__ throwExceptionName, __ throwFileName, __ throwLineNumber ... ' ... 307
_timezone ... 308
_tzname ... 308
_version ... 308
_ wscroll ... 309
Chapter 5 The C++ iostream classes 311 conbuf class ... 311
Public constructor ... 311
Public member functions ... 311
constream class ... 313
Public constructor ... 313
Public member functions ... 313
filebuf class ... 313
Public constructors ... 314
Public data members ... 314
Public member functions ... 314
fstream class ... 315
Public constructors ... 316
Public member functions ... 316
fstreambase class ... 316
Public constructors ... 316
Public member functions ... 317
ifstream class ... 317
Public constructors ... 317
Public member functions ... 318
ios class ... ; ... 318
Public data members ... , ... 318
Protected data members ... 319
Public constructor ... 320
Protected constructor ... 320
Public member functions ... 320
Protected member functions ... 322
iostream class ... 322
Public constructor ... 322
iostream_ withassign class ... 322
Public constructor ... ' .. 323
Public member functions ... 323
istream class ... 323
Public constructor ... 323
Public member functions ... 323
Protected member functions ... 325
istream_ withassign class ... 325
Public constructor ... 325
Public member functions ... 325
istrstream class ... 325
Public constructors ... 326
of stream class . . . 326
Public constructors ... 326
Public member functions ... 327
ostream class ... 327
Public constructor ... 327
Public member functions ... 327
ostream_withassign class ... 328
Public constructor ... 328
Public member functions ... 328
ostrstream class ... 328
Public constructors ... 328
Public member functions ... 329
streambuf class ... 329
Public constructors ... 329
Public member functions ... 330
Protected member functions ... 331
strstreambase class ... 332
Public constructors ... 332
Public member functions ... 332
strstreambuf class ... 332
Public constructors ... 333
Public member functions ... 333
strstream class ... 334
Public constructors ... 334
Public member function ... 334
Chapter 6 Persistent stream classes and macros 335 The persistent streams class hierarchy ... 335
fpbase class ... 336
Constructors ... 336
Public member functions ... 336
ifpstream class ... 336
Public constructors ... 337
Public member functions ... 337
ipstream class ... 337
Public constructors ... 337
Public member functions ... 337
Protected constructors ... 339
Protected member functions ... 339
Friends ... 340
ofpstream class ... 340
Public constructors ... 340
Public member functions ... 341
opstream class ... 341
Public constructors and destructor ... 341
Public member functions ... 341
Protected constructors ... 343
Protected member functions ... 343
Friends ... 343
pstream class ... 344
Type definitions ... 344
Public constructors and destructor ... 344
Public member functions ... 344
Operators ... 345
Protected data members ... 345
Protected constructors ... 345
Protected member functions ... 346
TStreamableBase class ... 346
Type definitions ... 346
Public destructor ... , ... 346
Public member functions ... 346
TStreamableClass class ... 347
Public constructor ... 347
Friends ... ' ... 348
TStreamer class ... 348
Public member functions ... 348
Protected constructors ... 348
Protected member functions ... 348
__ DELTA macro ... 349
DECLARE_STREAMABLE macro ... 349
DECLARE_STREAMABLE_FROM_BASE macro ... 350
DECLARE_ABSTRACT_STREAMABLE macro ... 350
DECLARE_STREAMER macro ... 350
DECLARE_STREAMER_FROM_BASE macro . 351 DECLARE_ABSTRACT_STREAMER macro .. 351
DECLARE_ CASTABLE macro ... 351
DECLARE_STREAMABLE_ OPS macro ... 351
DECLARE_STREAMABLE_CTOR macro ... 351
IMPLEMENT_STREAMABLE macros ... 352
IMPLEMENT_STREAMABLE_CLASS macro . 352 IMPLEMENT_STREAMABLE_CTOR macros . 352 IMPLEMENT_STREAMABLE_POINTER macro ... 353
IMPLEMENT_CASTABLE_ID macro ... 353
IMPLEMENT_ CASTABLE macros ... 353
IMPLEMENT_STREAMER macro ... 353
IMPLEMENT_ABSTRACT_STREAMABLE IMPLEMENT_STREAMABLE_FROM_BASE macro ... 354
Chapter 7 The C++ container classes 355 TMArrayAsVector template .. '" ... 355
Type definitions ... 355
Public constructors ... 355
Public member functions ... 356
Protected member functions ... 358
Operators· ... 359
TMArrayAsVectorIterator template ... 359
Public constructors ... 359
Public member functions ... 359
Operators ... 359
TArrayAsVector template ... 360
Public constructors ... 360
TArrayAsVectorIterator template ... 360
Public constructors ... 360
TMIArrayAsVector template ... '" .. 360
Type definitions . . . 360
Public constructors ... 361
Public member functions ... 361
Protected member functions ... 363
Operators ... 364
TMIArrayAsVectorIterator template ... 364
Public constructors ... 364
Public member functions ... 364
Operators ... 365
TIArrayAsVector template ... 365
Public constructors ... 365
TIArrayAsVectorIterator template ... 365
Public constructors ... 365
TMSArray As Vector template ... 366
Public constructors ... 366
TMSArrayAsVectorIterator template ... 366
Public constructors ... 366
TSArrayAsVector template ... 366
Public constructors ... 366
TSArrayAsVectorIterator template ... 367
Public constructors ... 367
TISArray As Vector template ... 367
Public constructors ... 367
TISArrayAsVectorIterator template ... 367
Public constructors ... 367
TMISArrayAsVector template ... 368
Public constructors ... 368
TMDDAssociation template ... 368
Public constructors ... 368
Public member functions ... 368
Operators ... 369 Operators ... 380
TDDAssociation template ... 369 TIBinarySearchTreelmp template ... 381
Public constructors ... 369 Public member functions ... , ... 381
TMDIAssociation template ... 369 Protected member functions ... 382
Public constructors ... 370 TIBinarySearchTreeIteratorImp template ... 382
Public member functions ... 370 Public constructors ... 382
Operators ... 370 Public member functions ... 382
TDIAssociation template ... 370 Operators ... 382
Public constructors ... 370 TMDequeAsVector template ... 383
TMIDAssociation template ... 371 Type definitions ... 383
Protected data members ... 371 Public constructors ... 383
Public constructors ... 371 Public member functions ... 383
Public member functions ... 371 Protected data members ... , ... 385
Operators ... 372 Protected member functions ... 385
TIDAssociation template ... ~ .... 372
Public constructors ... " ... 372
TMDequeAsVectorIterator template ... 385
Public constructors ... 386
TMIIAssociation template ... 372 Public member functions . ; ... 386
Public constructors ... 372 Operators ... 386
Public member functions ... 373 TDequeAs Vector template ... 386
Operators ... 373 Public constructors ... 386
TIIAss~ciation template ... 373 TDequeAsVectorIterator template ... 387
Public constructors ... 373 Public constructors ... 387
TMBagAsVector template ... 374 TMIDequeAs Vector template ... 387
Type definitions ... 374 Type definitions ... 387
Public constructors ... 374 Public constructors ... 387
Public member funct,ions ... 374 Public member functions ... 387
Protected member functions ... 375 TMIDequeAsVectorIterator template ... 389
TMBagAsVectorIterator template ... 375 Public constructors ... 389
Public constructors ... 375 TIDequeAs Vector template ... 389
TBagAsVector template ... 376 Public constructors ... 389
Publi<; constructors ... 376 TIDequeAs VectorIterator template ... 390
TBagAsVectorIterator template ... 376 Public constructors ... 390
Public constructors ... 376 TMDequeAsDoubleList template ... 390
TMIBagAsVector template ... 376 Type definitions ... 390
Type definitions ... ·376 Public member functions ... 390
Public constructors ... 377 TMDequeAsDoubleListIterator template ... 392
Public member functions ... 377 Public constructors ... 392
TMIBagAsVectorIterator template ... 378 TDequeAsDoubleList template ... 392
Public constructors .. ; ... 378 TDequeAsDoubleListIterator template ... 392
TIBagAsVector template ... 378 Public constructors ... 392
Public constructors ... 378 TMIDequeAsDoubleList template ... 392
TIBagAsVectorIterator template ... 379 Type definitions ... 392
Public constructors ... 379 Public member functions ... 393
TBinarySearchTreelmp template ... 379 TMIDequeAsDoubleListIterator template .... 394
Public member functions ... 379 Public constructors ... 394
Protected member functions ... 380 TIDequeAsDoubleList template ... 395
TBinarySearchTreeIteratorImp template ... 380 TIDequeAsDoubleListIterator template ... 395
Public constructors ... 380 Public constructors ... 395
Protected data members ... 395 Public constructors ... 407
Public constructors ... 395 TMIDoubleListlmp template ... 407
Public member functions ... 395 Type definitions ... 407
TMDictionary AsHashTableIterator template .. 396 Public member functions ... 407
Public constructors ... 396 Protected member functions ... ' 409
Public member functions ... 396 TMIDoubleListIteratorImp template ... 409
Opera tors ... 397 Public constructors ... 409
TDictionaryAsHashTable template ... 397 Public member functions ... 409
Public constructors ... 397 Operators ... 409
TDictionary AsHashTableIterator template .... 397 TIDoubleListlmp template ... 410
Public constructors ... 398 TIDoubleListIteratorImp template ... 410
TMIDictionary AsHashTable template ... 398 Public constructors ... 410
Public constructors ... 398 TMISDoubleListlmp template ... 410
Public member functions ... 398 Protected member functions ... 410
TMIDictionary AsHashTableIterator template . 399 TMISDoubleListIteratorImp template ... 411
Public constructors ... 399 Public constructors ... 411
Public member functions ... 399 TISDoubleListlmp template ... 411
Operators ... 399 TISDoubleListlteratorImp template ... 411
TIDictionaryAsHashTable template ... 400 Public constructors ... 411
Public constructors ... 400 TMHashTablelmp template ... 411
TIDictionary AsHashTableIterator template ... 400 Public constructors and destructor ... 411
Public constructors ... 400 Public member functions ... 412
TDictionary template ... 400 TMHashTableIteratorImp template ... 412
TDictionaryIterator template ... 400 Public constructors and destructor ... 412
Public constructors ... 401 Public member functions ... 413
TMDoubleListElement template ... 401 Operators ... 413
Public data members ... 401 THashTablelmp template ... 413
Public constructors ... 401 Public constructors ... , ... 413
Operators ... 401 THashTableIteratorImp template ... 414
TMDoubleListImp template ... 402 Public constructors ... 414
Type definitions ... 402 TMIHashTablelmp template ... 414
Public constructors ... 402 Public constructors ... 414
Public member functions ... 402 Public member functions ... , ... 414
Protected data members ... 403 TMIHashTableIteratorImp template' ... 415
Protected member functions ... 403 Public constructors ... ' ... 415
TMDoubleListIteratorImp template ... 404 Public member functions ... ; 415
Public constructors ... 404 Operators' ... " ... 415
Public member functions ... 404 TIHashTablelmp template ... 416
Operators ... 404 Public constructors ... 416
TDoubleListlmp template : '" ... 405 TIHashTableIteratorImp template ... 416
Public constructors ... 405 Public constructors ... 416
TDoubleListIteratorImp template ... 405 TMListElement template ... 416
Public constructors ... 405 Public data members ... 416
TMSDoubleListlmp template ... 406 Public constructors ... 417
Protected member functions ... 406 Operators ... 417
TMSDoubleListIteratorImp template ... 406 TMListImp template ... 417
Public constructors ... , ... 406 Type definitions ... 417
TSDoubleListlmp template ... 406 Public constructors ... 417
Protected data members ... 419 Public constructors ... 429
Protected member functions ... 419 TMQueueAsDoubleList template ... 429
TMListIteratorImp template ... 419 Public member functions ... 429
Public constructors ... 419. TMQueueAsDoubleListIterator template ... 431
Public member functions ... 419 Public constructors ... 431
Operators ... 419 TQueueAsDoubleList template ... 431
TListImp template ... 420 TQueueAsDoubleListIterator template ... 431
TListIteratorImp template ... 420 Public constructors ... 431
Public constructors ... 420 TMIQueueAsDoubleList template ... 431
TMSListImp template ... 420 Public member functions ... 431
TMSListIteratorImp template ... 420 TMIQueueAsDoubleListIterator template .... 432
Public constructors ... 421 Public constructors ... 433
TSListImp template ... 421 TIQueueAsDoubleList template ... 433
TSListIteratorImp template ... 421 TIQueueAsDoubleListIterator template ... 433
TMIListImp template ... 421 Public constructors ... 433
Type definitions ... 421 TQueue template ... 433
Public member functions ... 421 TQueueIterator template ... 433
Protected member functions ... 422 TMSetAsVector template ... ; ... 433
TMIListIteratorImp template ... 422 Public constructors ... 434
Public constructors ... 423 Public member functions ... 434
Public member functions ... 423 TMSetAsVectorIterator template ... 434
Operators ... 423 Public constructors ... 434
TIListImp template ... 423 TSetAsVector template ... 434
TIListIteratorImp template ... 423 Public constructors ... 434
Public constructors ... 423 TSetAsVectorIterator template ... 435
TMISListImp template ... 424 Public constructors ... 435
Public member functions ... 424 TMISetAsVector template ... 435
TMISListIteratorImp template ... 424 Public constructors ... 435
Public constructors ... 424 Public member functions ... 435
TISListImp template ... 424 TMISetAsVectorIterator template ... 435
TISListIteratorImp template ... 425 Public constructors ... 436
Public constructors ... 425 TISetAs Vector template ... 436
TMQueueAsVector template ... 425 Public constructors ... 436
Public constructors ... 425 TISetAsVectorIterator template ... 436
Public member functions ... 425 Public constructors ... 436
TMQueueAsVectorIterator template ... 426 TSet template ... 436
Public constructors ... 426 TSetIterator template ... 436
TQueueAs Vector template ... 427 TMStackAsVector template ... 437
Public constructors ... 427 Type definitions ... 437
TQueueAs VectorIterator template ... 427 Public constructors ... 437
Public constructors ... 427 Public member functions ... 437
TMIQueueAsVector template ... 427 TMStackAsVectorIterator template ... 438
Public constructors ... 427 Public constructors ... 438
Public member functions ... 427 TStackAsVector template ... 439
TMIQueueAsVectorIterator template ... 428 Public constructors ... 439
Public constructors ... 429 TStackAsVectorIterator template ... 439
TIQueueAsVector template ... 429 Public constructors ... 439
Public constructors ... 429 TMIStackAs Vector template ... 439
Public constructors ... 440 Public constructors ... 452
Public member functions ... 440 TMSVectorIteratorImp template ... 452
TMIStackAsVectorIterator template ... 441 Public constructors ... 452
Public constructors ... 441 TSVectorImp template ... 452
TIStackAsVector template ... 441 Public constructors ... 452
Public constructors ... 441 TSVectorIteratorImp template ... 453
TIStackAsVectorIterator template ... 442 Public constructors ... 453
Public constructors ... 442 TMIVectorImp template ... 453
TMStackAsList template ... 442 Type definitions ... 453
TMStackAsListIterator template ... 442 Public constructors ... 453
Public constructors ... 442 Public member functions ... 454
TStackAsList template ... 442 Operators ... 455
TStackAsListIterator template ... 443 TMIVectorIteratorImp template ... 455
Public constructors ... 443 Public constructors ... 455
TMIStackAsList template ... 443 Public member functions ... 455
TMIStackAsListIterator template ... 443 Operators ... 456
Public constructors ... 443 TIVectorImp template ... 456
TIStackAsList template ... 443 Public constructors ... 456
TIStackAsListIterator template ... 443 TIVectorIteratorImp template ... 456
Public constructors ... 444 Public constructors ... 456
TStack template ... 444 TMICVectorImp template ... 457
TStackIterator template ... 444 Public constructors ... ' 457
TMVectorImp template ... 444 Public member functions ... 457
Type definitions ... 444 Protected member functions ... 457
Public constructors ... 444 TMICVectorIteratorImp template ... 458
Public member functions ... 445 Public constructors ... 458
Operators ... 446 TICVectorImp template ... 458
Protected data members ... 446 Public constructors ... 458
Protected member functions ... 446 TICVectorIteratorImp template ... 458
TMVectorIteratorImp template ... 447 Public constructors ... 458
Public constructors ... 447 TMISVectorImp template ... 459
Public mmber functions ... 447 Public constructors ... 459
Operator~; ... 447 TMISVectorIteratorImp template ... 459
TVectorImp template ... 448 Public constructors ... 459
Public constructors ... 448 TISVectorImp template ... 460
TVectorIteratorImp template ... 448 Public constructors ... 460
Public constructors ... 448 TISVectorIteratorImp template ... 460
TMCVectorImp template ... 449 Public constructors ... 460
Public constructors ... 449 TShouldDelete class ... 460
Public member functions ... 449 Public data members ... 461
Protected data members ... 450 Public constructors ... : ... 461
Protected member functions ... 450 Public member functions ... 461
TMCVectorIteratorImp template ... 450 Protected member functions ... 461
Public constructors ... 450
TCVectorImp template ... 451
Public constructors ... 451
TCVectorIteratorImp template ... 451
Public constructors ... 451
Chapter 8 The C++ mathematical classes 463 bcd ... 463
Public constructors ... 464
Friend functions ... 465
complex ... 466
Public constructors ... 466 Public constructors and destructor ... 492
Friend functions ... 466 Public member functions ... 493
Chapter 9 Class diagnostic macros 471 Default diagnostic macros ... 472
Extended diagnostic macros ... 473
Macro message output ... 475
Run-time macro control ... 475
Protected member functions ... 500
Operators ... 501
Related global operators and functions ... 504
TSubString class ... 505
Public member functions ... 505
Protected member functions ... ~ .... 505
Chapter 10 Run-time support 477 Bad_cast class .. " ... 477
Operators ... 505
TCriticalSection class ... ,... 507
Bad_typeid class ... 477
set_new _handler function ... 477
Constructors and destructor ... 507
TCriticaISection::Lock class ... 507
set_terminate function ... 478 Public constructors and destructor ... 507
set_unexpected function ... 479
terminate function ... 479
TMutex class ... , ... 508
Public constructors and destructor ... 508
Type_info class ... 480
Public constructor ... 480
Operators ... 508
TMutex::Lock class ... 508
Operators ... 480
Public member functions ... 480
Public constructors ... 509
Public member functions " ... 509
unexpected function ... 481
xalloc class ... 481
TSync class ... 509
Protected constructors ... 510
Public constructors ... 481 Protected operators ... 510
Public member functions ... 481 TSync::Lock class ... 510
xmsg class ... '482
Public constructor ... 482
Public constructors and destructor ... 510
TThread class ... 510
Public member functions ... 482 Type definitions ... 511
Protected constructors and destructor ... 512
Chapter 11 C++ utility classes 483 Public member functions ... 512
TDate class ... 483 Protected member functions ... 513
Type definitions ... 483
Public constructors ... 484 Protected operators ... 513
TThread::TThreadError class ... 513
Public member functions ... 484
Protected member functions ... 486 Type definitions ... 514
Public member functions ... 514
Operators ... 487
TFileStatus structure ... 488 TTime type definitions ... 515
TTime class ... 515
TFile class ... 488 Public constructors ... 515
Public data members ... 488 Public member functions ... 515
Public constructors ... 490 Protected member functions ... 517
Public member functions ... 490 Protected data members ... 517
String class ... 492
Type definitions ... 492
Operators ... 517
Index 519
Tables
1.1 Default run-time libraries ... 5
1.2 Summary of static run-time libraries ... 5
1.3 Summary of dynamic link libraries ... 7
1.4 Obsolete global variables ... 17
1.5 Obsolete function names ... 17
3.1 Locale monetary and numeric settings . . . . 158
3.2 These messages are generated in both Win 16 and Win 32. . ... 189
3.3 These messages are generated only in Win 32 ... 190
Figures
6.1 Streamable class hierarchy ... 335
If you are developing a 16-bit DOS-only application, you can also use the routines described in the DOS Reference
Introduction
This manual contains definitions of the Borland C++ classes, nonprivate class members, library routines, common variables, and common defined types for windows programming.
If you're new to C or C++ programming, or if you're looking for informa- tion on the contents of the Borland C++ manuals, see the introduction in the User's Guide.
Here is a summary of the chapters in this manual:
Chapter 1: Library cross-reference provides an overview of the Borland C++ library routines and header files. After describing the static and dynamic-link libraries, this chapter lists the header files, and then groups the library routines according to the tasks they commonly perform.
Chapter 2: The main function discusses arguments to main (including wild- card arguments), provides some example programs, and describes Pascal calling conventions and the value that main returns.
Chapter 3: Run-time functions is an alphabetical reference of Borland C++
library functions. Each entry gives syntax, portability information, an operative description, and return values for the function, together with a
reference list of related functions. .
Chapter 4: Global variables defines and discusses Borland C++'s global variables. You can use these to save yourself a great deal of programming time on commonly needed variables (such as dates, time, error messages, stack size, and so on).
Chapter 5: The C++ iostream classes describes the classes that provide support for input and output in C++ programs.
Chapter 6: Persistent stream classes and macros describes the persistent streams classes and macros.
Chapter 7: The C++ container classes describes the container classes provided by Borland C++ such as array, stack, and linked list.
Chapter 8: The C++ mathematical classes describes how to use bcd and complex classes.
Chapter 9: Class diagnostic macros describes the classes and macros that support object diagnosticS.
Chapter 10: Run-time support describes functions and classes that let you control the way your program executes at run time in case the program runs out of memory or encounters some exception.
Chapter 11: C++ utility classes describes the c++ date, string, and time classes.
If you are developing a 16-bit DOS-only application, you can also use the routines described in the DOS Reference
c
H A p T E R1
Library cross-reference
This chapter provides an overview of the Borland C++ library routines and header files. Library routines are composed of classes, functions, and macros that you can call from within your C and C++ programs to perform a wide variety of tasks. These tasks include low- and high-level I/O, string and file manipulation, memory allocation, process control, data conversion, mathematical calculations, and much more.
This chapter provides the following information:
• Names the static and dynamic-link libraries, files, and subdirectories found in the LIB and BIN subdirectories, and describes their uses.
• Explains why you might want to obtain the source code for the Borland C++ run-time library.
• Lists and describes the header files.
• Categorizes the library routines according to the type of tasks they perform.
Reasons to access the run-time library source code
There are several good reasons you might want to obtain the source code for the run-time library routines:
• A particular function you want to write might be similar to, but not the same as, a Borland C++ function. With access to the run-time library source code, you can tailor the library function to suit your needs, and avoid having to write a separate function of your own.
• Sometimes, when you're debugging code, you might want to know more about the internals of a library function.
• If you want to delete the leading underscores on C symbols, access to the run-time library source code will let you do so.
• You can learn a lot from studying tight, professionally written library source code.
For all these reasons, and more, you will want to have access to the Borland C++ run-time library source code. Because Borland believes strongly in the concept of "open architecture," we have made the Borland C++ run-time library source code available for licensing. All you have to do is fill out the order form distributed with your Borland C++ package, include your pay- ment, and we'll ship you the Borland C++ run-time library source code.
The run-time libraries
See the ObjectWindows Reference Guide for information about the libraries and DLLs specific to ObjectWindows.
The static libraries
The run-time libraries are divided into static (OBJ and LIB) and dynamic- link (DLL) versions. These different versions of the libraries are installed in separate directories. The static and dynamic libraries are described in separate tables.
Several versions of the run-time library are available. For example, there are memory-model-specific versions, diagnostic versions, and 16- and 32- bit-specific versions. There are also optional libraries that provide mathematics, container, ObjectWindows development, and international applications.
Here are some guidelines for selecting which run-time libraries to use:
• Segmented memory-model libraries are supported only in 16-bit programs. Tiny and huge memory models are not supported.
II 16-bit DLLs are supported only in the large memory model.
• For 32-bit programs, only the flat memory model is supported.
• 32-bit console and GUI programs require different startup code.
III Multithread applications are supported only in 32-bit programs.
The static (OBJ and LIB) version of the Borland C++ run-time library is con- tained in the LIB subdirectory of your installation. For each of the library file names, the '?' character represents one of the four (compact, small, medium, and large) distinct memory models supported by Borland. Each model has its own library file and math file, containing versions of the routines written for that particular model.
The following table identifies the default run-time libraries used with each compiler. See the User's Guide for discussions about compiling and linking.
Table 1.1: Default run-time libraries Compiler
BCC.EXE BCC32.EXE BCW.EXE BCWS32.EXE
Application 16-bit Windows Win32
Same as BCC.EXE Same as BCC32.EXE
Default libraries
COWS.OBJ, CWS.L1B, MATHWS.L1B, IMPORT.L1B COX32.0BJ, CW32.LlB, IMPORT32.LlB
Same as BCC.EXE Same as BCC32.EXE
The following table lists the names and uses of the Borland C++ static libraries; it also lists the operating system under which each library item is available. See the User's Guide for information on linkers, linker options, requirements, and selection of libraries.
Table 1.2: Summary of static run-time libraries
File name Application Use
Directory of BC41L1B
BIDSDI.LlB Win 16 16-bit diagnostic, dynamic BIDS import library for BIDS40D.DLL BIDSI.LlB Win 16 16-bit dynamic BIDS import library for BIDS40.DLL
BIDSF.LlB Win32s, Win32 32-bit BIDS library
BIDSDF.LlB Win32s, Win32 32-bit diagnostic BIDS library
BIDSFI.L1B Win32s, Win32 32-bit dynamic BIDS import library for BIDS40F.DLL
BIDSDFI.LlB Win32s, Win32 32-bit diagnostic, dynamic BIDS import library for BIDS40DF.DLL BIDSDB ?LlB Win 16 16-bit diagnostic BIDS library
BIDS?LlB Win 16 16-bit BIDS library
BWCC.LlB Win 16 16-bit import library for BWCC.DLL BWCC32.L1B Win32s, Win32 32-bit import library for BWCC32.DLL COD32.0BJ Win32s, Win32 32-bit DLL startup module
COD?OBJ Win 16 16-bit DLL startup module
COW32.0BJ Win32s, Win32 32-bit GUI EXE startup module
COW?OBJ Win 16 16-bit EXE startup module
COX32.0BJ Win32 32-bit console-mode EXE startup module
CRTDLL.LlB Win 16 16-bit dynamic import library for BC40RTL.DLL CW32.LlB Win32s, Win32 32-bit GUI single-thread library
CW?LlB Win 16 16-bit library
CW321.L1B Win32s, Win32 32-bit single-thread, GUI, dynamic RTL import library for CW32.DLL CW32MT.L1B Win32 32-bit GUI multithread library
Table 1.2: Summary of static run-time libraries (continued)
CW32MTI.LlB Win32 32-bit multithread, GUI, dynamic RTL import library for CW32MT.DLL IMPORT.L1B
IMPORT32.LlB MATHW?LlB W32SUT16.LlB W32SUT32.LlB OBSOLETE.LlB
Win 16 Win32s, Win32 Win 16 Win 16 Win32s
Win 16, Win32, Win32s Directory of BC41L1BI16-BIT
FILES.C Win 16
FILES2.C MATHERR.C
MATHERRL.C
Win 16 Win 16
Win 16
Directory of BC41L1BI32-BIT FILES.C Win32s, Win32 FILES2.C
FILEINFO.OBJ GP.OBJ MATHERR.C
MATHERRL.C
Win32s, Win32 Win32s, Win32 Win32s, Win32 Win32s, Win32
Win32s, Win32
WILDARGS.OBJ Win32
Directory of BC41L1BISTARTUP BUILD-CO.BAT Win 16
COD.ASM Win 16
COW.ASM RULES.ASI
Win 16 Win 16
16-bit import library for Windows 3.1 32-bit import library; use with IMPRTW32.LlB 16-bit math libraries
16-bit universal thunking library 32-bit universal thunking library Provides obsolete global variables.
Increases the number of file handles Increases the number of file handles
Sample of a user-defined floating-paint math exception handler for float and double types
Sample of a user-defined floating-paint math exception handler for long double type
Increases the number of file handles Increases the number of file handles
Passes open file-handle information to child processes Prints register-dump information when an exception occurs
Sample of a user-defined floating-point math exception handler for float and double types
Sample of a user-defined floating-point math exception handler for long double type
Transforms wild-card arguments into an array of arguments to main in console- mode applications
Batch file to build COD?OBJ, COF?OBJ, and COW?OBJ Source for COD ?OBJ
Source for COW?OBJ
. Assembly rules for COD.ASM and COW.ASM
The dynamic-link libraries
The dynamic-link (DLL) version of the run-time library is contained in the BIN subdirectory of the installation. Several versions of the DLL libraries
are available. For example, there are diagnostic versions, 16- and 32- bit-specific versions, and versions that support multithread applications.
In the 16-bit specific version, only the large-memory model DLL is pro- vided. No other memory-model is supported in a 16-bit DLL.
The following table lists the Borland C++ DLL names and uses, and the operating system under which the library item is available. See the User's Guide for information on linkers, linker options, requirements, and selection of libraries.
Table 1.3: Summary of dynamic link libraries
File name Application Use
Directory of BC41BIN
BC40RTL.DLL Win 16 16-bit, large-memory model
BIDS40.DLL Win 16 16-bit, BIDS
BIDS40D.DLL Win 16 16-bit, diagnostic BIDS BIDS40F.DLL Win32s, Win32 32-bit BIDS
BIDS40DF.DLL Win32s, Win32 32-bit diagnostic BIDS CW32.DLL Win32s, Win32 32-bit, single thread
CW32MT.DLL Win32 32-bit, multithread
LOCALE.BLL Win 16, Win32s, Win32 Locale library
The Borland C++ header files
c++ header files, and header files defined by ANSI C, are marked in the margin.
Header file alloc.h assert.h1 bcd.h2 bios.h checks.h2
Header files provide function prototype declarations for library functions.
Data types and symbolic constants used with the library functions are also defined in them, along with global variables defined by Borland C++ and by the library functions. The Borland C++ library follows the ANSI C standard on header-file names and their contents.
Description
Declares memory-management functions (allocation, deallocation, and so on).
Defines the assert debugging macro.
Declares the C++ class bed and the overloaded operators for bed and bed math functions.
Declares various functions used in calling IBM-PC ROM BIOS routines.
Defines PRECONDITION, WARN, and TRACE diagnostic macros.
complex.h2 conio.h
constrea.h2 cstring.h2 ctype.h1
dir.h direct.h dirent.h dos.h errno.h1 except.h2 excpt.h fcntl.h float.h1 fstream.h2 generic.h . io.h iomanip.h2
iostream.h2 Iimits.h1
locale.h1 sys\locking.h malloc.h math.h1 mem.h memory.h new.h2 process.h ref.h2 regexp.h2
Declares the C++ complex math class.
Declares various functions used in calling the operating-system console I/O routines. The functions defined in this header file cannot be used in GUI applications.
Declares C++ classes and methods to support console output.
Declares the ANSI C++ string class support.
Contains information used by the character classification and character conversion macros (such as isalpha and toasciJ).
Contains structures, macros, and functions for working with directories and path names.
Defines structures, macros, and functions for dealing with directories and path names.
Declares functions and structures for POSIX directory operations.
Defines various constants and gives declarations needed for DOS and B0x86-specific calls.
Defines constant mnemonics for the error codes.
Declares ANSI C++ exceptions support.
Declares C exceptions support.
Defines symbolic constants used in connection with the library routine open.
Contains parameters for floating-point routines.
Declares the C++ stream classes that support file input and output.
Contains macros for generic class declarations.
Contains structures and declarations for low-level inputbutput routines.
Declares the C++ streams I/O manipulators and contains templates for creating parameterized manipulators.
Declares the basic C++ streams {I/O} routines.
Contains environmental parameters, information about compile-time limitations, and ranges of integral quantities.
Declares functions that provide country- and language-specific information.
Definitions for mode parameter of locking function.
Memory-management functions and variables.
Declares prototypes for the math functions and math error handlers.
Declares the memory-manipulation functions~ {Many of these are also defined in string.h.}
Memory-manipulation functions.
Access to_new_handler and setnew_handler.
Contains structures and declarations for the spawn ... and exec ... functions.
Provides support for reference counting. Used with the string class.
Implements regular-expression searching.
search.h setjmp.h1
share.h signal,h1 stdarg.h1
stddef.hl stdio.h1
stdiostr.h2
stdlib.h1
string.h 1 strstrea. h2 sys\stat.h time.h1
sys\timeb.h sys\types.h typeinfo.h2 utime.h values.h varargs.h
1 Defined by ANSI C.
2 C++ header files.
Declares functions for searching and sorting.
Defines a type jmp_buf used by the longjmp and seljmp functions and declares the functions longjmp and setjmp.
Defines parameters used in functions that make use of file-sharing.
Defines constants and declarations for use by the signal and raise functions.
Defines macros used for reading the argument list in functions declared to accept a variable number of ar- guments (such as vprintf, vscanf, and so on).
Defines several common data types and macros.
Defines types and macros needed for the standard I/O package defined in Kernighan and Ritchie and extended under UNIX System V. Defines the standard I/O predefined streams stdin, stdout, stdprn, and stderr, and declares stream-level 110 routines.
Declares the C++ (version 2.0) stream classes for use with stdio FILE structures. You should use iostream.h for new code.
Declares several commonly used routines: conversion routines, search/sort routines, and other miscellany.
Decl~res several string-manipulation and memory-manipulation routines.
Declares the C++ stream classes for use with byte arrays in memory.
Defines symbolic constants used for opening and creating files.
Defines a structure filled in by the time-conversion routines asctime, localtime, and gmtime, and a type used by the routines clime, difftime, gmlime, localtime, and slime; also provides prototypes for these routines.
Declares the function ftime and the structure timeb that ftime returns.
Declares the type time_t used with time functions.
Provides declarations for ANSI C++ run-time type identification (RTTI).
Declares the utime function and the ulimbuf struct that it returns.
Defines important constants, including machine dependencies; provided for UNIX System V compatibility.
Definitions for accessing parameters in functions that accept a variable number of arguments. Provided for UNIX compatibility; you should use stdarg.h for new code.
Library routines by category
The Borland C++ library routines perform a variety of tasks. The routines, along with the header files in which they are declared, are listed by category of task performed.
c++ prototyped routines
Classification routines
Console I/O routines
Conversion routines
Certain routines described in this book have multiple declarations. You must choose the prototype appropriate for your program. In general, the multiple prototypes are required to support the original C implementation and the stricter and sometimes different C++ function declaration syntax.
For example, some string-handling routines have multiple prototypes because in addition to the ANSI-C specified prototype, Borland C++
provides prototypes consistent with the ANSI C++ draft.
getvect (dos.h) strchr (string.h)
max (stdlib.h) strpbrk (string.h)
memchr (string.h) strrchr (string.h)
min (stdlib.h) strstr (string. h)
setvect (dos.h)
These routines classify ASCII characters as letters, control characters, punctuation, uppercase, and so on.
isalnum (ctype.h) is lower (ctype.h)
isalpha (ctype.h) isprint (ctype.h)
isascii (ctype.h) ispunct (ctype.h)
iscntrl (ctype.h) isspace (ctype.h)
isdigit (ctype.h) isupper (ctype.h)
isgraph (ctype.h) isxdigit (ctype.h)
These routines output text to the screen or read from the keyboard. They cannot be used in a CUI application.
cgets clreol clrscr cprintf cputs delline getpass gettext gettextinfo gotoxy highvideo ins line lowvideo
(conio.h) (conio.h) (conio.h) (conio.h) (conio.h) (conio.h) (conio.h) (conio.h) (conio.h) (conio.h) (conio.h) (conio.h) (conio.h)
movetext normvideo putch puttext _setcursortype textattr text background textcolor textmode ungetc wherex wherey window
(conio.h) (conio.h) (conio.h) (conio.h) (conio.h) (conio.h) (conio.h) (conio.h) (conio.h) (stdio.h) (conio.h) (conio.h) (conio.h)
These routines convert characters and strings from alpha to different numeric representations (floating-point, integers, longs) and vice versa, and from uppercase to lowercase and vice versa~
Diagnostic routines
Directory control routines
EasyWin routines
atof (stdlib.h) strtol (stdlib.h)
atoi (stdlib.h) _strtold (stdlib.h)
atol (stdlib.h) strtoul (stdlib.h)
ecvt (stdlib.h) , toascii (ctype.h)
fcvt (stdlib.h) -tolower (ctype.h)
gcvt (stdlib.h) tolower (ctype.h)
itoa (stdlib.h) _toupper (ctype.h)
ltoa (stdlib.h) toupper (ctype.h)
strtod (stdlib.h) ultoa (stdlib.h)
These routines provide built-in troubleshooting capability.
assert (assert.h) perror (errno.h)
CHECK (checks.h) PRECONDITION (checks.h)
_matherr (math.h) TRACE (checks.h)
-matherrl (math.h) WARN (checks.h)
These routines manipulate directories and path names.
chdir (dir.h) -$etdcwd (direct.h)
Jhdrive (direct.h) getdisk . (dir.h)
dosedir (dirent.h) _makepath (stdlib.h)
_dos Jindfirst (dos.h) mkdir (dir.h)
_dosJindnext (dos.h) mktemp (dir.h)
_dos -$etdiskfree (dos.h) opendir (dirent.h)
_dos -$etdrive (dos.h) readdir (dirent.h)
_dos _setdrive (dos.h) rewinddir (dirent.h)
findfirst (dir.h) rmdir (dir.h)
findnext (dir.h) _searchenv (stdlib.h)
fnmerge (dir.h) searchpath (dir.h)
fnsplit (dir.h) -searchstr (stdlib.h)
Jullpath (stdlib.h) setdisk . (dir.h)
getcurdir (dir.h) _splitpath (stdlib.h)
getcwd (dir.h)
These routines are portable to EasyWin programs but are not available in Windows 16-bit programs. They are provided to ease porting of existing code into a Windows 16-bit application.
dreol (conio.h) getche (stdio.h)
drscr (conio.h) gets (stdio.h)
fgetchar (stdio.h) gotoxy (conio.h)
getch (stdio.h) kbhit (conio.h)
getchar (stdio.h) perror (errno.h)
Inline routines
Input I output routines
printf (stdio.h) vprintf (stdio.h)
putch (conio.h) vscanf (stdio.h)
putchar (stdio.h) wherex (conio.h)
puts (stdio.h) wherey (conio.h)
scanf (stdio.h)
These routines have inline versions. The compiler will generate code for the inline versions when you use #pragma intrinsic or if you specify program optimization. See the User's Guide for more deta~ls.
abs (math.h) stpcpy
alloca (malloc.h) strcat
_crotI (stdlib.h) strchr
_crotr (stdlib.h) strcmp
_IrotI (stdlib.h) strcpy
_Irotr (stdlib.h) strlen
memchr (mem.h) strncat
memcmp (mem.h) strncmp
memcpy (mem.h) strncpy
memset (mem.h) strnset
JotI (stdlib.h) strrchr
Jotr (stdlib.h) strset
(string. h) (string.h) (string.h) (string.h) (string.h) (string. h) (string.h) (string.h) (string.h) (string.h) (string. h) (string.h)
These routines provide stream- and operating-system level I/O capability.
access (io.h) _dos_write (dos.h)
-rtCchmod (io.h) dup (io.h)
chmod (io.h) dup2 (io.h)
chsize (io.h) eof (io.h)
clearerr (stdio.h) fclose (stdio.h)
-rtf_close (io.h) fcloseall (stdio.h)
close (io.h) fdopen (stdio.h)
-rtCcreat (io.h) feof (stdio.h)
creat (io.h) ferror (stdio.h)
creatnew (io.h) fflush (stdio.h)
creattemp (io.h) fgetc (stdio.h)
cscanf (conio.h) fgetchar (stdio.h)
_dos_close (dos.h) fgetpos (stdio.h)
_dos_creat (dos.h) fgets (stdio.h)
_dosJreatnew (dos.h) filelength· (io.h)
_dos ~etfileattr (dos.h) fileno (stdio.h)
_dos~etftime (dos.h) flushall (stdio.h)
_dos_open (dos.h) fopen (stdio.h)
_dos_read (dos.h) [printf (stdio.h)
_dos _setfileattr (dos.h) [putc (stdio.h)
_dos _setftime (dos.h) [putchar (stdio.h)