1: # include   <ingres.h>
   2: # include   <symbol.h>
   3: # include   "parser.h"
   4: # include   <access.h>
   5: # include   <sccs.h>
   6: 
   7: SCCSID(@(#)par_init.c	8.2	1/15/85)
   8: 
   9: /*
  10: **  PAR_INIT -- initialization call for parser
  11: **
  12: **	Trace Flags:
  13: **		par_init ~~ 60.0
  14: */
  15: 
  16: par_init(argc, argv1)
  17: int argc;
  18: char    *argv1[];
  19: {
  20:     register int    rt;
  21:     register char   **argv;
  22: 
  23:     extern int      Noupdt;
  24:     extern int      Dcase;
  25:     extern char     *Relspec;
  26:     extern char     *Indexspec;
  27:     extern DESC     Attdes;
  28:     extern struct admin Admin;
  29:     extern int      Qrymod;
  30:     extern int      yydebug;
  31: 
  32:     /* set up parser */
  33:     argv = argv1;
  34: 
  35: 
  36: 
  37: #	ifdef xPTR1
  38:     if (tTf(60, 0))
  39:         yydebug = 1;
  40: #	endif
  41: 
  42: #	ifdef xPTR2
  43:     if (tTf(60, 1))
  44:     {
  45:         printf("Par_init:	");
  46:         prargs(argc, argv);
  47:     }
  48: #	endif
  49: 
  50:     Noupdt = !setflag(argv, 'U', 0);
  51:     Dcase = setflag(argv, 'L', 1);
  52: 
  53:     /* if param specified, set result reln storage structures */
  54:     Relspec = "cheapsort";      /* default to cheapsort on ret into */
  55:     Indexspec = "isam";     /* isam on index */
  56: 
  57:     for (rt = FREEFLAGS; rt < argc; rt++)
  58:     {
  59:         if (argv[rt][0] == '-')
  60:         {
  61:             if (argv[rt][1] == 'r')
  62:             {
  63:                 Relspec = &argv[rt][2];
  64:             }
  65:             if (argv[rt][1] == 'n')
  66:             {
  67:                 Indexspec = &argv[rt][2];
  68:                 continue;
  69:             }
  70:         }
  71:     }
  72:     if (sequal(Relspec, "heap"))
  73:         Relspec = 0;
  74:     if (sequal(Indexspec, "heap"))
  75:         Indexspec = 0;
  76: 
  77:     rnginit();
  78:     opencatalog("attribute", OR_READ);
  79: 
  80:     Qrymod = ((Admin.adhdr.adflags & A_QRYMOD) == A_QRYMOD);
  81: 
  82: #	ifdef xPTR2
  83:     if (tTf(60, 2))
  84:     {
  85:         printf("Par_init: Results:\n");
  86:         printf("\tQrymod: %d\n", Qrymod);
  87:         printf("\tIndexspec: %s\n", Indexspec);
  88:         printf("\tRelspec: %s\n", Relspec);
  89:         printf("\tDcase: %d\n", Dcase);
  90:         printf("\tNoupdt: %d\n", Noupdt);
  91:     }
  92: #	endif
  93: }

Defined functions

par_init defined in line 7; used 2 times
Last modified: 1986-04-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 827
Valid CSS Valid XHTML 1.0 Strict