The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group


stdio.h - standard buffered input/output


#include <stdio.h>


The <stdio.h> header defines the following macro names as positive integral constant expressions:
Size of <stdio.h> buffers.
Maximum size in bytes of the longest filename string that the implementation guarantees can be opened.
Number of streams which the implementation guarantees can be open simultaneously. The value will be at least eight.
Input/output fully buffered.
Input/output line buffered.
Input/output unbuffered.
Maximum size of character array to hold ctermid() output.
Maximum size of character array to hold cuserid() output. (LEGACY)
Maximum size of character array to hold tmpnam() output.
Seek relative to current position.
Seek relative to end-of-file.
Seek relative to start-of-file.
Minimum number of unique filenames generated by tmpnam(). Maximum number of times an application can call tmpnam() reliably. The value of TMP_MAX will be at least 10,000.

The following macro name is defined as a negative integral constant expression:

End-of-file return value.

The following macro name is defined as a null pointer constant:

Null pointer.

The following macro name is defined as a string constant:

default directory prefix for tempnam().

The following macro names are defined as expressions of type pointer to FILE:

Standard error output stream.
Standard input stream.
Standard output stream.

The following data types are defined through typedef:

A structure containing information about a file.
Type containing all information needed to specify uniquely every position within a file.
As described in <stdarg.h>.
As described in <stddef.h>.

The following are declared as functions and may also be defined as macros. Function prototypes must be provided for use with an ISO C compiler.

void     clearerr(FILE *);
char    *ctermid(char *);
char    *cuserid(char *);(LEGACY)
int      fclose(FILE *);
FILE    *fdopen(int, const char *);
int      feof(FILE *);
int      ferror(FILE *);
int      fflush(FILE *);
int      fgetc(FILE *);
int      fgetpos(FILE *, fpos_t *);
char    *fgets(char *, int, FILE *);
int      fileno(FILE *);
void     flockfile(FILE *);
FILE    *fopen(const char *, const char *);
int      fprintf(FILE *, const char *, ...);
int      fputc(int, FILE *);
int      fputs(const char *, FILE *);
size_t   fread(void *, size_t, size_t, FILE *);
FILE    *freopen(const char *, const char *, FILE *);
int      fscanf(FILE *, const char *, ...);
int      fseek(FILE *, long int, int);
int      fseeko(FILE *, off_t, int);
int      fsetpos(FILE *, const fpos_t *);
long int ftell(FILE *);
off_t    ftello(FILE *);
int      ftrylockfile(FILE *);
void     funlockfile(FILE *);
size_t   fwrite(const void *, size_t, size_t, FILE *);
int      getc(FILE *);
int      getchar(void);
int      getc_unlocked(FILE *);
int      getchar_unlocked(void);
int      getopt(int, char * const[], const char); (LEGACY)
char    *gets(char *);
int      getw(FILE *);
int      pclose(FILE *);
void     perror(const char *);
FILE    *popen(const char *, const char *);
int      printf(const char *, ...);
int      putc(int, FILE *);
int      putchar(int);
int      putc_unlocked(int, FILE *);
int      putchar_unlocked(int);
int      puts(const char *);
int      putw(int, FILE *);
int      remove(const char *);
int      rename(const char *, const char *);
void     rewind(FILE *);
int      scanf(const char *, ...);
void     setbuf(FILE *, char *);
int      setvbuf(FILE *, char *, int, size_t);
int      snprintf(char *, size_t, const char *, ...);
int      sprintf(char *, const char *, ...);
int      sscanf(const char *, const char *, int ...);
char    *tempnam(const char *, const char *);
FILE    *tmpfile(void);
char    *tmpnam(char *);
int      ungetc(int, FILE *);
int      vfprintf(FILE *, const char *, va_list);
int      vprintf(const char *, va_list);
int      vsnprintf(char *, size_t, const char *, va_list);
int      vsprintf(char *, const char *, va_list);

The following external variables are defined:

extern char  *optarg;    )
extern int    opterr;    )
extern int    optind;    ) (LEGACY)
extern int    optopt;    )

Inclusion of the <stdio.h> header may also make visible all symbols from <stddef.h>.






clearerr(), ctermid(), cuserid(), fclose(), fdopen(), fgetc(), fgetpos(), ferror(), feof(), fflush(), fgets(), fileno(), fopen(), fputc(), fputs(), fread(), freopen(), fseek(), fsetpos(), ftell(), fwrite(), getc(), getc_unlocked(), getwchar(), getchar(), getopt(), gets(), pclose(), perror(), popen(), printf(), putc(), putchar(), puts(), putwchar(), remove(), rename(), rewind(), scanf(), setbuf(), setvbuf(), sscanf(), stdin, system(), tempnam(), tmpfile(), tmpnam(), ungetc(), vprintf(), <sys/types.h>.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]