home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / man / cat3 / getc.0 < prev    next >
Text File  |  1993-12-07  |  2KB  |  67 lines

  1.  
  2. GETC(3)                    UNIX Programmer's Manual                    GETC(3)
  3.  
  4. NNAAMMEE
  5.      ffggeettcc, ggeettcc, ggeettcchhaarr, ggeettww - get next character or word from input stream
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<ssttddiioo..hh>>
  9.  
  10.      _i_n_t
  11.      ffggeettcc(_F_I_L_E _*_s_t_r_e_a_m)
  12.  
  13.      _i_n_t
  14.      ggeettcc(_F_I_L_E _*_s_t_r_e_a_m)
  15.  
  16.      _i_n_t
  17.      ggeettcchhaarr()
  18.  
  19.      _i_n_t
  20.      ggeettww(_F_I_L_E _*_s_t_r_e_a_m)
  21.  
  22. DDEESSCCRRIIPPTTIIOONN
  23.      The ffggeettcc() function obtains the next input character (if present) from
  24.      the stream pointed at by _s_t_r_e_a_m, or the next character pushed back on the
  25.      stream via ungetc.
  26.  
  27.      The ggeettcc() function acts essentially identically to ffggeettcc(), but is a
  28.      macro that expands in­line.
  29.  
  30.      The ggeettcchhaarr() function is equivalent to: getc with the argument stdin.
  31.  
  32.      The ggeettww() function obtains the next _i_n_t (if present) from the stream
  33.      pointed at by _s_t_r_e_a_m.
  34.  
  35. RREETTUURRNN VVAALLUUEESS
  36.      If successful, these routines return the next requested object from the
  37.      _s_t_r_e_a_m. If the stream is at end­of­file or a read error occurs, the rou­
  38.      tines return EOF. The routines feof(3) and ferror(3) must be used to dis­
  39.      tinguish between end­of­file and error.  If an error occurs, the global
  40.      variable _e_r_r_n_o is set to indicate the error.  The end­of­file condition
  41.      is remembered, even on a terminal, and all subsequent attempts to read
  42.      will return EOF until the condition is cleared with clearerr.
  43.  
  44. SSEEEE AALLSSOO
  45.      ferror(3),  fread(3),  fopen(3),  putc(3),  ungetc(3)
  46.  
  47. SSTTAANNDDAARRDDSS
  48.      The ffggeettcc(), ggeettcc() and ggeettcchhaarr() functions conform to ANSI C3.159­1989
  49.      (``ANSI C'').
  50.  
  51. BBUUGGSS
  52.      Since EOF is a valid integer value, feof and ferror must be used to check
  53.      for failure after calling ggeettww().  The size and byte order of an _i_n_t
  54.      varies from one machine to another, and ggeettww() is not recommended for
  55.      portable applications.
  56.  
  57. BSD Experimental                 June 29, 1991                               1
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.