The Cygnus C Support Library
groups its functions accordingly in appropriate header files (the header
filename being in parenthesis, pointing to a header file’s main directory,
such as stdlib.h,
ctype.h
or stdio.h).
Standard
Utility Functions (stdlib.h)
- abort
[abnormal termination of a program]
- abs
[integer absolute value (magnitude)]
- assert
[macro for debugging diagnostics]
- atexit
[request execution of functions at program exit]
- atof,
atoff
[string to double or float]
- atoi,
atol
[string to integer]
- bsearch
[binary search]
- calloc
[allocate space for arrays]
- div
[divide two integers]
- ecvt,
ecvtf, fcvt, fcvtf
[double or float to string]
- gvcvt,
gcvtf
[format double or float as string]
- ecvtbuf,
fcvtbuf
[double or float to string]
- exit
[end program execution]
- getenv
[look up environment variable]
- labs
[long integer absolute value]
- ldiv
[divide two long integers]
- malloc,
realloc, free
[manage memory]
- mmbtowc
[minimal multibyte to wide char converter]
- qsort
[sort an array]
- rand,
srand
[pseudo-random numbers]
- strtod,
strtodf
[string to double or float]
- strtol
[string to long]
- strtoul
[string to unsigned long]
- system
[execute command string]
- wctomb
[minimal wide char to multibyte converter]
Character
Type Macros and Functions (ctype.h)
- isalnum
[alphanumeric character predicate]
- isalpha
[alphabetic character predicate]
- isascii
[ASCII character predicate]
- iscntrl
[control character predicate]
- isdigit
[decimal digit predicate]
- islower
[lower-case character predicate]
- isprint,
isgraph
[printable character predicates]
- ispunct
[punctuation character predicate]
- isspace
[whitespace character predicate]
- isupper
[uppercase character predicate]
- isxdigit
[hexadecimal digit predicate]
- toascii
[force integers to ASCII range]
- tolower
[translate characters to lower case]
- toupper
[translate characters to upper case]
Input
and Output (stdio.h)
- clearerr
[clear file or stream error indicator]
- fclose
[close a file]
- feof
[test for end of file]
- ferror
[test whether read/write error has occurred]
- fflush
[flush buffered file output]
- fgetc
[get a character from a file or stream]
- fgetpos
[record position in a stream or file]
- fgets
- [get character string from
a file or stream]
- fiprintf
[format output to file (integer only)]
- fopen
[open a file]
- fdopen
[turn open file into a stream]
- fputc
[write a character on a stream or file]
- fputs
[write a character string in a file or stream]
- fread
[read array elements from a file]
- freopen
[open a file using an existing file descriptor]
- fseek
[set file position]
- fsetpos
[restore position of a stream or file]
- ftell
[return position in a stream or file]
- fwrite
[write array elements]
- getc
[read a character (macro)]
- getchar
[read a character (macro)]
- gets
[get character string]
- iprintf
- [write formatted output
(integer only)]
- mktemp,
mkstemp
[generate unused file name]
- perror
[print an error message on standard error]
- putc
[write a character (macro)]
- putchar
[write a character (macro)]
- puts
[write a character string]
- remove
[delete a file's name]
- rename
[rename a file]
- rewind
[reinitialize a file or stream]
- setbuf
[specify full buffering for a file or stream]
- setvbuf
[specify file or stream buffering]
- siprintf
[write formatted output (integer only)]
- printf,
fprintf, sprintf
[format output]
- scanf,
fscanf, sscanf
[scan and format input]
- tmpfile
[create a temporary file]
- tmpnam,
tempnam
[name for a temporary file]
- vprintf,
vfprintf, vsprintf
[format argument list]
Strings
and Memory (string.h)
- bcmp
[compare two memory areas]
- bcopy
[copy memory regions]
- bzero
[initialize memory to zero]
- index
[search for character in string]
- memchr
[find character in memory]
- memcmp
[compare two memory areas]
- memcpy
[copy memory regions]
- memmove
[move possibly overlapping memory]
- memset
[set an area of memory]
- rindex
[reverse search for character in string]
- strcat
[concatenate strings]
- strchr
[search for character in string]
- strncmp
[character string compare]
- strcoll
[locale specific character string compare]
- strcpy
[copy string]
- strcspn
[count chars not in string]
- strerror
[convert error number to string]
- strlen
[character string length]
- strncat
[concatenate strings]
- strncmp
[character string compare]
- strncpy
[counted copy string]
- strpbrk
[find chars in string]
- strrchr
[reverse search for character in string]
- strspn
[find initial match]
- strstr
[find string segment]
- strtok
[get next token from a string]
- strxfrm
[transform string]
Time
Functions (time.h)
- asctime
[format time as string]
- clock
[cumulative processor time]
- ctime
[convert time to local and format as string]
- difftime
[subtract two times]
- gmtime
[convert time to UTC traditional form]
- localtime
[convert time to local representation]
- mktime
[convert time to arithmetic representation]
- strftime
[flexible calendar time formatter]
- time
[get current calendar time (as single number)]
See also Signal
Handling (signal.h), Locale
(locale.h), Miscellaneous
Macros and Functions, ANSI-standard
macros, stdarg.h, Traditional
macros, varargs.h, System
Calls and Reentrant
covers for OS subroutines for miscellaneous functions and
macros.
Reentrancy is a characteristic
of library functions which allows multiple processes to use the same address
space with assurance that the values stored in those spaces will remain
constant between calls.
Cygnus ensures that the implementation
of the library functions is,whenever possible, are reentrant. For more
discussion, see Reentrancy.