Man page - stdio(3)

Packages contains this manual

Available languages:

en fr es pl ja ru zh_TW zh_CN de

Manual

stdio

NOMBRE
BIBLIOTECA
SINOPSIS
DESCRIPCIÓN
List of functions
ESTÁNDARES
HISTORIAL
VÉASE TAMBIÉN
TRADUCCIÓN

NOMBRE

stdio - funciones de biblioteca de entrada/salida estándar.

BIBLIOTECA

Biblioteca Estándar C ( libc , -lc )

SINOPSIS

#include <stdio.h>

FILE * stdin ;
FILE *
stdout ;
FILE *
stderr ;

DESCRIPCIÓN

La biblioteca de E/S estándar proporciona una interfaz de flujo (stream) utilizando un sistema de buffers (memoria intermedia) simple y eficiente. La entrada y la salida se mapean en flujos lógicos de datos y las caracteristicas fisicas de E/S permanecen ocultas para el programador. Las funciones y las macros se muestran mas adelante; para mas información se puede recurrir a las paginas del manual individuales para cada una de ellas.

A stream is associated with an external file (which may be a physical device) by opening a file, which may involve creating a new file. Creating an existing file causes its former contents to be discarded. If a file can support positioning requests (such as a disk file, as opposed to a terminal), then a file position indicator associated with the stream is positioned at the start of the file (byte zero), unless the file is opened with append mode. If append mode is used, it is unspecified whether the position indicator will be placed at the start or the end of the file. The position indicator is maintained by subsequent reads, writes, and positioning requests. All input occurs as if the characters were read by successive calls to the fgetc (3) function; all output takes place as if all characters were written by successive calls to the fputc (3) function.

Un archivo se desentiende de un flujo cerrando dicho archivo. Los flujos de salida son descargados (toda el contenido de la memoria intermedia que no fue escrita al archivo, se transmite en ese momento) antes de que el flujo se desentienda del fichero. El valor de un puntero que apunta a un objeto FILE es indeterminado tras el cierre del archivo.

Un archivo será reabierto repitidamente, por la misma u otras ejecuciones de un programa, y sus contenidos serán leidos o modificados (si se puede reposicionar al principio). Si la función main() retorna a quien llamo al programa, o se utiliza la función exit (3) todos los archivos abiertos serán cerrados (consecuentemente todos los flujos de salida serán descargados sobre sus respectivos ficheros) antes de que se produzca el cierre efectivo del programa.Otras formas de terminar un programa como abort (3) no se preocupan de cerrar los archivos apropiadamente.

At program startup, three text streams are predefined and need not be opened explicitly: standard input (for reading conventional input), standard output (for writing conventional output), and standard error (for writing diagnostic output). These streams are abbreviated stdin , stdout , and stderr . When opened, the standard error stream is not fully buffered; the standard input and output streams are fully buffered if and only if the streams do not refer to an interactive device.

Los flujos de salida que hacen referencia a dispositivos de tipo terminal, siempre utilizan memorias intermedias líneales por defecto; durante la salida hacia cada flujo se escribe automáticamente un flujo de entrada que hace referencia al dispositivo terminal que lee. En los casos donde se requieren una enorme cantidad de calculos, despues de imprimir parte de una línea en un terminal de salida, es necesario efectuar una descarga de la memoria intermedia en el flujo de salida estándar mediante fflush (3) antes de dejarlo y comenzar los calculos para que la salida aparezca.

The stdio library is a part of the library libc and routines are automatically loaded as needed by cc (1). The SYNOPSIS sections of the following manual pages indicate which include files are to be used, what the compiler declaration for the function looks like and which external variables are of interest.

The following are defined as macros; these names may not be reused without first removing their current definitions with #undef : BUFSIZ , EOF , FILENAME_MAX , FOPEN_MAX , L_cuserid , L_ctermid , L_tmpnam , NULL , SEEK_END , SEEK_SET , SEEK_CUR , TMP_MAX , clearerr , feof , ferror , fileno , getc , getchar , putc , putchar , stderr , stdin , stdout . Function versions of the macro functions feof , ferror , clearerr , fileno , getc , getchar , putc , and putchar exist and will be used if the macros definitions are explicitly removed.

List of functions

Image grohtml-3958261-1.png

ESTÁNDARES

C11, POSIX.1-2008.

HISTORIAL

C89, POSIX.1-2001.

VÉASE TAMBIÉN

close (2), open (2), read (2), write (2), stdout (3), unlocked_stdio (3)

TRADUCCIÓN

La traducción al español de esta página del manual fue creada por Juan Piernas <piernas@ditec.um.es> y Miguel Pérez Ibars <mpi79470@alu.um.es>

Esta traducción es documentación libre; lea la GNU General Public License Version 3 o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD.

Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a debian-l10n-spanish@lists.debian.org .