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: }
Last modified: 1995-02-04
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 988
Valid CSS Valid XHTML 1.0 Strict