Back to index

glibc  2.9
Defines | Typedefs | Functions | Variables
stdio.h File Reference
#include <features.h>
#include <stddef.h>
#include <bits/types.h>
#include <libio.h>
#include <bits/stdio_lim.h>
#include <bits/sys_errlist.h>

Go to the source code of this file.

Defines

#define _STDIO_H   1
#define __need_size_t
#define __need_NULL
#define __need_FILE
#define __need___FILE
#define __FILE_defined   1
#define ____FILE_defined   1
#define _STDIO_USES_IOSTREAM
#define _IOFBF   0 /* Fully buffered. */
#define _IOLBF   1 /* Line buffered. */
#define _IONBF   2 /* No buffering. */
#define BUFSIZ   _IO_BUFSIZ
#define SEEK_SET   0 /* Seek from beginning of file. */
#define SEEK_CUR   1 /* Seek from current position. */
#define SEEK_END   2 /* Seek from end of file. */
#define stdin   stdin
#define stdout   stdout
#define stderr   stderr
#define getc(_fp)   _IO_getc (_fp)
#define putc(_ch, _fp)   _IO_putc (_ch, _fp)

Typedefs

typedef
typedef__BEGIN_NAMESPACE_STD
struct 
_IO_FILE

Functions

__BEGIN_NAMESPACE_STD int remove (__const char *__filename) __THROW
int rename (__const char *__old, __const char *__new) __THROW
__END_NAMESPACE_STD
__BEGIN_NAMESPACE_STD FILE
tmpfile (void) __wur
char * tmpnam (char *__s) __THROW __wur
__END_NAMESPACE_STD
__BEGIN_NAMESPACE_STD int 
fclose (FILE *__stream)
int fflush (FILE *__stream)
__END_NAMESPACE_STD
__BEGIN_NAMESPACE_STD FILE
fopen (__const char *__restrict __filename, __const char *__restrict __modes) __wur
FILEfreopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) __wur
__END_NAMESPACE_STD
__BEGIN_NAMESPACE_STD void 
setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW
int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) __THROW
__END_NAMESPACE_STD
__BEGIN_NAMESPACE_STD int 
fprintf (FILE *__restrict __stream, __const char *__restrict __format,...)
int printf (__const char *__restrict __format,...)
int sprintf (char *__restrict __s, __const char *__restrict __format,...) __THROW
int vfprintf (FILE *__restrict __s, __const char *__restrict __format, _G_va_list __arg)
int vprintf (__const char *__restrict __format, _G_va_list __arg)
int vsprintf (char *__restrict __s, __const char *__restrict __format, _G_va_list __arg) __THROW
__END_NAMESPACE_STD
__BEGIN_NAMESPACE_STD int 
fscanf (FILE *__restrict __stream, __const char *__restrict __format,...) __wur
int scanf (__const char *__restrict __format,...) __wur
int sscanf (__const char *__restrict __s, __const char *__restrict __format,...) __THROW
__END_NAMESPACE_STD
__BEGIN_NAMESPACE_STD int 
fgetc (FILE *__stream)
int getc (FILE *__stream)
int getchar (void)
__BEGIN_NAMESPACE_STD int fputc (int __c, FILE *__stream)
int putc (int __c, FILE *__stream)
int putchar (int __c)
__BEGIN_NAMESPACE_STD char * fgets (char *__restrict __s, int __n, FILE *__restrict __stream) __wur
char * gets (char *__s) __wur
__END_NAMESPACE_STD
__BEGIN_NAMESPACE_STD int 
fputs (__const char *__restrict __s, FILE *__restrict __stream)
int puts (__const char *__s)
int ungetc (int __c, FILE *__stream)
size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __wur
size_t fwrite (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s) __wur
__END_NAMESPACE_STD
__BEGIN_NAMESPACE_STD int 
fseek (FILE *__stream, long int __off, int __whence)
long int ftell (FILE *__stream) __wur
void rewind (FILE *__stream)
__END_NAMESPACE_STD
__BEGIN_NAMESPACE_STD int 
fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos)
int fsetpos (FILE *__stream, __const fpos_t *__pos)
__END_NAMESPACE_STD
__BEGIN_NAMESPACE_STD void 
clearerr (FILE *__stream) __THROW
int feof (FILE *__stream) __THROW __wur
int ferror (FILE *__stream) __THROW __wur
__END_NAMESPACE_STD
__BEGIN_NAMESPACE_STD void 
perror (__const char *__s)

