1: # include   <stdio.h>
   2: 
   3: # include   "../ingres.h"
   4: # include   "../aux.h"
   5: # include   "monitor.h"
   6: 
   7: /*
   8: **  GET FILE NAME
   9: **
  10: **	This routine collects a file name up to a newline and returns a
  11: **	pointer to it.  Keep in mind that it is stored in a static
  12: **	buffer.
  13: **
  14: **	Uses trace flag 17
  15: */
  16: 
  17: char *getfilename()
  18: {
  19:     static char filename[81];
  20:     register char   c;
  21:     register int    i;
  22:     register char   *p;
  23:     extern char getch();
  24: 
  25:     Oneline = TRUE;
  26:     macinit(&getch, 0, 0);
  27: 
  28:     /* skip initial spaces */
  29:     while ((c = macgetch()) == ' ' || c == '\t')
  30:         ;
  31: 
  32:     i = 0;
  33:     for (p = filename; c > 0; )
  34:     {
  35:         if (i++ <= 80)
  36:             *p++ = c;
  37:         c = macgetch();
  38:     }
  39:     *p = 0;
  40:     Prompt = Newline = TRUE;
  41: 
  42: #	ifdef xMTR2
  43:     if (tTf(17, 0))
  44:         printf("filename \"%s\"\n", filename);
  45: #	endif
  46:     Oneline = FALSE;
  47:     Peekch = 0;
  48:     return (filename);
  49: }
Last modified: 1995-02-04
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2585
Valid CSS Valid XHTML 1.0 Strict