stdio.h File Reference

#include <ansi.h>
#include <sys/dir.h>

Include dependency graph for stdio.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  __iobuf

Defines

#define _IOFBF   0x000
#define _IOREAD   0x001
#define _IOWRITE   0x002
#define _IONBF   0x004
#define _IOMYBUF   0x008
#define _IOEOF   0x010
#define _IOERR   0x020
#define _IOLBF   0x040
#define _IOREADING   0x080
#define _IOWRITING   0x100
#define _IOAPPEND   0x200
#define _IOFIFO   0x400
#define SEEK_SET   0
#define SEEK_CUR   1
#define SEEK_END   2
#define stdin   (&__stdin)
#define stdout   (&__stdout)
#define stderr   (&__stderr)
#define BUFSIZ   1024
#define NULL   ((void *)0)
#define EOF   (-1)
#define FOPEN_MAX   20
#define FILENAME_MAX   DIRSIZ
#define TMP_MAX   999
#define L_tmpnam   (sizeof("/tmp/") + FILENAME_MAX)
#define __STDIO_VA_LIST__   void *
#define vfscanf   _doscan
#define getchar()   getc(stdin)
#define putchar(c)   putc(c,stdout)
#define getc(p)
#define putc(c, p)
#define feof(p)   (((p)->_flags & _IOEOF) != 0)
#define ferror(p)   (((p)->_flags & _IOERR) != 0)
#define clearerr(p)   ((p)->_flags &= ~(_IOERR|_IOEOF))

Typedefs

typedef __iobuf FILE
typedef long int fpos_t
typedef unsigned int size_t

Functions

 _PROTOTYPE (int remove,(const char *_filename))
 _PROTOTYPE (int rename,(const char *_old, const char *_new))
 _PROTOTYPE (FILE *tmpfile,(void))
 _PROTOTYPE (char *tmpnam,(char *_s))
 _PROTOTYPE (int fclose,(FILE *_stream))
 _PROTOTYPE (FILE *fopen,(const char *_filename, const char *_mode))
 _PROTOTYPE (FILE *freopen,(const char *_filename, const char *_mode, FILE *_stream))
 _PROTOTYPE (void setbuf,(FILE *_stream, char *_buf))
 _PROTOTYPE (int setvbuf,(FILE *_stream, char *_buf, int _mode, size_t _size))
 _PROTOTYPE (int fprintf,(FILE *_stream, const char *_format,...))
 _PROTOTYPE (int printf,(const char *_format,...))
 _PROTOTYPE (int sprintf,(char *_s, const char *_format,...))
 _PROTOTYPE (int vfprintf,(FILE *_stream, const char *_format, char *_arg))
 _PROTOTYPE (int vprintf,(const char *_format, char *_arg))
 _PROTOTYPE (int vsprintf,(char *_s, const char *_format, char *_arg))
 _PROTOTYPE (int sscanf,(const char *_s, const char *_format,...))
 _PROTOTYPE (int vsscanf,(const char *_s, const char *_format, char *_arg))
 _PROTOTYPE (char *fgets,(char *_s, int _n, FILE *_stream))
 _PROTOTYPE (int fputc,(int _c, FILE *_stream))
 _PROTOTYPE (int fputs,(const char *_s, FILE *_stream))
 _PROTOTYPE (int getchar,(void))
 _PROTOTYPE (int putchar,(int _c))
 _PROTOTYPE (int puts,(const char *_s))
 _PROTOTYPE (size_t fread,(void *_ptr, size_t _size, size_t _nmemb, FILE *_stream))
 _PROTOTYPE (size_t fwrite,(const void *_ptr, size_t _size, size_t _nmemb, FILE *_stream))
 _PROTOTYPE (int fgetpos,(FILE *_stream, fpos_t *_pos))
 _PROTOTYPE (int fseek,(FILE *_stream, long _offset, int _whence))
 _PROTOTYPE (long ftell,(FILE *_stream))
 _PROTOTYPE (void rewind,(FILE *_stream))
 _PROTOTYPE (void perror,(const char *_s))

Variables

FILE__iotab [FOPEN_MAX]
FILE __stdin
FILE __stdout
FILE __stderr


Define Documentation

#define __STDIO_VA_LIST__   void *
 

Definition at line 63 of file stdio.h.

#define _IOAPPEND   0x200
 

Definition at line 38 of file stdio.h.

Referenced by __flushbuf(), fdopen(), fopen(), and freopen().

#define _IOEOF   0x010
 

Definition at line 33 of file stdio.h.

Referenced by __fillbuf(), and fseek().

#define _IOERR   0x020
 

Definition at line 34 of file stdio.h.

