© Septiembre de 2.003
Steven R. Davidson
[email protected] y
Salvador Pozo
[email protected]
Con Clase: http://www.conclase.net
Librerías estándar C. Indice de Librerías
Librerías ANSI C
Hemos tomado la decisión de separar las descripciones de las librerías de C y C++ de
los cursos.
Por una parte, porque creemos que quedará más claro que C/C++ es un lenguaje
completo en si mismo, las librerías ANSI que se incluyen con todos los compiladores
están escritas en C o en ensamblador, y por lo tanto no son "imprescindibles" para
escribir programas en C.
Es cierto que son una gran ayuda, pero también lo son las librerías que escribe cada
uno para su uso personal.
Por otra parte, estas páginas podrán usarse como consulta para ver el funcionamiento
de cada función individual, sin necesidad de buscarlas a través del curso. Para que la
consulta sea más fácil, se incluye un índice alfabético de funciones, y un índice de
ficheros de cabecera.
Hay que mencionar que todos los ejemplos y explicaciones se refieren a C estándar. De
todos modos, si se quieren utilizar estas librerías en C++ no hay ningún inconveniente,
pero para ceñirse al estándar C++ los ficheros de cabecera se forman sin la extensión
".h" y añadiendo el prefijo "c" al nombre. Por ejemplo, el fichero de cabecera para
stdio en C es <stdio.h>, y en C++ es <cstdio>.
Nota: algunas descripciones de funciones, estructuras y macros han sido extraídas de
la ayuda de los compiladores de Borland y del libro: "C How to Program" de H.M.
DEITEL & P.J. DEITEL.
http://localhost/conclase/c/librerias/libpdf.php [30/08/2003 23:09:01]
Librería assert
Librería assert ANSI C
Únicamente define la macro de depuración assert.
Macros
assert
http://localhost/conclase/c/librerias/libpdfl.php?x=0 [30/08/2003 23:09:26]
Librería ctype
Librería ctype ANSI C
Contiene los prototipos de las funciones y macros de clasificación de caracteres.
Tabla de referencia rápida:
0 - 127 (0x00-0x7F)
(0x7F o 0x00-0x1F)
(0 - 9)
Función Valores
isalnum (A - Z o a - z) o (0 - 9)
isalpha (A - Z o a - z)
isascii
iscntrl
isdigit
isgraph Imprimibles menos ' '
islower
isprint
ispunct Signos de puntuación
(a - z)
Imprimibles incluido ' '
isspace
isupper
isxdigit
espacio, tab, retorno de línea, cambio de
línea, tab vertical, salto de página (0x09
a 0x0D, 0x20).
(A-Z)
(0 to 9, A to F, a to f)
Funciones
tolower
toupper
Macros
isalnum
isdigit
ispunct
toascii
isalpha
isgraph
isspace
isascii
islower
isupper
iscntrl
isprint
isxdigit
http://localhost/conclase/c/librerias/libpdfl.php?x=1 [30/08/2003 23:09:29]
Librería errno
Librería errno ANSI C
Define constantes para los códigos de error, puedes consultarlos editando el fichero
errno.h.
Macros
errno
http://localhost/conclase/c/librerias/libpdfl.php?x=2 [30/08/2003 23:09:33]
Librería float
Librería float ANSI C
Contiene parámetros de entorno, información sobre limitaciones y rangos para tipos
reales.
Nota: Algunas macros serán definidas de igual o mayor en magnitud (valor absoluto) a
los valores indicados, a excepción de la macro FLT_ROUNDS.
Macros
DBL_EPSILON
DBL_DIG
DBL_MAX_10_EXP DBL_MAX_EXP
DBL_MIN_EXP
FLT_MAX
FLT_MIN_10_EXP
LDBL_DIG
LDBL_MAX_10_EXP LDBL_MAX_EXP LDBL_MIN
LDBL_MIN_EXP
FLT_DIG
FLT_MAX_10_EXP FLT_MAX_EXP
FLT_MIN_EXP
LDBL_EPSILON
LDBL_MIN_10_EXP
DBL_MANT_DIG DBL_MAX
DBL_MIN
FLT_EPSILON
DBL_MIN_10_EXP
FLT_MANT_DIG
FLT_MIN
FLT_ROUNDS
FLT_RADIX
LDBL_MANT_DIG LDBL_MAX
http://localhost/conclase/c/librerias/libpdfl.php?x=3 [30/08/2003 23:09:39]
Librería limits
Fichero limits ANSI C
Contiene parámetros de entorno, información sobre limitaciones y rangos para tipos
enteros.
Constantes:
Significado
Constante
CHAR_BIT
Número de bits del tipo char
CHAR_MIN
Valor mínimo del tipo char
CHAR_MAX Valor máximo del tipo char
Valor mínimo del tipo int
INT_MIN
Valor máximo del tipo int
INT_MAX
Valor mínimo del tipo long
LONG_MIN
LONG_MAX Valor máximo del tipo long
SCHAR_MIN
SCHAR_MAX
Valor mínimo del tipo char con
signo
Valor máximo del tipo char con
signo
SHRT_MIN
Valor mínimo del tipo short
SHRT_MAX Valor máximo del tipo short
UCHAR_MAX Valor máximo de unsigned char
USHRT_MAX Valor máximo unsigned short
UINT_MAX
ULONG_MAX Valor máximo unsigned long
Valor máximo unsigned int
http://localhost/conclase/c/librerias/libpdfl.php?x=4 [30/08/2003 23:09:42]
LC_ALL
LC_NUMERIC LC_TIME
NULL
Librería locale
Librería locale ANSI C
Contiene los prototipos de las funciones, macros, y tipos para manipular y controlar
varias opciones pertenecientes a la localidad del sistema.
Funciones
localeconv setlocale
Macros
LC_COLLATE LC_CTYPE LC_MONETARY
Estructuras
lconv
http://localhost/conclase/c/librerias/libpdfl.php?x=5 [30/08/2003 23:09:45]
Librería math
Librería math ANSI C
Contiene los prototipos de las funciones y otras definiciones para el uso y
manipulación de funciones matemáticas.
Funciones
acos
ceil
fabs
ldexp
pow
tan
asin
cos
floor
log
sin
tanh
HUGE_VAL
atan
cosh
fmod
log10
sinh
atan2
exp
frexp
modf
sqrt
Macros
http://localhost/conclase/c/librerias/libpdfl.php?x=6 [30/08/2003 23:09:49]
Librería setjmp
Librería setjmp ANSI C
Contiene los prototipos para las funciones y un tipo para crear y manipular el entorno
al hacer llamadas: registros, pilas, etc..
Funciones
longjmp
setjmp
Estructuras
jmp_buf
http://localhost/conclase/c/librerias/libpdfl.php?x=7 [30/08/2003 23:09:51]
Librería signal
Librería signal ANSI C
Contiene las funciones, macros, y tipos para crear y manipular señales del sistema.
Funciones
raise
signal
Macros
SIGABRT SIGFPE
SIGTERM SIG_DFL
SIGILL
SIGSEGV
SIG_ERR SIG_IGN
Estructuras
sig_atomic_t
http://localhost/conclase/c/librerias/libpdfl.php?x=8 [30/08/2003 23:09:54]
Librería stdarg
Librería stdarg ANSI C
Contiene las macros y tipos para crear y manipular argumentos de variables.
Macros
va_arg
va_end
va_list
va_start
http://localhost/conclase/c/librerias/libpdfl.php?x=9 [30/08/2003 23:09:58]
Librería stddef
Librería stddef ANSI C
Contiene las macros, y tipos comunes.
Macros
NULL
offsetof
Estructuras
ptrdiff_t
size_t
wchar_t
http://localhost/conclase/c/librerias/libpdfl.php?x=10 [30/08/2003 23:10:04]
Librería stdio
Librería stdio ANSI C
Contiene los prototipos de las funciones, macros, y tipos para manipular datos de
entrada y salida.
Funciones
clearerr
fflush
fopen
fputs
fseek
getc
printf
remove
setbuf
tmpfile
vprintf
fclose
fgetc
formato
fread
fsetpos
getchar
putc
rename
setvbuf
tmpnam
vsprintf
feof
fgetpos
fprintf
freopen
ftell
gets
putchar
rewind
sprintf
ungetc
ferror
fgets
fputc
fscanf
fwrite
perror
puts
scanf
sscanf
vfprintf
Macros
EOF
FILENAME_MAX FOPEN_MAX
BUFSIZ
L_tmpnam NULL SEEK_CUR
SEEK_SET stderr
TMP_MAX _IOFBF _IOLBF
stdin
SEEK_END
stdout
_IONBF
Estructuras
FILE
fpos_t
size_t
http://localhost/conclase/c/librerias/libpdfl.php?x=11 [30/08/2003 23:10:07]
Librería stdlib
Librería stdlib ANSI C
Contiene los prototipos de las funciones, macros, y tipos para utilidades de uso general.
Funciones
abs
atol
exit
ldiv
abort
atoi
div
labs
mbstowcs mbtowc
realloc
strtoul
srand
system
atexit
bsearch
free
malloc
qsort
strtod
wctomb
atof
calloc
getenv
mblen
rand
strtol
Macros
EXIT_FAILURE EXIT_SUCCESS MB_CUR_MAX NULL
RAND_MAX
Estructuras
div_t
ldiv_t
size_t
wchar_t
http://localhost/conclase/c/librerias/libpdfl.php?x=12 [30/08/2003 23:10:15]
Librería string
Librería string ANSI C
Contiene los prototipos de las funciones y macros de clasificación de caracteres.
Funciones
memchr
memset
strcoll
strlen
strpbrk
strtok
NULL
Macros
Estructuras
size_t
memcmp memcpy
strcat
strcpy
strncat
strrchr
strxfrm
strchr
strcspn
strncmp
strspn
memmove
strcmp
strerror
strncpy
strstr
http://localhost/conclase/c/librerias/libpdfl.php?x=13 [30/08/2003 23:10:18]
Librería time
Librería time ANSI C
Contiene los prototipos de las funciones, macros, y tipos para manipular la hora y la
fecha del sistema.
Funciones
asctime
gmtime
time
clock
localtime mktime
ctime
difftime
strftime
Macros
CLOCKS_PER_SEC NULL
Estructuras
clock_t
size_t
time_t
tm
http://localhost/conclase/c/librerias/libpdfl.php?x=14 [30/08/2003 23:10:22]
Librerías estándar C. Indice de Funciones
Indice de funciones
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
-A-
Función
Librería
Fichero de
cabecera C
abort
abs
acos
asctime
asin
atan
atan2
atexit
atof
atoi
atol
stdlib
stdlib
math
time
math
math
math
stdlib
stdlib
stdlib
stdlib
stdlib.h
stdlib.h
math.h
time.h
math.h
math.h
math.h
stdlib.h
stdlib.h
stdlib.h
stdlib.h
-B-
Fichero de
cabecera
C++
cstdlib
cstdlib
cmath
ctime
cmath
cmath
cmath
cstdlib
cstdlib
cstdlib
cstdlib
Función
Librería
Fichero de
cabecera C
bsearch
stdlib
stdlib.h
Fichero de
cabecera
C++
cstdlib
-C-
Función
Librería
Fichero de
cabecera C
calloc
ceil
clearerr
clock
cos
cosh
stdlib
math
stdio
time
math
math
stdlib.h
math.h
stdio.h
time.h
math.h
math.h
Fichero de
cabecera
C++
cstdlib
cmath
cstdio
ctime
cmath
cmath
http://localhost/conclase/c/librerias/funspdf.php (1 de 7) [30/08/2003 23:12:53]
Librerías estándar C. Indice de Funciones
ctime
time
time.h
-D-
Función
Librería
Fichero de
cabecera C
difftime
div
time
stdlib
time.h
stdlib.h
-E-
Función
Librería
Fichero de
cabecera C
exit
exp
stdlib
math
stdlib.h
math.h
-F-
Función
Librería
Fichero de
cabecera C
fabs
fclose
feof
ferror
fflush
fgetc
fgetpos
fgets
floor
fmod
fopen
formato
fprintf
fputc
fputs
fread
math
stdio
stdio
stdio
stdio
stdio
stdio
stdio
math
math
stdio
stdio
stdio
stdio
stdio
stdio
math.h
stdio.h
stdio.h
stdio.h
stdio.h
stdio.h
stdio.h
stdio.h
math.h
math.h
stdio.h
stdio.h
stdio.h
stdio.h
stdio.h
stdio.h
ctime
Fichero de
cabecera
C++
ctime
cstdlib
Fichero d
Comentarios de: Librerías estándar C (0)
No hay comentarios