3.10 Standard Types

A number of library routines use values whose types are defined in include files. The following list describes these types and gives the include file where they are defined.

Standard Type Description

clock_t The clock_t type, defined in TIME.H, stores time values. It is used by the clock function.
_complex The _complex structure, defined in MATH.H, stores the real and imaginary parts of complex numbers. It is used by the _cabs function.
_diskfree_t The _diskfree_t structure, defined in DOS.H, stores disk information used by the _dos_getdiskfree routine.
_diskinfo_t The _diskinfo_t structure, defined in BIOS.H, records information about disk drives returned by the _bios_disk routine.
div_t, ldiv_t The div_t and ldiv_t structures, defined in STDLIB.H, store the values returned by the div and ldiv functions, respectively.
_dosdate_t The _dosdate_t structure, defined in DOS.H, records the current system date used in the _dos_getdate and _dos_setdate routines.
_dostime_t The _dostime_t structure, defined in DOS.H, records the current system time used in the _dos_gettime and _dos_settime routines.
_DOSERROR The _DOSERROR structure, defined in DOS.H, stores values returned by DOS system call 59H (available with DOS versions 3.0 and later).
_exception The _exception structure, defined in MATH.H, stores error information for math routines. It is used by the _matherr routine.
FILE The FILE structure, defined in STDIO.H, is the structure used in all stream input and output operations. The fields of the FILE structure store information about the current state of the stream.
_find_t The _find_t structure, defined in DOS.H, stores file-attribute information returned by the _dos_findfirst and _dos_findnext routines.
fpos_t The fgetpos and fsetpos functions use the fpos_t object type, defined in STDIO.H, to record all the information necessary to uniquely specify every position within the file.
jmp_buf The jmp_buf type, defined in SETJMP.H, is an array type rather than a structure type. A buffer of this type is used by the setjmp and longjmp routines to save and restore the program environment.
lconv The lconv type, defined in LOCALE.H, is a structure containing formatting rules for numeric values in different countries.
_onexit_t The _onexit routine is declared as an _onexit_t pointer type, which is defined in STDLIB.H.
ptrdiff_t The ptrdiff_t type is used for the signed integral result of the subtraction of two pointers.
_REGS The _REGS union, defined in DOS.H, stores byte and word register values to be passed to and returned from calls to the DOS interface functions.
sig_atomic_t The sig_atomic_t type, defined in SIGNAL.H, is the integral type of an object that can be modified as an atomic entity, even in the presence of asynchronous interrupts. It is used in conjunction with the signal routine.
size_t The size_t type, defined in STDDEF.H and several other include files, is the unsigned integral result of the sizeof operator.
_SREGS The _SREGS structure, defined in DOS.H, stores the values of the ES, CS, SS, and DS registers. This structure is used by the DOS interface functions that require segment register values (_int86x, _intdosx, and _segread).
_stat The _stat structure, defined in SYS\STAT.H, contains file-status information returned by the _stat and _fstat routines.
time_t The time_t type, defined in TIME.H, represents time values in the mktime and time routines.
_timeb The _timeb structure, defined in SYS\TIMEB.H, is used by the _ftime routine to store the current system time.
tm The tm structure, defined in TIME.H, is used by the asctime, gmtime, and localtime functions to store and retrieve time information.
_utimbuf The _utimbuf structure, defined in SYS\UTIME.H, stores file access and modification times used by the _utime function to change file-modification dates.
va_list The va_list array type, defined in STDARG.H, is used to hold information needed by the va_arg macro and the va_end routine. The called function declares a variable of type va_list, which can be passed as an argument to another function.
_vmhnd_t The _vmhnd_t type, defined in VMEMORY.H, represents the handles to blocks of virtual memory. Handles of this type are returned by _vmalloc and used by the virtual memory routines.
wchar_t The wchar_t type, defined in STDDEF.H and STDLIB.H, is the internal type of a wide character. It is required by the ANSI standard for the C language and is useful when writing portable programs for international markets.
_wopeninfo The _wopeninfo type is a structure containing information needed to open a new QuickWin window. It is defined in IO.H.
_wsizeinfo The _wsizeinfo type is a structure containing information needed to initialize the size of a new QuickWin window, to examine the size of an existing QuickWin window, or to resize an existing QuickWin window. It is defined in IO.H.