# 2.11BSD#431 - /usr/ingres/source/monitor/clrline.c

##### Functions

    clrline           X

       1: # include   <stdio.h>
       2:
       3: # include   "../ingres.h"
       4: # include   "../aux.h"
       5: # include   "monitor.h"
       6:
       7: /*
       8: **  Clear Input Line
       9: **
      10: **	This routine removes the newline following a monitor command
      11: **	(such as \t, \g,  etc.)  Any other characters are processed.
      12: **	Hence, \t\g\t will work.  It also maintains the
      13: **	Newline flag on command lines.  It will make certain that
      14: **	the current line in the query buffer ends with a newline.
      15: **
      16: **	The flag 'noprompt' if will disable the prompt character if set.
      17: **	Otherwise, it is automatically printed out.
      18: **
      19: **	Uses trace flag 8
      20: */
      21:
      22: clrline(noprompt)
      23: int noprompt;
      24: {
      25:     register char   c;
      26:
      27:     if (!Newline)
      28:         putc('\n', Qryiop);
      29:     Newline = TRUE;
      30:     /* if char following is a newline, throw it away */
      31:     c = getch();
      32:     Prompt = c == '\n';
      33:     if (!Prompt)
      34:     {
      35:         Peekch = c;
      36:     }
      37:     else
      38:     {
      39:         if (!noprompt)
      40:             prompt(0);
      41:     }
      42:     return;
      43: }

#### Defined functions

clrline defined in line 22; used 7 times

- in /usr/ingres/source/monitor/clear.c line 25
- in /usr/ingres/source/monitor/eval.c line 27
- in /usr/ingres/source/monitor/go.c line 35
- in /usr/ingres/source/monitor/monitor.c line 146, 156-161(2)
- in /usr/ingres/source/monitor/print.c line 24

Last modified: 1995-02-04 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 948 |