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

##### Functions

    getfilename       X

       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: }

#### Defined functions

getfilename defined in line 17; used 14 times

- in /usr/ingres/source/monitor/branch.c line 48, 58, 90
- in /usr/ingres/source/monitor/edit.c line 23-26(2)
- in /usr/ingres/source/monitor/include.c line 28-32(2)
- in /usr/ingres/source/monitor/monitor.c line 165
- in /usr/ingres/source/monitor/newdirec.c line 14-16(2)
- in /usr/ingres/source/monitor/shell.c line 26-29(2)
- in /usr/ingres/source/monitor/writeout.c line 23-25(2)

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