Referenced by __fillbuf(), __flushbuf(), and fseek().

#define _IOFBF   0x000
 

Definition at line 28 of file stdio.h.

Referenced by freopen(), main(), setbuf(), and setvbuf().

#define _IOFIFO   0x400
 

Definition at line 39 of file stdio.h.

Referenced by fflush(), and freopen().

#define _IOLBF   0x040
 

Definition at line 35 of file stdio.h.

Referenced by __fillbuf(), __flushbuf(), freopen(), main(), and setvbuf().

#define _IOMYBUF   0x008
 

Definition at line 32 of file stdio.h.

Referenced by __fillbuf(), __flushbuf(), freopen(), and setvbuf().

#define _IONBF   0x004
 

Definition at line 31 of file stdio.h.

Referenced by __fillbuf(), __flushbuf(), freopen(), fseek(), ftell(), Printf(), setbuf(), setvbuf(), sscanf(), vsnprintf(), and vsscanf().

#define _IOREAD   0x001
 

Definition at line 29 of file stdio.h.

Referenced by __fillbuf(), fdopen(), fopen(), freopen(), fseek(), sscanf(), and vsscanf().

#define _IOREADING   0x080
 

Definition at line 36 of file stdio.h.

Referenced by __fillbuf(), __flushbuf(), fdopen(), fflush(), fopen(), fseek(), ftell(), sscanf(), ungetc(), and vsscanf().

#define _IOWRITE   0x002
 

Definition at line 30 of file stdio.h.

Referenced by __flushbuf(), fdopen(), fopen(), freopen(), fseek(), Printf(), and vsnprintf().

#define _IOWRITING   0x100
 

Definition at line 37 of file stdio.h.

Referenced by __cleanup(), __fillbuf(), __flushbuf(), fdopen(), fflush(), fopen(), fseek(), ftell(), Printf(), and vsnprintf().

#define BUFSIZ   1024
 

Definition at line 52 of file stdio.h.

#define clearerr p   )     ((p)->_flags &= ~(_IOERR|_IOEOF))
 

Definition at line 138 of file stdio.h.

Referenced by gzclearerr(), rewind(), and zsendfile().

#define EOF   (-1)
 

Definition at line 54 of file stdio.h.

#define feof p   )     (((p)->_flags & _IOEOF) != 0)
 

Definition at line 136 of file stdio.h.

Referenced by __flushbuf(), apply_add(), apply_differences(), def(), Defdev(), fgetarg(), fgets(), file2cache(), fr(), get1rec(), getFileCrc(), gets(), getw(), key(), main(), partcompress(), and readstate().

#define ferror p   )     (((p)->_flags & _IOERR) != 0)
 

Definition at line 137 of file stdio.h.

Referenced by apply_add(), bread(), build_index(), check_header(), checkdiff(), checkstate(), compress(), compressStream(), copy(), copyexec(), def(), extract(), ferror_file_func(), file2cache(), get_byte(), get_line(), getdesc(), getline(), getw(), gz_compress(), gzread(), inf(), installboot(), iwritfile(), load_crontabs(), main(), makerewindable(), nextc(), output(), partcompress(), print_name(), putw(), raw_install(), read1line(), read_header(), readtc(), readword(), restore(), saveadv(), savelet(), searchwindex(), spool(), tail(), testStream(), trymandir(), uncompressStream(), and zerr().

#define FILENAME_MAX   DIRSIZ
 

Definition at line 59 of file stdio.h.

#define FOPEN_MAX   20
 

Definition at line 56 of file stdio.h.

Referenced by __cleanup(), __fillbuf(), fclose(), fdopen(), fflush(), fopen(), and freopen().

#define getc p   ) 
 

Value:

(--(p)->_count >= 0 ? (int) (*(p)->_ptr++) : \
                                __fillbuf(p))

Definition at line 130 of file stdio.h.

Referenced by _doscan(), apply_add(), bsGetBit(), cmdline(), collect(), compress(), copy(), copyexec(), count(), crc(), diag(), do_file(), dual(), egets(), Expand(), extract(), f_collect(), fgetc(), fgets(), filbuf(), file_changed(), file_copyline(), file_getc(), fill_buffer(), fmt(), Fold(), format(), fread(), get1rec(), get_line(), getc(), getdesc(), getdiv(), gethostent(), getline(), getofmt(), gets(), getw(), getword(), lrch(), main(), makerewindable(), netfinger(), nextc(), ngetc(), o_collect(), output_semantic_actions(), output_stored_text(), output_trailing_text(), print(), printlet(), rdskip(), rdupto(), read1line(), readout(), readtc(), scan_profile(), searchwhatis(), searchwindex(), skip_page(), strings(), subgetc(), Unexpand(), work(), yylex(), and zsendfile().

