AT&T UNIX™PC Unix System V Users Manual - tenox
AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox
�·. (
GETC ( 3S ) GETC ( 3S ) NAME getc, getchar, fgetc, getw - get character or word from stream SYNOPSIS #include int getc (stream) FILE •stream; int getchar () int fgetc (stream) FILE •stream; int getw (stream) FILE •stream; DESCRIPTION Getc returns the next character (i.e. byte) from the named input stream. It also moves the file pointer, if defined, ahead one character in stream. Getc is a macro and so cannot be used if a function is necessary; for example one cannot have a function pointer point to it. Getchar returns the next character from the standard input stream, stdin. As in the case of getc, get char is a macro. Fgetc performs the same function as getc, but is a genuine function. Fgetc runs more slowly than getc, but takes less space per invocation. Getw returns the next word (i.e. integer) from the named input stream. The size of a word varies from machine to machine. It returns the constant EOF upon end-of-file or error, but as that is a valid integer value, feof and ferror(3S) should be used to check the success of getw. Getw increments the associated file pointer, if defined, to point to the next word. Getw assumes no special alignment in the file. SEE ALSO fclose(3S), ferror(3S), fopen(3S), fread(3S), gets(3S), putc(3S), scanf(3S). DIAGNOSTICS These functions return the integer constant EOF at end-of-file or upon an error. BUGS Because it is implemented as a macro, getc treats incorrectly a stream argument with side effects. In particular, getc( •f++) doesn't work sensibly. Fgetc should be used instead. Because of possible differences in word length and byte ordering, files written using putw are machine-dependent, and may not be read using getw on a different processor. - 1 -
- Page 809: CTERMID ( 3S ) CTERMID ( 3S ) NAME
- Page 812 and 813: CTIME (3C) CTIME(3C) The external l
- Page 815 and 816: CURSES ( 3 ) CURSES ( 3 ) NAME curs
- Page 817 and 818: CUSERID ( 3S ) CUSERID ( 3S ) NAME
- Page 819 and 820: DIAL (3C) DIAL(3C) NAME dial - esta
- Page 821 and 822: DRAND48 ( 3C ) DRAND48 ( 3C ) NAME
- Page 823 and 824: DRAND48 ( 3C ) DRAND48 ( 3C ) have
- Page 825: ECVT (3C) ECVT (3C) NAME ecvt, fcvt
- Page 829 and 830: EPRINTF ( 3T ) ( AT&T UNIX PC only
- Page 831 and 832: ERF (3M) ERF (3M) NAME erf1 erfc -
- Page 833: EXP ( 3M ) EXP ( 3M ) NAME exp, log
- Page 837: FERROR (3S) FERROR (3S) NAME ferror
- Page 841 and 842: FOPEN(3S) FOPEN (3S) NAME fopen, fr
- Page 843 and 844: FORM ( 3T ) ( AT&T UNIX PC only ) F
- Page 845 and 846: FORM (3T) (AT&T UNIX PC only ) fiel
- Page 847 and 848: FORM (3T) }; (AT&T UNIX PC only ) F
- Page 849: FREAD ( 3S ) FREAD ( 3S ) NAME frea
- Page 853: FSEEK ( 3S ) FSEEK ( 3S ) NAME fsee
- Page 857: GAMMA ( 3M ) GAMMA ( 3M ) NAME gamm
- Page 861: GETCWD ( 3C } GETCWD ( 3C ) NAME ge
- Page 865 and 866: GETGRENT ( 3C ) GETGRENT ( 3C ) NAM
- Page 867: GETLOGIN ( 3C ) GETLOGIN ( 3C ) NAM
- Page 870 and 871: GETOPT (3C) } SEE ALSO getopt(l). e
- Page 873 and 874: GETPENT (3) (AT&T UNIX PC only ) GE
- Page 875: GETPW ( 3C ) GETPW ( 3C ) NAME getp
- Page 878 and 879: GETPWENT ( 3C ) GETPWENT ( 3C ) par
- Page 881 and 882: GETUT ( 3C ) GETUT ( 3C ) NAME getu
- Page 883 and 884: HSEARCH ( 3C ) HSEARCH ( 3C ) NAME
- Page 885 and 886: HYPOT ( 3M ) HYPOT (3M) NAME hypot
- Page 887: L3TOL (3C) L3TOL (3C) NAME 13tol, l
- Page 890 and 891: (�
- Page 893: LDFHREAD ( 3X ) LDFHREAD ( 3X ) NAM
- Page 897 and 898: LDLSEEK ( 3X ) LDLSEEK ( 3X ) NAME
- Page 899 and 900: LDOHSEEK ( 3X ) (not on PDP-11) LDO
- Page 901 and 902: LDOPEN{3X) LDOPEN { 3X) NAME ldopen
- Page 903 and 904: LDRSEEK ( 3X ) LDRSEEK ( 3X ) NAME
- Page 905: LDSHREAD ( 3X ) LDSHREAD ( 3X ) NAM
�·.<br />
(