Library /sys$common/syshlp/helplib.hlb  —  CRTL  getc
    Returns the next character from a specified file.

    Format

      #include  <stdio.h>

      int getc  (FILE *file_ptr);

1  –  Argument

 file_ptr

    A pointer to the file to be accessed.

2  –  Description

    The getc macro returns the next byte from the input stream
    specified by the file_ptr parameter and moves the file pointer,
    if defined, ahead one byte in the input stream.

    Since getc is a macro, a file pointer argument with side effects
    (for example, getc (*f++)) might be evaluated incorrectly.
    In such a case, use the fgetc function instead. See the fgetc
    function.

    See also getc_unlocked.

3  –  Return Values

    n                  The returned character.
    EOF                Indicates the end-of-file or an error.
Close Help