Site hosted by Angelfire.com: Build your free website today!

Table of Contents Previous Next


3. The Standard C Macros

There are 80 macros defined by Standard C.  Most of them are described in the relevant header file pages, but some are listed here.  The first column contains the macro name, the second column the header file in which the macro is defined, and the third column gives a description of the macro.  If the macro has been described elsewhere, the second column provides a link to the reference, and the third column is blank.  Groups of similar macro names are suffixed with * and the second column refers to the relevant header file.


BUFSIZ <stdio.h> The preferred size of stream buffers.  Used by setbuf.
CHAR_* See <limits.h>
CLOCKS_PER_SEC <time.h> clock()/CLOCKS_PER_SEC gives elapsed processor time in seconds.
DBL_* See <float.h>
EDOM <errno.h> Reported on a domain error.
EFPOS <errno.h> Not a widely used name; used by functions that alter file position.
EOF <stdio.h> Used to signal end-of-file.  It has negative value.  See this EOF description for more information.
ERANGE <errno.h> Reported on an underflow or overflow.
EXIT_FAILURE <stdlib.h> Argument to exit, or return value from main, for failure.
EXIT_SUCCESS <stdlib.h> Argument to exit, or return value from main, for success.
FILE <stdio.h> Control block that records state of a stream.
FILENAME_MAX <stdio.h> Length of a character buffer large enough to hold a file name.
FLT_* See <float.h>
FOPEN_MAX <stdio.h> How many files your program can have open, at a minimum.
HUGE_VAL <math.h> The IEEE 754 code for +Inf.
INT_* See <limits.h>
LC_ALL <locale.h> First argument to setlocale - all categories.
LC_COLLATE <locale.h> First argument to setlocale - collation sequences.
LC_CTYPE <locale.h> First argument to setlocale - classification of characters.
LC_MONETARY <locale.h> First argument to setlocale - monetary formatting.
LC_NUMERIC <locale.h> First argument to setlocale - other numeric formatting.
LC_TIME <locale.h> First argument to setlocale - times.
LDBL_* See <float.h>
LONG_* See <limits.h>
L_tmpnam <stdio.h> Length of a character buffer large enough to hold a temporary file name.
MB_CUR_MAX <stdlib.h> Maximum length for a multibyte sequence.
MB_LEN_MAX <limits.h> Maximum number of bytes in multibyte character, for any supported locale.
NULL <locale.h>
<stddef.h>
<stdio.h>
<stdlib.h>
<string.h>
<time.h>
Almost-universal null pointer constant.  See this NULL description for more information.
RAND_MAX <stdlib.h> Use this value to scale values returned from rand.
SCHAR_* See <limits.h>
SEEK_CUR <stdio.h> Third argument (origin) to fseek - current position.
SEEK_END <stdio.h> Third argument (origin) to fseek - end of file.
SEEK_SET <stdio.h> Third argument (origin) to fseek - beginning.
SHRT_* See <limits.h>
SIG* See <signal.h>
TMP_MAX <stdio.h> The number of distinct file names tmpnam creates before repeating.
U* See <limits.h>


Table of Contents Previous Next

Last modified: Fri Dec 15 2000