|
|
TopPage > C言語関係 > GCC library Memo |
function name |
note |
extern int tolower
__THROW |
Return the lowercase version of C. |
extern int toupper
__THROW |
Return the uppercase version of C. |
define | value | note |
EOF | -1 | End of file character |
SEEK_SET | 0 | Seek from beginning of file |
SEEK_CUR | 1 | Seek from current position |
SEEK_END | 2 | Seek from end of file |
function name |
note |
int remove
__THROW |
Remove file FILENAME |
int rename
__const char *__new) __THROW |
Rename file OLD to NEW |
int fclose
|
Close STREAM |
int fflush
|
Flush STREAM, or all streams if STREAM is NULL. |
FILE *fopen
__const char *__restrict __modes) |
Open a file and create a new stream for it |
FILE *freopen
__const char *__restrict __modes, FILE *__restrict __stream) |
Open a file, replacing an existing stream with it |
void setbuf
char *__restrict __buf) __THROW |
If BUF is NULL, make STREAM unbuffered. Else make it use buffer BUF, of size BUFSIZ |
int setvbuf
char *__restrict __buf, int __modes, size_t __n) __THROW |
Make STREAM use buffering mode MODE |
int fprintf
__const char *__restrict __format, ...) |
Write formatted output to STREAM |
int printf
|
Write formatted output to stdout |
int sprintf
__const char *__restrict __format, ...) __THROW |
Write formatted output to S |
int vfprintf
__const char *__restrict __format, _G_va_list __arg) |
Write formatted output to S from argument list ARG |
int vsprintf
__const char *__restrict __format, _G_va_list __arg) __THROW |
Write formatted output to S from argument list ARG |
int fscanf
__const char *__restrict __format, ...) |
Read formatted input from STREAM |
int scanf
|
Read formatted input from stdin |
int sscanf
__const char *__restrict __format, ...) __THROW |
Read formatted input from S |
int fgetc
int getc
|
Read a character from STREAM |
int getchar
|
Read a character from stdin |
int fputc
FILE *__stream) int putc
FILE *__stream) |
Write a character to STREAM |
int putchar
|
Write a character to stdout |
char *fgets
int __n, FILE *__restrict __stream |
Get a newline-terminated string of finite length from STREAM |
char *gets
|
Get a newline-terminated string from stdin, removing the newline. DO NOT USE THIS FUNCTION!! There is no limit on how much it will read |
int fputs
FILE *__restrict __stream) |
Write a string to STREAM |
int puts
|
Write a string, followed by a newline, to stdout. |
int ungetc
FILE *__stream) |
Push a character back onto the input buffer of STREAM |
size_t fread
size_t __n, FILE *__restrict __stream) |
Read chunks of generic data from STREAM |
size_t fwrite
size_t __size, size_t __n, FILE *__restrict __s) |
Write chunks of generic data to STREAM |
int fseek
long int __off, int __whence) |
Seek to a certain position on STREAM |
long int ftell
|
Return the current position of STREAM |
void rewind
|
Rewind to the beginning of STREAM |
int fgetpos
fpos_t *__restrict __pos) |
Get STREAM's position |
int fsetpos
__const fpos_t *__pos) |
Set STREAM's position |
void clearerr
__THROW |
Clear the error and EOF indicators for STREAM |
int feof
__THROW |
Return the EOF indicator for STREAM |
int ferror
__THROW |
Return the error indicator for STREAM |
void perror
|
Print a message describing the meaning of the value of errno |
define | value | note |
RAND_MAX | 2147483647 | The largest number rand will return (same as INT_MAX). |
EXIT_FAILURE | 1 | Failing exit status. |
EXIT_SUCCESS | 0 | Successful exit status. |
function name |
note |
extern double strtod
char **__restrict __endptr) __THROW __nonnull ((1)) |
Convert a string to a floating-point number. |
extern long int strtol
char **__restrict __endptr, int __base) __THROW __nonnull ((1)) |
Convert a string to a long integer. |
extern unsigned long int strtoul
char **__restrict __endptr, int __base) __THROW __nonnull ((1)) |
Convert a string to an unsigned long integer. |
extern int rand
__THROW |
Return a random integer between 0 and RAND_MAX inclusive. |
extern void srand
__THROW |
Seed the random number generator with the given number. |
extern void *malloc
__THROW __attribute_malloc__ |
Allocate SIZE bytes of memory. |
extern void *calloc
size_t __size) __THROW __attribute_malloc__ |
Allocate NMEMB elements of SIZE bytes each, all initialized to 0. |
extern void *realloc
size_t __size) __THROW __attribute_malloc__ |
Re-allocate the previously allocated block in PTR, making the new block SIZE bytes long. |
extern int atexit
__THROW __nonnull ((1)) |
Register a function to be called when `exit' is called. |
extern void exit
__THROW __attribute__ ((__noreturn__)) |
Call all functions registered with `atexit' and `on_exit', in the reverse of the order in which they were registered perform stdio cleanup, and terminate program execution with STATUS. |
extern char *getenv
__THROW __nonnull ((1)) |
Return the value of envariable NAME, or NULL if it doesn't exist. |
extern int system
|
Execute the given line as a shell command. This function is a cancellation point and therefore not marked with __THROW. |
extern void *bsearch
__const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __nonnull ((1, 2, 5)) |
Do a binary search for KEY in BASE, which consists of NMEMB elements of SIZE bytes each, using COMPAR to perform the comparisons. |
extern void qsort
size_t __nmemb, size_t __size, __compar_fn_t __compar) __nonnull ((1, 4)) |
Sort NMEMB elements of BASE, of SIZE bytes each, using COMPAR to perform the comparisons. |
extern int abs
__THROW __attribute__ ((__const__))
__THROW __attribute__ ((__const__)) |
Return the absolute value of X. |
extern div_t div
int __denom) __THROW __attribute__ ((__const__))
long int __denom) __THROW __attribute__ ((__const__)) |
Return the `div_t', `ldiv_t' or `lldiv_t' representation of the value of NUMER over DENOM. GCC may have built-ins for these someday. |
extern int mblen
size_t __n) __THROW |
Return the length of the multibyte character in S, which is no longer than N. |
extern int mbtowc
__const char *__restrict __s, size_t __n) __THROW |
Return the length of the given multibyte character, putting its `wchar_t' representation in *PWC. |
extern int wctomb
wchar_t __wchar) __THROW |
Put the multibyte character represented by WCHAR in S, returning its length. |
extern size_t mbstowcs
__const char *__restrict __s, size_t __n) __THROW |
Convert a multibyte string to a wide char string. |
extern size_t wcstombs
__const wchar_t *__restrict __pwcs, size_t __n) _THROW |
Convert a wide char string to multibyte string. |
function name |
note |
extern void *memcpy
__const void *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)) |
Copy N bytes of SRC to DEST. |
extern void *memmove
__const void *__src, size_t __n) __THROW __nonnull ((1, 2)) |
Copy N bytes of SRC to DEST, guaranteeing correct behavior for overlapping strings. |
extern void *memset
int __c, size_t __n) __THROW __nonnull ((1)) |
Set N bytes of S to C. |
extern int memcmp
__const void *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)) |
Compare N bytes of S1 and S2. |
extern void *memchr
int __c, size_t __n) __THROW __attribute_pure__ __nonnull ((1)) |
Search N bytes of S for C. |
extern char *strcpy
__const char *__restrict __src) __THROW __nonnull ((1, 2)) |
Copy SRC to DEST. |
extern char *strncpy
__const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)) |
Copy no more than N characters of SRC to DEST. |
extern char *strcat
__const char *__restrict __src) __THROW __nonnull ((1, 2)) |
Append SRC onto DEST. |
extern char *strncat
__const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)) |
Append no more than N characters from SRC onto DEST. |
extern int strcmp
__const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)) |
Compare S1 and S2. |
extern int strncmp
__const char *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)) |
Compare N characters of S1 and S2. |
extern int strcoll
__const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)) |
Compare the collated forms of S1 and S2. |
extern size_t strxfrm
__const char *__restrict __src, size_t __n) __THROW __nonnull ((2)) |
Put a transformation of SRC into no more than N bytes of DEST. |
extern char *strchr
int __c) __THROW __attribute_pure__ __nonnull ((1)) |
Find the first occurrence of C in S. |
extern char *strrchr
int __c) __THROW __attribute_pure__ __nonnull ((1)) |
Find the last occurrence of C in S. |
extern size_t strcspn
__const char *__reject) __THROW __attribute_pure__ __nonnull ((1, 2)) |
Return the length of the initial segment of S which consists entirely of characters not in REJECT. |
extern size_t strspn
__const char *__accept) __THROW __attribute_pure__ __nonnull ((1, 2)) |
Return the length of the initial segment of S which consists entirely of characters in ACCEPT. |
extern char *strpbrk
__const char *__accept) __THROW __attribute_pure__ __nonnull ((1, 2)) |
Find the first occurrence in S of any character in ACCEPT. |
extern char *strstr
__const char *__needle) __THROW __attribute_pure__ __nonnull ((1, 2)) |
Find the first occurrence of NEEDLE in HAYSTACK. |
extern char *strtok
__const char *__restrict __delim) __THROW __nonnull ((2)) |
Divide S into tokens separated by characters in DELIM. |
extern size_t strlen
__THROW __attribute_pure__ __nonnull ((1)) |
Return the length of S. |
extern char *strerror
__THROW |
Return a string describing the meaning of the `errno' code in ERRNUM. |
TopPage > C言語関係 > GCC library Memo |