Variables

__BEGIN_NAMESPACE_STD typedef
_G_fpos_t 
fpos_t
struct _IO_FILEstdin
struct _IO_FILEstdout
struct _IO_FILEstderr

Define Documentation

#define ____FILE_defined   1

Definition at line 67 of file stdio.h.

#define __FILE_defined   1

Definition at line 57 of file stdio.h.

#define __need___FILE

Definition at line 38 of file stdio.h.

#define __need_FILE

Definition at line 37 of file stdio.h.

#define __need_NULL

Definition at line 33 of file stdio.h.

#define __need_size_t

Definition at line 32 of file stdio.h.

#define _IOFBF   0 /* Fully buffered. */

Definition at line 101 of file stdio.h.

#define _IOLBF   1 /* Line buffered. */

Definition at line 102 of file stdio.h.

#define _IONBF   2 /* No buffering. */

Definition at line 103 of file stdio.h.

#define _STDIO_H   1

Definition at line 27 of file stdio.h.

Definition at line 73 of file stdio.h.

#define BUFSIZ   _IO_BUFSIZ

Definition at line 108 of file stdio.h.

#define getc (   _fp)    _IO_getc (_fp)

Definition at line 521 of file stdio.h.

#define putc (   _ch,
  _fp 
)    _IO_putc (_ch, _fp)

Definition at line 563 of file stdio.h.

#define SEEK_CUR   1 /* Seek from current position. */

Definition at line 122 of file stdio.h.

#define SEEK_END   2 /* Seek from end of file. */

Definition at line 123 of file stdio.h.

#define SEEK_SET   0 /* Seek from beginning of file. */

Definition at line 121 of file stdio.h.

#define stderr   stderr

Definition at line 151 of file stdio.h.

#define stdin   stdin

Definition at line 149 of file stdio.h.

#define stdout   stdout

Definition at line 150 of file stdio.h.


Typedef Documentation

typedef struct _IO_FILE

Definition at line 49 of file stdio.h.


Function Documentation

Definition at line 23 of file clearerr.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int feof ( FILE __stream)

Here is the caller graph for this function:

int ferror ( FILE __stream)

Here is the caller graph for this function:

int fflush ( FILE __stream)

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

__BEGIN_NAMESPACE_STD char* fgets ( char *__restrict  __s,
int  __n,
FILE *__restrict  __stream 
)

Definition at line 245 of file stdio2.h.

{
  if (__bos (__s) != (size_t) -1)
    {
      if (!__builtin_constant_p (__n) || __n <= 0)
       return __fgets_chk (__s, __bos (__s), __n, __stream);

      if ((size_t) __n > __bos (__s))
       return __fgets_chk_warn (__s, __bos (__s), __n, __stream);
    }
  return __fgets_alias (__s, __n, __stream);
}

Here is the call graph for this function:

Here is the caller graph for this function:

__BEGIN_NAMESPACE_STD int fputc ( int  __c,
FILE __stream 
)
size_t fread ( void *__restrict  __ptr,
size_t  __size,
size_t  __n,
FILE *__restrict  __stream 
)

Definition at line 274 of file stdio2.h.

