stdio(5) stdio(5)
NAME
stdio - standard buffered input/output
SYNOPSIS
#include <stdio.h>
DESCRIPTION
The stdio() header defines the following macro names as positive
integral constant expressions:
BUFSIZ Size of <stdio.h> buffers.
FILENAMEMAX Maximum size in bytes of the longest filename string
that the implementation guarantees can be opened.
FOPENMAX Number of streams which the implementation guarantees
can be open simultaneously. The value will be at least
eight.
IOFBF Input/output fully buffered.
IOLBF Input/output line buffered.
IONBF Input/output unbuffered.
Lctermid Maximum size of character array to hold ctermid() out-
put.
Lcuserid Maximum size of character array to hold cuserid() out-
put.
Ltmpnam Maximum size of character array to hold tmpnam() out-
put.
SEEKCUR Seek relative to current position.
SEEKEND Seek relative to end-of-file.
SEEKSET Seek relative to start-of-file.
TMPMAX Minimum number of unique filenames generated by
tmpnam(). Maximum number of times an application can
call tmpnam() reliably. The value of TMPMAX will be
at least 10,000.
The following macro name is defined as a negative integral constant
expression:
EOF End-of-file return value.
Page 1 Reliant UNIX 5.44 Printed 11/98
stdio(5) stdio(5)
The following macro name is defined as a null pointer constant:
NULL Null pointer.
The following macro name is defined as a string constant:
Ptmpdir Default directory prefix for tempnam().
The following macro names are defined as expressions of type pointer
to FILE:
stderr Standard error output stream.
stdin Standard input stream.
stdout Standard output stream.
The following data types are defined through typedef:
FILE A structure containing information about a file.
fpost Type containing all information needed to specify
uniquely every position within a file.
valist As described in <stdarg.h>.
sizet As described in <stddef.h>.
The following are declared as functions and may also be defined as
macros:
void clearerr(FILE *stream);
char *ctermid(char *s);
char *cuserid(char *s);
int fclose(FILE *stream);
FILE *fdopen(int fildes, const char *mode);
int feof(FILE *stream);
int ferror(FILE *stream);
int fflush(FILE *stream);
int fgetc(FILE *stream);
int fgetpos(FILE *stream, fpost *pos);
char *fgets(char *s, int n, FILE *stream);
int fileno(FILE *stream);
FILE *fopen(const char *filename, const char *mode);
int fprintf(FILE *stream, const char *format, ...);
int fputc(int c, FILE *stream);
int fputs(const char *s, FILE *stream);
sizet fread(void *ptr, sizet size, sizet nitems,
FILE *stream);
FILE *freopen(const char *filename, const char *mode,
FILE *stream);
int fscanf(FILE *stream, const char *format, ...);
Page 2 Reliant UNIX 5.44 Printed 11/98
stdio(5) stdio(5)
int fseek(FILE *stream, long int offset, int whence);
int fsetpos(FILE *stream, const fpost *pos);
long int ftell(FILE *stream);
sizet fwrite(const void *ptr, sizet size, sizet nitems,
FILE *stream);
int getc(FILE *stream);
int getchar(void);
int getopt(int argc, char * const argv[],
const char *optstring);
char *gets(char *s);
int getw(FILE *stream);
int pclose(FILE *stream);
void perror(const char *s);
FILE *popen(const char *command, const char *type);
int printf(const char *format, ...);
int putc(int c, FILE *stream);
int putchar(int c);
int puts(const char *s);
int putw(int w, FILE *stream);
int remove(const char *path);
int rename(const char *old, const char *new);
void rewind(FILE *stream);
int scanf(const char *format, ...);
void setbuf(FILE *stream, char *buf);
int setvbuf(FILE *stream, char *buf, int type, sizet size);
int sprintf(char *s, const char *format, ...);
int sscanf(const char *s, const char *format, int ...);
char *tempnam(const char *dir, const char *pfx);
FILE *tmpfile(void);
char *tmpnam(char *s);
int ungetc(int c, FILE *stream);
int vfprintf(FILE *stream, const char *format, valist ap);
int vprintf(const char *format, valist ap);
int vsprintf(char *s, const char *format, valist ap);
The following external variables are defined:
extern char *optarg;
extern int opterr;
extern int optind;
extern int optopt;
Inclusion of the <stdio.h> header may also make visible all symbols
from <stddef.h>.
Page 3 Reliant UNIX 5.44 Printed 11/98
stdio(5) stdio(5)
The following are declared as functions and may also be defined as
macros:
int fseeko(FILE *stream, offt offset, int whence);
offt ftello(FILE *stream);
The following data type is defined through typedef:
fpos64t Type containing all information needed to specify
uniquely every position within a file in which the
largest offset can be represented in an object of type
off64t.
The following are declared as functions and may also be defined as
macros:
int fgetpos64(FILE *stream, fpos64t *pos);
FILE *fopen64(const char *filename, const char *mode);
FILE *freopen64(const char *filename, const char *mode,
FILE *stream);
int fseeko64(FILE *stream, off64t offset, int whence);
int fsetpos64(FILE *stream, const fpos64t *pos);
off64t ftello64(FILE *stream);
FILE *tmpfile64(void);
SEE ALSO
rename(2), fgetpos(3C), fsetpos(3C), perror(3C), remove(3C),
ctermid(3S), cuserid(3S), fclose(3S), ferror(3S), fflush(3S),
fgetpos(3S), fgets(3S), fgetwc(3S), fopen(3S), fputc(3S), fputs(3S),
fread(3S), fseek(3S), fwrite(3S), getc(3S), gets(3S), gets(3S),
pclose(3S), popen(3S), printf(3S), putc(3S), puts(3S), scanf(3S),
setbuf(3S), setvbuf(3S), system(3S), tempnam(3S), tmpfile(3S),
tmpnam(3S), ungetc(3S), vprintf(3S), lfs(5), types(5).
Page 4 Reliant UNIX 5.44 Printed 11/98