Last update Sep 16, 2002
The library includes functions typically defined by ANSI standard or UNIX C libraries, plus enhancements to the standard set. It includes C++ classes for working with streams and for performing mathematical computations.
C functions can be called from either C or C++ programs, but the C++ classes can be used only with C++ programs.
Name: _access Synonym: accessThe synonym and name are interchangeable in an application; one can be substituted for the other. Thus, if the prototype for the _access function is:
int _access(char *path, int mode);Using its synonym yields:
int access(char *path, int mode);
Heading | Meaning |
---|---|
value of x | The value of x for this condition to exist. |
value of y | The value of y for this condition to exist. |
value of *ptr | The value stored through ptr for x (possibly y). |
return value | The value returned. |
invalid? | Will the FE_INVALID exception be raised? |
div by 0? | Will the FE_DIVBYZERO exception be raised? |
All of these functions return a NaN if one of its arguments is a NaN. If the argument is a signalling NaN, the function will also raise the FE_INVALID exception.
Compatibility with other Platforms
Each name in this chapter has a section that lists available platforms. If a name is not compatible with a platform, a line is drawn through the platform. Platforms are: DOS, Windows 3.x, Phar Lap, DOSX, and Win32.
Using Wildcard Expansion
Digital Mars C++ supports wildcard expansion in command line arguments
via the EXPAND_WILDCARDS macro.
The following program shows the use of wildcard expansion.
It prints all of its argument.
If you invoke this program with "*.*" or other wildcarded arguments,
it will print all of the files that match the specified arguments.
This program can be compiled and linked normally;
no additional object files are necessary.
/* argsdemo.c */ /* --Invoke with wildcards in the arguments */ #include <stdio.h> #include <dos.h> EXPAND_WILDCARDS; // use wildcard support int main(int argc, char *argv[]) { int i; for (i = 0; i < argc; ++i) printf("argv[%d] = '%s'\n", i, argv[i]); return 0; }For more information see the definition of the EXPAND_WILDCARDS macro in dos.h, and the code in the \dm\src\core\_main.c.
Table heading F/V means Function/Variable.
80x86
F/V
Description
_cpumode
Determines if the CPU is in real or protected mode.
cputype
Returns the type of 80x86 CPU in the computer.
_FP_OFF
Returns the offset portion of a far pointer.
_FP_SEG
Returns the segment portion of a far pointer.
getDS
Returns the 80x86 data segment register.
_inp, _inpw, inpl
Reads from an 80x86 hardware port.
_int86, int86_real, _int86x, int86x_real
Generates an 80x86 interrupt, setting and returning registers.
_MK_FP
Creates a far pointer from a segment and offset.
_movedata
Copies data between segments.
_outp, outpw, outpl
Outputs to an 80x86 hardware port.
peek, peekb, peekbytes
Gets data from another segment.
poke, pokeb, pokebytes
Puts data into another segment.
_segread
Gets the current values of the 80x86 segment registers.
These functions directly access the ROM BIOS routines that are built into every PC compatible computer.
F/V
Description
bioscom, _bios_serialcom
Specifies a COM port to use for serial I/ O.
_bios_disk, biosdisk
Controls disk and drive handling.
biosequip, _bios_equiplist
Returns what equipment is connected to the system.
bioskey, _bios_keybrd
Checks keyboard interrupts.
biosmemory, _bios_memsize
Returns RAM size.
biosprint, _bios_printer
Performs printer control.
biostime, _bios_timeofday
Gets/sets the BIOS time.
Character Classification and Manipulation
These functions classify characters into a number of useful categories, and provide conversions from one category to another.
F/V
Determines if a character...
isalnum
is alphanumeric.
isalpha
is alphabetic.
__isasci
is ASCII.
iscntrl
is a control character.
__iscsym
is a letter, underscore, or digit.
__iscsymf
is a letter or underscore.
isdigit
is a digit.
isgraph
is printable (excluding spaces).
islower
is lowercase.
isprint
is a printable (including spaces).
ispunct
is punctuation.
isspace
is white space.
isupper
is uppercase.
isxdigit
is a hexadecimal digit.
F/V
Converts a character...
__toascii
to ASCII.
_tolower, tolower
to lowercase.
_toupper, toupper
to uppercase.
Complex Class Library
These functions perform mathematics on complex numbers. The
functions also treat complex numbers like real numbers or integers.
F/V
Description
complex:: operator=
Assigns a value to a complex variable.
complex:: operator+=
Adds a value and assigns the result to the complex variable.
complex:: operator-=
Subtracts a value and assigns the result to the complex variable.
complex:: operator*=
Multiplies a value and assigns the result to the complex variable.
complex:: operator/=
Divides the variable and assigns the result to the complex variable.
complex:: operator-
Returns the negtaive number.
complex:: operator!
Logically negates a number.
operator+
Returns the sum.
operator-
Returns the difference.
operator*
Returns the product.
operator/
Returns the quotient.
operator&&
Performs a logical AND.
operator||
Performs a logical OR.
operator!
Tests for inequality.
operator==
Tests for equality.
operator<<
Reads from the stream.
arg
Returns the argument in radians.
complex::imag
Returns the imaginary portion of a complex number.
complex:: real
Returns the real portion of a complex number.
conj
Returns the conjugate.
imag
Returns the imaginary portion of a complex number.
modulus
Returns the absolute value.
norm
Returns the square of the absolute value.
polar
Returns the polar coordinates.
real
Returns the real portion.
acos
Returns the arccosine.
asin, asinh
Returns the arcsine or hyperbolic arcsine.
atan, atanh
Returns the arctangent or hyperbolic arctangent.
cos, cosh
Returns the cosine or hyperbolic cosine.
sin, sinh
Returns the sine or hyperbolic sine.
tan, tanh
Returns the tangent or hyperbolic tangent.
abs
Returns the absolute value.
exp
Returns the exponential value.
log, log10
Returns the logarithm base or base 10.
pow
Returns a raised number to complex or vice versa.
sqrt
Returns the square root.
Control-Break Handling
Normally, the user of a DOS program can press control-c to
immediately terminate execution of a program. These functions
allow the program to control what happens when control-c is
pressed.
F/V
Description
controlc_close
Removes a user control-break handler.
controlc_open
Installs a user control-break handler.
ctrlbrk
Installs a user control-break handler.
dos_get_ctrl_break
Gets the OS control-break checking status.
dos_set_ctrl_break
Turns control-break checking on or off.
getcbrk
Gets the current control-break setting.
setcbrk
Sets the control-break setting.
F/V | Description |
---|---|
_chdir | Changes the current directory. |
_chdrive, _dos_setdrive, setdisk | Sets the current drive. |
_dos_getdrive, getdisk, _getdrive | Gets the current disk drive. |
getcurdir, _getdcwd | Gets the current directory for a drive. |
_getcwd | Gets the current directory for the current drive. |
_mkdir | Creates a new directory. |
_rmdir | Deletes a directory. |
F/V | Description |
---|---|
disp_box | Draws a box. |
disp_close | Closes the display. |
disp_eeol | Erases to the end of current line. |
disp_eeop | Erases to the end of the page. |
disp_endstand | Ends reverse video mode. |
disp_fillbox | Fills the box. |
disp_flush | Moves the cursor to coincide with output position. |
disp_getattr | Gets display attributes. |
disp_getmode | Gets the current video mode. |
disp_hidecursor | Hides the cursor. |
disp_move | Moves the display. |
disp_open | Initializes the display. |
disp_peekbox | Stores a defined rectangular area. |
disp_peekw | Reads the information at specified position defined by row/ column. |
disp_pokebox | Restores a previously defined rectangular area. |
disp_pokew | Puts an attribute/ character into a specified row/ column. |
disp_printf | Writes to the screen. |
disp_putc | Writes a character to an output location. |
disp_puts | Writes a string to an output location. |
disp_reset43 | Resets the display to 80-by-25 mode. |
disp_scroll | Scrolls the screen up. |
disp_set43 | Sets the display to 80-by-43 EGA text mode (80-by-50 VGA). |
disp_setattr | Sets display attributes for characters. |
disp_setcursortype | Modifies cursor appearance. |
disp_setmode | Sets video mode. |
disp_showcursor | Restores previously hidden cursor. |
disp_startstand | Prints characters in reverse video. |
disp_usebios | Sets up to write to the screen. |
DOS-Specific
These functions access miscellaneous features and data structures
that are only available from the DOS operating system.
F/V
Description
absread,dos_abs_disk_read
Reads disk sectors from a drive.
abswrite,dos_abs_disk_write
Writes data to specific disk sectors.
_bdos
Calls DOS with DX and AL arguments.
bdosptr, bdosx
Calls DOS with DS: DX and AL arguments.
_dosexterr, dos_exterr
Retrieves OS extended error information.
_dos_getdiskfree, _getdiskfree
Gets disk information and amount of free space.
dos_getdiskfreespace
Gets free space remaining on a disk.
_dos_get_verify, getverify
Gets the OS verify status.
_dos_keep
Installs a TSR program.
dos_set_verify setverify
Sets read-after-write verification on or off.
getdta
Gets the DOS disk transfer address.
getfat
Gets file allocation table information for a drive.
getfatd
Gets file allocation table information for the current drive.
int21h
Calls DOS via interrupt 21.
_intdos, _intdosx
Calls DOS via interrupt 21, setting and returning registers.
setdta
Sets the disk transfer address.
Environment Variables and Functions
Environment variables are a set of named string values maintained
by the operating system. An example of an environment variable is
the PATH variable, which tells the operating system where to look
for programs.
When a program starts, it is given a copy of the previous program's
environment (usually the OS environment); any changes the
program makes to its copy are discarded when the program exits.
However, if a program creates a child process, the child receives the
parent's environment, with any changes the parent process made to
it.
These variables and functions allow a program to access and modify
environment variables. See also the spawn and exec functions.
F/V
Description
_environ
A list of pointers to the environment variables.
_envptr
A block of memory containing the environment variables.
getenv
Gets the value of a specified environment variable.
_putenv
Sets the value of an environment variable.
Error Handling
These functions and variables are related to the trapping,
identification, and reporting of errors in programs.
F/V
Description
assert
Internal program consistency check.
cerror_close
Removes a user critical-error handler.
cerror_open
Installs a user critical-error handler.
_chkstack
Checks for stack overflow.
_doserrno
Contains the OS error code for the last error that occurred.
errno
Contains the C error code for the last error that occurred.
_harderr
Installs a critical error handler.
_hardresume
Resumes DOS handling of a critical error.
_hardretn
Returns directly to the program from a critical error handler.
perror
Prints a message corresponding to the last error that occurred.
_strerror
Returns a description of the last error, prepending a user message.
strerror
Returns a description of the last error.
_sys_errlist
The list of all C error descriptions.
_sys_nerr
The number of C error descriptions.
Expanded Memory Manager
Expanded Memory Manager (EMM) functions can be used as an
alternative to, or at the same time as, the __handle pointer system
and offer more control of an application's expanded memory usage.
F/V
emm_allocpages
Allocates expanded memory pages.
emm_deallocpages
Frees expanded memory pages.
emm_gethandlecount
Gets the number of active handles.
emm_gethandlespages
Gets the number of pages allocated to each handle.
emm_getpagemap
Gets the page mapping context.
emm_getpagemapsize
Gets the buffer size of page mapping.
emm_getsetpagemap
Gets the value of the page mapping context and sets it to a new value.
emm_gettotal
Gets the number of logical pages.
emm_getunalloc
Gets the number of unallocated logical pages.
emm_getversion
Gets the version of the EMM.
emm_init
Tests if EMM installed.
emm_maphandle
Maps the logical page onto the physical page in the emm page frame.
emm_physpage
Gets starting address of emm page.
emm_restorepagemap
Restores handle's mapping context.
emm_savepagemap
Saves page mapping context for the handle.
emm_setpagemap
Sets a new page mapping context.
emm_term
Terminates EMM.
File Management and File Searching
These functions manage and search for files but do not change a
file's contents.
F/V
Description
_access
Detrmines if and how a file can be accessed.
_chmod
Changes the read/ write access of anamed file.
_chsize
Changes the size of a file.
_dos_findfirst,findfirst
Searches for the first matching file.
_dos_findnext, findnext
Searches for succeeding matching files.
_dos_getfileattr
Gets the attributes of the named file.
_dos_getftime
Gets the time a file was last written to.
_dos_setfileattr
Sets the attributes of a file.
filesize
Returns the size of a named file.
_fmode
The default file translation mode, text or binary.
remove
Deletes the named file.
rename
Renames the named file.
_searchenv
Searches for a file using directories in an environment variable.
searchpath
Searches for a file using directories in the PATH environment variable.
_stat
Returns information about the named file.
_umask
Sets the default read/ write permissions for new files.
_unlink
Deletes the named file.
_utime
Sets the modified time of a named file.
Handle Package
These functions use the __handle pointer to dynamically allocate,
use, and free memory.
F/V
Description
handle_calloc
Clears and allocates memory.
handle_free
Frees memory.
handle_ishandle
Tests for a __handle pointer.
handle_malloc
Allocates memory.
handle_realloc
Reallocates memory.
handle_strdup
Allocates memory; duplicates the string pointed to by __handle.
Input and Output
I/ O management for C can be grouped into four general areas: unbuffered, handle-based routines; buffered, stream-based routines; operating system I/ O; and console I/ O routines.
Unbuffered, Handle-Based I/ O
These functions provide low-level access to files and devices. Files are accessed via a handle, which is an integer. Note that file handles used with DOS INT 21 calls and Win32 calls are not necessarily the same as handles used with the unbuffered, handle-based I/ O functions, and should not be interchanged.
Buffered Stream I/ O
Buffering means that data are read from and written to files and
devices in chunks, rather than one byte at a time. Each chunk is
stored in a memory buffer. This method reduces the number of disk
accesses needed and speeds up I/ O.
For example, suppose a program needs to read a file a byte at a
time. The buffered stream functions retrieve each byte from the
buffer in memory, avoiding a disk access for each read operation.
Only when the buffer is empty do the functions fetch another chunk
from the disk.
Rather than using an integer handle, these functions use a pointer to
a structure that contains information about the status of the buffers.
Direct Operating System I/O
These functions are similar to the unbuffered, handle-based I/ O
functions, but use more direct calls to DOS or Win32. As noted
before, DOS INT 21 and Win32 handles must not be interchanged
with handles used by direct operating system I/ O functions, nor
should handles from these functions be used with the unbuffered,
handle-based functions.
There is one DOS console. Windows NT provides any number of
consoles. Windows 3.x provides no console; console I/O functions
are not available for Windows 3.x.
Interrupt Handling
These functions allow programs to generate and trap 80x86
interrupts. See also the Interrupt Package category.
Interrupt Package
These functions, from Digital Mars, handle interrupts, signals, and
errors. An interrupt function can create a stack of a specified size
that conforms to constraints of the memory model used. See also the
Interrupt Handling category.
Locale
These functions allow programs to easily adapt to the different
conventions used in different parts of the world.
Math
Digital Mars C++ provides a large library of math functions.
Memory Buffer
These functions operate on arrays of characters, much like the string
functions, but do not assume a terminating null character.
Memory Management
Digital Mars C++ provides two kinds of memory management, program
memory management and operating system memory management.
Program Memory Management
For DOS and Windows 3. x programs, the situation is complicated by
the 80x86 architecture, which has two kinds of pointers to memory:
near pointers and far pointers. Near pointers are small and efficient
but can access only 64K bytes at a time. Far pointers are less efficient but can access the entire memory space, up to one MB for real
mode. Because of this, DOS and Windows 3. x have two heaps: a
smaller near one and a larger far one. Phar Lap and Win32 programs
have only one heap.
DOS and Windows 3.x usually have three versions of each memory
management function:
° A plain function that accesses whichever heap, near or
far, is the default for the memory model. An example is
malloc, which allocates from one heap or the other,
depending on the memory model. The default for the S
and M models is near; the default for L and C is far.
° A near function that accesses the near heap (and begins
with _n). An example is _nmalloc.
° A far function that accesses the far heap (and begins with
_f). An example is _fmalloc.
Phar Lap and Win32 have only a plain function. For example,
malloc allocates from the heap. Functions _nmalloc and
_fmalloc are not available.
These functions interface to the Microsoft mouse and require that a
Microsoft compatible mouse driver be installed. See the manual that
accompanies the mouse. Two of the functions enable the mouse to
emulate a lightpen.
Multi-Threaded Processing
F/ V Description
F/V
Description
_close
Closes an unbuffered file handle.
_commit
Forces the OS to flush a file to disk.
_creat
Creates a file and returns a handle to it for unbuffered I/ O.
creatnew
Same as _creat, but returns an error if the file
already exists.
creattemp
Same as _creat, but creates a temporary file.
_dup
Creates another unbuffered file handle for an open file.
_cup2
Changes the file that a handle is associated with.
_eof
True if the handle's file position is at the end of the file.
_filelength
Returns the size of the file associated with a handle.
_fstat
Returns the modification time for the file associated with a handle.
_isatty
True if a handle is associated with a device rather than a file.
lock
Locks a section of a file.
_locking
Locks/ unlocks a section of a file, with retry.
_lseek
Sets the file position of a handle.
_open
Opens a file for unbuffered access and returns a handle to it.
_read,_readx
Performs an unbuffered read from a file.
setftime
Sets modification date of the file associated with a handle.
_setmode
Sets the translation mode of the file associated with a handle.
_sopen
Same as _open, but allows setting of access controls.
_tell
Returns the position of the file associated with a handle.
unlock
Releases file sharing locks on a handle's file.
_write, _writex
Performs an unbuffered write to a file.
F/V
Description
clearerr
Clears the error and EOF flags for a stream.
fclose
Closes a buffered stream file.
_fcloseall
Closes all open buffered streams.
_fdopen
Associates an unbuffered file with a buffered stream.
feof
True if the stream is at the end of its file.
ferror
True if an error was on a stream.
fflush
Flushes the buffer associated with a stream.
fgetc
Reads the next character from a stream.
_fgetchar
Reads the next character from the stdin stream.
fgetpos
Saves the current position in the file of a stream.
fgets
Reads a string from a stream.
_fileno
Returns the unbuffered file handle associated with a stream.
_flushall
Flushes the buffers of all open streams.
fopen
Opens a file as a buffered stream.
fprintf
Formats and outputs a string to a stream.
fputc
Writes a character to a stream.
_fputchar
Writes a character to the stdout stream.
fputs
Writes a string to a stream.
fread
Reads an array from a stream.
freopen
Closes a stream then reopens it with a new file.
fscanf
Reads values from a stream and formats them into a string.
fseek
Sets the position of a stream in its file.
fsetpos
Resets the position of a stream to a saved value.
_fsopen
Like fopen, but allows file sharing controls to be set.
ftell
Returns the current position of a stream's file.
fwrite
Writes an array to a stream.
getc
Reads a character from a stream.
getchar
Reads a character from the stdin stream.
gets
Reads a string from the stdin stream.
_getw
Reads an int from a stream.
printf
Formats and prints a string to the stdout stream.
putc
Writes a character to a stream.
putchar
Writes a character to the stdout stream.
puts
Writes a string to the stdout stream.
_putw
Writes an int to a stream.
rewind
Positions the file associated with the stream at the beginning.
_rmtmp
Deletes all temp files created with tmpfile.
setbuf setvbuf
Changes the buffer for a stream.
stdaux
A stream over the standard auxiliary output.
stderr
A stream over the standard error output.
stdin
A stream over the standard input.
stdout
A stream over the standard output.
stdprn
A stream over the standard print output.
tmpfile
Creates a temporary file and opens a stream over it.
ungetc
Puts a character back into a stream.
F/V
Description
_dos_close
Calls the OS directly to close a file.
_dos_commit
Forces the OS to flush its buffers for a file to disk.
_dos_creat, dos_creat
Calls the OS directly to create a file.
_dos_creatnew
Same as _dos_creat, but fails if the file exists.
_dos_lock
Calls the OS to restrict access to a section of a file.
_dos_open dos_open
Calls the OS to open a file.
_dos_read
Calls the OS directly to read from a file.
_dos_seek
Calls the OS to move the file pointer to a given position.
_dos_setftime
Sets the modification time of a file.
_dos_write
Calls the OS directly to write to a file.
Console I/O
These low level functions give the program access to the computer
display and keyboard, also known as the console. The stream and
handle based I/O functions can also be used to read and write from
the display and keyboard devices, but the console I/O functions
provide more direct control over whether characters are echoed on
input, whether a key is available in the keyboard buffer, etc.
F/V
Description
_kbhit
Determines if a keyboard key was pressed.
_ungetch
Puts a character back into the keyboard buffer.
_getch
Reads a character directly from the console, without echo.
_getche
Reads a character directly from the console, with echo.
_putch
Writes a character directly to the console.
_cgets
Gets a string directly from the console.
_cprintf
Formats and prints a string directly to the console.
_cputs
Outputs a string directly to the console.
_cscanf
Reads and formats values directly from the console.
F/V
Description
_chain_intr
Passes control from one interrupt handler to another.
_disable
Executes the x86 CLI instruction, disabling interrupts.
_dos_getvect, getvect
Returns the interrupt handler for the given vector.
_dos_setvect, setvect,
Sets the interrupt handler for a given vector.
_enable
Executes the x86 STI instruction, enabling interrupts.
geninterrupt
Generates a software interrupt.
F/V
Description
int_gen
Generates a standard Intel 80x86 interrupt.
int_getvector
Gets the interrupt vector.
int_intercept
Links a standard C function to an interrupt vector.
int_off
Clears the interrupt flag.
int_on
Sets the interrupt flag.
int_prev
Calls the standard interrupt handler from a previously installed handler.
int_restore
Unlinks an interrupt handler.
int_setvector
Sets the interrupt vector.
F/V
Description
country
Returns information about a country
localeconv
Returns information about the current locale.
setlocale
Sets the locale for a category of locale-dependent values.
strcoll
Compares two strings based on the current locale's collating sequence.
strftime
Formats the date and time for the current locale.
strxfrm
Recollates a string for a locale.
F/V
Description
_8087
Tells if and what kind of floating-point coprocessor is present.
abs
Returns the absolute value of an integer.
acos, acosf, acosl
Calculates the arc cosine.
arg
Determines the angle of a number in a complex plane
asin, asinf, asinl
Calculates the arcsine.
atan, atanf, atanl
Calculates arc tangent.
atan2, atan2f, atan2l
Calculates arc tangent of y/ x.
_cabs, _cabsl
Calculates the absolute value of a complex number.
ceil, ceilf, ceill
Returns a number rounded up.
_clear87
Returns and clears the floating-point coprocessor status
_control87
Gets and sets the floating-point coprocessor status.
copysign, copysignf, copysignl
Copies the sign bit of one number to another.
cos, cosf, cosl
Calculates the cosine.
cosh, coshf, coshl
Calculates the hyperbolic cosine.
div
Calculates the quotient and remainder of division.
exp, expf, expl
Calculates the value of e raised to the power of x.
expm1, expm1f, expmll
Calclulates the value of e raised to the power of x-1.
fabs, fabsf, _fabsl
Returns the absolute value of a floating-point number.
feclearexcept
Clears the specified exception.
fegetenv
Gets the current floating-point environment.
fegetexcept
Gets the exception.
fegetprec
Returns the current precision mode.
fegetround
Returns the current rounding mode.
feprocentry
Resets the floating-point environment to the start-up state.
feprocexit
Saves and raises the exceptions.
feraiseexcept
Raises the specified exception.
fesetenv
Sets the current floating-point environment.
fesetexcept
Sets the exception flag.
fesetprec
Sets the precision mode
fesetround
Sets the rounding mode.
fetestexcept
Determines if an exception was raised.
floor, floorf, floorl
Returns a number rounded down.
fmod, fmodf, fmodl
Calculates the floating-point remainder.
_fpreset
Reinitializes floating-point functions.
frexp, frexpf, _frexpl
Breaks a number into mantisa and exponent.
_hypot, _hypotl
Calculates the length of a hypotenuse.
labs
Returns the absolute value of a long integer.
ldexp, ldexpf, _ldexpl
Calculates n x 2exp.
ldiv
Returns the quotient and remainder of division of long integers.
log, logf, logl
Calculates the natural logarithm.
log10, log10f, log10l
Calculates the base-10 logarithm.
log1p, log1pf, log1pl
Calculates the natural logarithm of 1 + x.
_lrot
Returns the binary left rotation of a long integer.
_lrotr
Returns the binary right rotation of a long integer.
matherr, _matherrl
Handles math errors; is user-written.
__max
Returns the larger of two numbers.
__min
Returns the smaller of two numbers.
modf, modff, _modfl
Breaks a number into its integral and fractional parts.
nearbyint, nearbyintf, nearbyintl
Rounds a number to the nearest integer.
nextafter, nextafterf, nextafterl
Calculates the next representable value after a number.
norm
Calculates the square of an absolute.
polar
Returns a complex number of magnitude and angle.
poly, polyl
Evaluates a polynomial.
pow, powf, powl
Calculates xraised to a power of y.
remainder, remainderf, remainderl
Calculates the remainder of x/ y.
remquo, remquof, remquol
Same as remainder but also computes the quotient.
rint, rintf, rintl
Rounds to the nearest integer.
rndtol, rndtonl
Rounds a double to a long.
_rotl, _rotr
Returns the binary left or right rotation of an integer.
round, roundf, roundl
Rounds to the nearest integer.
scalb, scalbf, scalbl
Calculates x * FLT_RADIXn.
scanf
Reads and formats values from the stdin stream.
signbit
Returns the sign bit of a floating-point number.
sin, sinf, sinl
Calculates the sin.
sinh, sinhf, sinhl
Calculates the hyperbolic sine.
sqrt, sqrtf, sqrtl
Returns the square root.
_status87
Gets the floating-point status word
tan, tanf, tanl
Calculates the tangent.
tanh, tanhf, tanhl
Calculates the hyperbolic tangent.
trunc, truncf, truncl
Truncates the fractional portion of a number.
F/V
Description
_memccpy, _fmemccpy
Copies one buffer to another up to a particular character.
memchr, _fmemchr
Returns the index of a character in a buffer.
memcmp, _fmemcmp
Compares two buffers.
memcpy, _fmemcpy, movmem
Copies one buffer to another.
_memicmp, _fmemicmp, _nmemicmp
Compares two buffers, ignoring case.
memmove, _fmemmove
Copies one buffer to another correctly even if they overlap.
memset, _fmemset, setmem
Fills a buffer with a value.
A C program can provide its own memory management, separate
from the operating system. The program memory management
functions obtain only large chunks of memory from the operating system. They then dole it out in smaller blocks as needed by the application. This is faster because it avoids the overhead of making a call to the operating system for each little bit of memory needed. The program's pool of memory is called a heap.
F/V/Description
Operating System (OS) Memory Management
These functions call the operating system (DOS, Phar Lap, Windows
3. x, or Win32) directly to dynamically allocate and free memory
blocks. The function descriptions list compatible operating systems.
F/V/Description
Mouse Package
F/ V Description
Multi-byte Characters
F/ V Description
Operating System and Windows Versions
These variables contain the version number of the operating system
and Windows under which the program is running.
These functions create and manipulate memory from the page heap.
They require a far pointer to the page heap.
These functions manipulate path names.
These functions and variables control execution of processes.
These functions return, initialize, or set random numbers.
F/V/Description
These functions sort and search tables.
Sound
These functions output sound from the PC speaker. They work only
on machines that are compatible with the IBM PC hardware and
software.
These functions operate on null-terminated strings.
F/V/Description
String and Numeric Conversions
These functions convert between various C numeric types and
strings:
Swap Package
These functions move a spawned program's memory image to a
temporary disk file.
Tab Package
These functions control the tab size.
Terminate and Stay Resident Package
The Terminate and Stay Resident (TSR) functions are useful in
programs that can optionally reside in memory or run as a
background process.
Time and Date
These functions and variables access the system time, convert from
one time format to another, and perform other operations regarding
the time and date. UCT is Universal Coordinated Timezone.
Variable Numbers of Function Arguments
Any C function declared __cdecl (the default) can potentially have
a variable number of arguments. C functions declared __pascal
cannot. The following functions access variable arguments.
WINIO (WINDOS) Package
WINIO functions provide a DOS-like procedure based wrapper over
event-driven Windows 3 application code. WINIO is sometimes
called WINDOS. See also Appendix D, The WINIO Library.
X Memory Model
The X386 functions are implemented for the X memory model only.
Variable/Description
Page Package
F/V/Description
Path Names
Process Control
F/V/Description
Random Numbers
Sorting and Searching
F/V/Description
F/V/Description
Strings, Null-terminated
F/V/Description
F/V/Description
F/V/Description
F/V/Description
F/V/Description
F/V/Description
F/V/Description
F/V/Description
Copyright © 1995-2001 Digital Mars. All Rights Reserved.