{
  if (__bos0 (__ptr) != (size_t) -1)
    {
      if (!__builtin_constant_p (__size)
         || !__builtin_constant_p (__n)
         || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
       return __fread_chk (__ptr, __bos0 (__ptr), __size, __n, __stream);

      if (__size * __n > __bos0 (__ptr))
       return __fread_chk_warn (__ptr, __bos0 (__ptr), __size, __n, __stream);
    }
  return __fread_alias (__ptr, __size, __n, __stream);
}

Here is the call graph for this function:

FILE* freopen ( __const char *__restrict  __filename,
__const char *__restrict  __modes,
FILE *__restrict  __stream 
)

Here is the caller graph for this function:

__END_NAMESPACE_STD __BEGIN_NAMESPACE_STD int fseek ( FILE __stream,
long int  __off,
int  __whence 
)
int fsetpos ( FILE __stream,
__const fpos_t __pos 
)

Here is the caller graph for this function:

long int ftell ( FILE __stream)

Here is the caller graph for this function:

size_t fwrite ( __const void *__restrict  __ptr,
size_t  __size,
size_t  __n,
FILE *__restrict  __s 
)

Here is the caller graph for this function:

int getc ( FILE __stream)

Here is the caller graph for this function:

int getchar ( void  )

Definition at line 34 of file getchar.c.

{
  int result;
  _IO_acquire_lock (_IO_stdin);
  result = _IO_getc_unlocked (_IO_stdin);
  _IO_release_lock (_IO_stdin);
  return result;
}

Here is the caller graph for this function:

char* gets ( char *  __s)

Definition at line 226 of file stdio2.h.

{
  if (__bos (__str) != (size_t) -1)
    return __gets_chk (__str, __bos (__str));
  return __gets_warn (__str);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

int printf ( __const char *__restrict  __format,
  ... 
)
int putc ( int  __c,
FILE __stream 
)

Here is the caller graph for this function:

int putchar ( int  __c)

Definition at line 25 of file putchar.c.

{
  int result;
  _IO_acquire_lock (_IO_stdout);
  result = _IO_putc_unlocked (c, _IO_stdout);
  _IO_release_lock (_IO_stdout);
  return result;
}

Here is the caller graph for this function:

int puts ( __const char *  __s)
__BEGIN_NAMESPACE_STD int remove ( __const char *  __filename)
int rename ( __const char *  __old,
__const char *  __new 
)

Here is the caller graph for this function:

void rewind ( FILE __stream)
int scanf ( __const char *__restrict  __format,
  ... 
)

Here is the caller graph for this function:

int setvbuf ( FILE *__restrict  __stream,
char *__restrict  __buf,
int  __modes,
size_t  __n 
)

Here is the caller graph for this function:

int sprintf ( char *__restrict  __s,
__const char *__restrict  __format,
  ... 
)
int sscanf ( __const char *__restrict  __s,
__const char *__restrict  __format,
  ... 
)

Here is the caller graph for this function:

Definition at line 39 of file tmpfile.c.

{
  char buf[FILENAME_MAX];
  int fd;
  FILE *f;

  if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 0))
    return NULL;
  int flags = 0;
#ifdef FLAGS
  flags = FLAGS;
#endif
  fd = __gen_tempname (buf, flags, __GT_FILE);
  if (fd < 0)
    return NULL;

  /* Note that this relies on the Unix semantics that
     a file is not really removed until it is closed.  */
  (void) __unlink (buf);

  if ((f = __fdopen (fd, "w+b")) == NULL)
    __close (fd);

  return f;
}

Here is the call graph for this function:

char* tmpnam ( char *  __s)

Definition at line 28 of file tmpnam.c.

{
  /* By using two buffers we manage to be thread safe in the case
     where S != NULL.  */
  char tmpbufmem[L_tmpnam];
  char *tmpbuf = s ?: tmpbufmem;

  /* In the following call we use the buffer pointed to by S if
     non-NULL although we don't know the size.  But we limit the size
     to L_tmpnam characters in any case.  */
  if (__builtin_expect (__path_search (tmpbuf, L_tmpnam, NULL, NULL, 0),
                     0))
    return NULL;

  if (__builtin_expect (__gen_tempname (tmpbuf, 0, __GT_NOCREATE), 0))
    return NULL;

  if (s == NULL)
    return (char *) memcpy (tmpnam_buffer, tmpbuf, L_tmpnam);

  return s;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int ungetc ( int  __c,
FILE __stream 
)

Here is the caller graph for this function:

int vfprintf ( FILE *__restrict  __s,
__const char *__restrict  __format,
_G_va_list  __arg 
)
int vprintf ( __const char *__restrict  __format,
_G_va_list  __arg 
)
int vsprintf ( char *__restrict  __s,
__const char *__restrict  __format,
_G_va_list  __arg 
)

Variable Documentation

Definition at line 91 of file stdio.h.

struct _IO_FILE* stderr

Definition at line 37 of file stdio.c.

struct _IO_FILE* stdin

Definition at line 35 of file stdio.c.

struct _IO_FILE* stdout

Definition at line 36 of file stdio.c.