#define getchar void   )     getc(stdin)
 

Definition at line 128 of file stdio.h.

Referenced by abort_mined(), affirmative(), ask(), backslash(), check_existing(), CTL(), distext(), fill(), get(), input(), input_char(), key(), m_write(), main(), ok(), rd_num(), skipline(), spool(), tail(), wgetch(), and yes().

#define L_tmpnam   (sizeof("/tmp/") + FILENAME_MAX)
 

Definition at line 62 of file stdio.h.

Referenced by tmpfile(), and tmpnam().

#define NULL   ((void *)0)
 

Definition at line 53 of file stdio.h.

#define putc c,
p   ) 
 

Value:

(--(p)->_count >= 0 ? \
                         (int) (*(p)->_ptr++ = (c)) : \
                         __flushbuf((c),(p)))

Definition at line 132 of file stdio.h.

Referenced by _doprnt(), _fprintPwd(), ack_putchar(), ar_close(), bsClose(), bsPutBit(), bttyout(), cat(), command(), compress(), copy(), copy_text(), copy_union(), copyexec(), cpp_echo(), cpp_getc(), do_file(), doumask(), dump_line(), encode(), error(), extract(), file_copyline(), fprintPwd(), fputc(), fputs(), fwrite(), get_message(), getdiv(), gnu_putchar(), goto_actions(), indent(), iwritfile(), listto(), ls_list(), macro(), main(), makerewindable(), maketable(), maketag(), nameval(), outbyte(), outdec(), output(), output_base(), output_check(), output_defines(), output_rule_data(), output_semantic_actions(), output_stored_text(), output_table(), output_trailing_text(), output_yydefred(), pad_output(), padimage(), print_core(), print_gotos(), print_name(), print_pos(), Printf(), printlet(), prntln(), prratio(), put4(), putcntl(), puts(), putsec(), putw(), readout(), spool(), trargs(), trputc(), trstring(), vsnprintf(), wr_archive(), and write_section().

#define putchar c   )     putc(c,stdout)
 

Definition at line 129 of file stdio.h.

#define SEEK_CUR   1
 

Definition at line 45 of file stdio.h.

Referenced by add_dir(), ar_fow(), ar_open(), ar_rdsync(), ar_rev(), ar_set_wr(), ar_write(), bskip(), commitpool(), Data_Block(), do_exec(), do_fcntl(), do_lseek(), dump_stack(), file_flush(), file_write(), fseek(), fseek_file_func(), ftell(), get_file(), gzlog_close(), gzlog_open(), gzlog_write(), gzscan(), gzseek(), gztell(), Indirect(), keep_reading(), lock_op(), main(), proc_dir(), recomp(), skip(), test06(), test19d(), test19g(), test25b(), test26a(), test26b(), test26c(), test30a(), test38a(), test_gzio(), and writedata().

#define SEEK_END   2
 

Definition at line 46 of file stdio.h.

#define SEEK_SET   0
 

Definition at line 44 of file stdio.h.

#define stderr   (&__stderr)
 

Definition at line 50 of file stdio.h.

#define stdin   (&__stdin)
 

Definition at line 48 of file stdio.h.

Referenced by append(), ask(), bzopen_or_bzdopen(), check_file(), compress(), cpio_options(), crc(), deliver(), dosrch(), ftree_arg(), get_cmd(), get_message(), get_prog(), getargs(), getcode(), getline(), Getrec(), gets(), getyn(), interact(), is_sure(), key(), lrch(), main(), makerewindable(), may_kill_region(), mlabel(), mygets(), open_new_file(), open_patch_file(), openfile(), openin(), opentty(), outbyte(), readin(), readline(), run(), scanf(), select_region(), set_option(), spool(), tail(), tar_options(), testf(), testStream(), tok_init(), uncompress(), uncompressStream(), vscanf(), wcs(), wctxpn(), and zerr().

#define stdout   (&__stdout)
 

Definition at line 49 of file stdio.h.

