[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Certain data items are used by the WATCOM C run-time library and may be
inspected (or changed in some cases) by a program. The defined items are:
_amblksiz
Prototype in <stdlib.h>.
This unsigned int data item contains the increment by which the "break"
pointer for memory allocation will be advanced when there is no freed
block large enough to satisfy a request to allocate a block of memory.
This value may be changed by a program at any time.
_argc
This int item contains the number of arguments passed to main.
_argv
This char ** item contains a pointer to a vector containing the actual
arguments passed to main.
daylight
Prototype in <time.h>.
This unsigned int has a value of one when daylight saving time is
supported in this locale and zero otherwise. Whenever a time function
is called, the tzset function is called to set the value of the
variable. The value will be determined from the value of the TZ
environment variable.
_doserrno
Prototype in <stdlib.h>.
This int item contains the actual error code returned when a DOS
function fails.
environ
Prototype in <stdlib.h>.
This char ** __near data item is a pointer to an array of character
pointers to the environment strings.
errno
Prototype in <errno.h>.
This int item contains the number of the last error that was detected.
The run-time library never resets errno to 0. Symbolic names for
these errors are found in the <errno.h> header file. See the
descriptions for the perror and strerror functions for information
about the text which describes these errors.
fltused_
The C compiler places a reference to the fltused_ symbol into any
module that uses a floating-point library routine or library routine
that requires floating-point support (e.g., the use of "%f" in the
printf function).
_fmode
Prototype in <stdlib.h>.
This data item contains the default type of file (text or binary)
translation for a file. It will contain a value of either
O_BINARY
indicates that data is transmitted to and from streams unchanged.
O_TEXT
indicates that carriage return characters are added before linefeed
characters on output operations and are removed on input operations
when they precede linefeed characters.
These values are defined in the <fcntl.h> header file. The value of
_fmode may be changed by a program to change the default behavior of
the open, fopen, creat and sopen functions.
__minreal
Prototype in <stdlib.h>.
This data item contains the minimum amount of real memory (below 640K)
to reserve when running a 32-bit DOS extended application.
_osmajor
Prototype in <stdlib.h>.
This unsigned char variable contains the major number for the version of
DOS executing on the computer. If the current version is 3.20, then the
value will be 3.
_osminor
Prototype in <stdlib.h>.
This unsigned char variable contains the minor number for the version of
DOS executing on the computer. If the current version is 3.20, then the
value will be 20.
_osmode
Prototype in <stdlib.h>.
This unsigned char variable contains either the value DOS_MODE which
indicates the program is running in real address mode, or it contains
the value OS2_MODE which indicates the program is running in protected
address mode.
_psp
Prototype in <stdlib.h>.
This data item contains the segment value for the DOS Program Segment
Prefix. Consult the technical documentation for your DOS system for the
process information contained in the Program Segment Prefix.
_stacksize
On 16-bit 80x86 systems, this unsigned int value contains the size of
the stack for a TINY memory model program. Changing the value of this
item during the execution of a program will have no effect upon the
program, since the value is used when the program starts execution. To
change the size of the stack to be 8K bytes, a statement such as follows
can be included with the program.
unsigned int _stacksize = { 8 * 1024 };
stdaux
Prototype in <stdio.h>.
This variable (with type FILE *) indicates the standard auxiliary port.
stderr
Prototype in <stdio.h>.
This variable (with type FILE *) indicates the standard error stream
(set to the console by default).
stdin
Prototype in <stdio.h>.
This variable (with type FILE *) indicates the standard input stream
(set to the console by default).
stdout
Prototype in <stdio.h>.
This variable (with type FILE *) indicates the standard output stream
(set to the console by default).
stdprn
Prototype in <stdio.h>.
This variable (with type FILE *) indicates the standard printer.
sys_errlist
Prototype in <stdlib.h>.
This variable is an array of pointers to character strings for each
error code defined in the <errno.h> header file.
sys_nerr
Prototype in <stdlib.h>.
This int variable contains the number of messages declared in
sys_errlist.
_threadid
Prototype in <stddef.h>.
This variable contains a far pointer to an int which points to the id of
the current thread. This variable is defined only in the CLIBMTL
library for OS/2.
timezone
Prototype in <time.h>.
This long int contains the number of seconds of time that the local time
zone is earlier than Coordinated Universal Time (UTC) (formerly known as
Greenwich Mean Time (GMT)). Whenever a time function is called, the
tzset function is called to set the value of the variable. The value
will be determined from the value of the TZ environment variable.
tzname
Prototype in <time.h>.
This array of two pointers to character strings indicates the name of
the standard abbreviation for the time zone and the name of the
abbreviation for the time zone when daylight saving time is in effect.
Whenever a time function is called, the tzset function is called to
set the values in the array. These values will be determined from the
value of the TZ environment variable.
__win_flags_alloc
Prototype in <stdlib.h>.
This unsigned long int variable contains the flags to be used when
allocating memory in Windows.
__win_flags_realloc
Prototype in <stdlib.h>.
This unsigned long int variable contains the flags to be used when
reallocating memory in Windows.
Online resources provided by: http://www.ClipX.Net --- NG 2 HTML conversion by Dave Pearson