# 2.11BSD#431 - /usr/ingres/source/scanner/inout.c

##### Functions

    backup            X
    gtchar            X

##### Variables

    Pchar             X
    Pctr              X

       1: # include "../ingres.h"
       2: # include "../scanner.h"
       3:
       4: /* TWO CHARACTER STACK FOR 'UNGETC' BACKUP */
       5: char    Pchar[2];
       6: int Pctr;
       7:
       8: /*
       9: ** GTCHAR
      10: ** If 'Lcase' is set, all upper-case alphabetics are
      11: ** mapped into lower-case.
      12: ** The correct return is > 0; a return = 0 indicates end-of-file.
      13: */
      14: gtchar()
      15: {
      16:     extern int  yyline;
      17:     register char   chr;
      18:
      19:     /* USE STACKED CHARACTERS IF POSSIBLE */
      20:     if (Pctr)
      21:         chr = Pchar[--Pctr];
      22:     else
      23:         chr = getscr(0);
      24:
      25:     /* UPDATE LINE COUNTER */
      26:     if (chr == '\n')
      27:         yyline++;
      28:
      29:     return ((Lcase && chr >= 'A' && chr <= 'Z') ? (chr + ('a' - 'A')) : chr);
      30: }
      31:
      32:
      33: /*
      34: ** BACKUP
      35: ** saves the character argument in the global stack 'Pchar'
      36: **/
      37: backup(chr)
      38: char    chr;
      39: {
      40:     extern int  yyline;
      41:
      42:     if (Pctr == 2)
      43:         syserr("overflow in backup()");
      44:     Pchar[Pctr++] = chr;
      45:     if (chr == '\n')
      46:         yyline--;
      47: }

#### Defined functions

backup defined in line 37; used 8 times

- in /usr/ingres/source/scanner/name.c line 35
- in /usr/ingres/source/scanner/number.c line 56, 76, 87
- in /usr/ingres/source/scanner/operator.c line 31-32(2), 43, 50

gtchar defined in line 14; used 15 times

- in /usr/ingres/source/scanner/comment.c line 25, 33
- in /usr/ingres/source/scanner/name.c line 26
- in /usr/ingres/source/scanner/number.c line 38, 52, 65, 73
- in /usr/ingres/source/scanner/operator.c line 23-24(2)
- in /usr/ingres/source/scanner/string.c line 31, 42, 52
- in /usr/ingres/source/scanner/yylex.c line 24, 105-110(2)

#### Defined variables

Pchar defined in line 5; used 2 times

- in line 21, 44

Pctr defined in line 6; used 4 times

- in line 20-21(2), 42-44(2)

Last modified: 1980-12-17 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 803 |