Referenced by __flushbuf(), ack_emit_init(), affirmative(), asciirecv(), asciisend(), ask(), b64_add(), bibi(), binaryrecv(), binarysend(), bzopen_or_bzdopen(), canit(), chartest(), check_existing(), cloexec_test(), cmdcomp(), command(), compress(), compressStream(), concise_view_attrib(), copystat(), cpio_options(), dec(), del_entry(), diag(), dir_mdu(), disk_io(), dns_tell(), do_file(), do_obprof(), docmds1(), DOgetreply(), dohelp(), DOMretr(), DOMstor(), DOpass(), dos_showfat(), doupdate(), Draw_Screen(), e(), Error(), execute(), extract(), file_mdu(), flushmo(), format_device(), free(), Get_Char(), get_cmd(), get_line(), get_message(), GetNetInfo(), gnu_emit_init(), Goto(), grep(), input(), interact(), is_sure(), itverb(), keypress(), keyword(), list(), listfiles(), logging(), lookup(), m_read(), m_shell(), m_write(), main(), make_bootable(), master(), mygets(), netfinger(), open_outfile(), outfld(), output(), outputf(), perror(), prin1n(), prin2(), prin2n(), princhar(), prinstr(), Print(), Print0(), printall(), printdata(), printf(), printinfo(), printstat(), prntln(), puts(), read_device(), readline(), readout(), recvfile(), replay_attrib(), run(), sayhello(), Search(), select_disk(), sendfile(), set_option(), show_cores(), show_part(), start(), Stringput(), tail(), tar_options(), uncompressStream(), view_attrib(), vprintf(), Warning(), xfopen(), yes(), zerr(), and zsendfdata().

#define TMP_MAX   999
 

Definition at line 61 of file stdio.h.

Referenced by tmpnam().

#define vfscanf   _doscan
 

Definition at line 97 of file stdio.h.


Typedef Documentation

typedef struct __iobuf FILE
 

typedef long int fpos_t
 

Definition at line 65 of file stdio.h.

typedef unsigned int size_t
 

Definition at line 69 of file stdio.h.


Function Documentation

_PROTOTYPE void  perror,
(const char *_s) 
 

_PROTOTYPE void  rewind,
(FILE *_stream) 
 

_PROTOTYPE long  ftell,
(FILE *_stream) 
 

_PROTOTYPE int  fseek,
(FILE *_stream, long _offset, int _whence) 
 

_PROTOTYPE int  fgetpos,
(FILE *_stream, fpos_t *_pos) 
 

_PROTOTYPE size_t  fwrite,
(const void *_ptr, size_t _size, size_t _nmemb, FILE *_stream) 
 

_PROTOTYPE size_t  fread,
(void *_ptr, size_t _size, size_t _nmemb, FILE *_stream) 
 

_PROTOTYPE int  puts,
(const char *_s) 
 

_PROTOTYPE int  putchar,
(int _c) 
 

_PROTOTYPE int  getchar,
(void) 
 

_PROTOTYPE int  fputs,
(const char *_s, FILE *_stream) 
 

_PROTOTYPE int  fputc,
(int _c, FILE *_stream) 
 

_PROTOTYPE char *  fgets,
(char *_s, int _n, FILE *_stream) 
 

_PROTOTYPE int  vsscanf,
(const char *_s, const char *_format, char *_arg) 
 

_PROTOTYPE int  sscanf,
(const char *_s, const char *_format,...) 
 

_PROTOTYPE int  vsprintf,
(char *_s, const char *_format, char *_arg) 
 

_PROTOTYPE int  vprintf,
(const char *_format, char *_arg) 
 

_PROTOTYPE int  vfprintf,
(FILE *_stream, const char *_format, char *_arg) 
 

_PROTOTYPE int  sprintf,
(char *_s, const char *_format,...) 
 

_PROTOTYPE int  printf,
(const char *_format,...) 
 

_PROTOTYPE int  fprintf,
(FILE *_stream, const char *_format,...) 
 

_PROTOTYPE int  setvbuf,
(FILE *_stream, char *_buf, int _mode, size_t _size) 
 

_PROTOTYPE void  setbuf,
(FILE *_stream, char *_buf) 
 

_PROTOTYPE FILE freopen,
(const char *_filename, const char *_mode, FILE *_stream) 
 

_PROTOTYPE FILE fopen,
(const char *_filename, const char *_mode) 
 

_PROTOTYPE int  fclose,
(FILE *_stream) 
 

_PROTOTYPE char *  tmpnam,
(char *_s) 
 

_PROTOTYPE FILE tmpfile,
(void) 
 

_PROTOTYPE int  rename,
(const char *_old, const char *_new) 
 

_PROTOTYPE int  remove,
(const char *_filename) 
 


Variable Documentation

FILE* __iotab[FOPEN_MAX]
 

Definition at line 23 of file data.c.

Referenced by __cleanup(), __fillbuf(), fclose(), fdopen(), fflush(), fopen(), and freopen().

FILE __stderr
 

Definition at line 18 of file data.c.

FILE __stdin
 

Definition at line 8 of file data.c.

FILE __stdout
 

Definition at line 13 of file data.c.


Generated on Fri Apr 14 23:11:20 2006 for minix by  doxygen 1.4.6