# 2.11BSD#431 - /usr/src/new/PORT/B/src/b/par.h

##### Functions

    main              X

##### Variables

    __void__          X
    iname             X
    pname             X

##### Macros

    EOS               X
    EQ                X
    ERM               X
    ERR               X
    MDOTS             X
    MRE               X
    NE                X
    VOID              X

       1: /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1984. */
       2: /* $Header: par.h,v 1.1 84/07/04 17:57:16 timo Exp $ */
       3:
       4: #include    <stdio.h>
       5: #define EQ  ==
       6: #define NE  !=
       7: #define EOS '\0'
       8: #define ERR (-1)
       9:
      10: #ifdef  MFILE
      11: #define MDOTS   "... "
      12: #else
      13: #define MDOTS   ""
      14: #endif
      15:
      16: #define ERM {fprintf(stderr, "%s: ", pname); fprintf(stderr,
      17: #define MRE ); exit(ERR); }
      18:
      19: #ifdef  lint
      20: int __void__;   /* to tell `lint' not to care */
      21: #define VOID(x) (__void__ = (int)(x))
      22: #else   lint
      23: #define VOID(x) (x)
      24: #endif	lint
      25:
      26: FILE    *ifile;     /* input file */
      27: char    *iname;     /* input name */
      28: char    *pname;     /* program name */
      29:
      30: main(pargc, pargv) char *pargv[];   {
      31:     register int argc;
      32:     register char **argv;
      33:
      34:     pname = pargv[0];
      35:     argc = pargc-1;
      36:     argv = pargv+1;
      37:     while (argc > 0 && argv[0][0] EQ '-' && argv[0][1] NE EOS)  {
      38: #ifdef  OPTIONS
      39:         register int nop = options(argc, argv);
      40:         if (nop EQ ERR)
      41:             ERM "options are [%s] [ file %s]\n",
      42:                 OPTIONS, MDOTS
      43:             MRE
      44:         argc -= nop;
      45:         argv += nop;
      46: #else
      47:         ERM "parameters are [ file %s]\n", MDOTS MRE
      48: #endif
      49:     }
      50: #ifndef MFILE
      51:     if (argc > 1)
      52:         ERM "arg count\n" MRE
      53: #endif
      54:     do  {
      55:         if (argc EQ 0 || (argv[0][0] EQ '-' && argv[0][1] EQ EOS))  {
      56:             iname = "standard input";
      57:             ifile = stdin;
      58:         }
      59:         else    {
      60:             iname = *argv;
      61:             ifile = fopen(iname, "r");
      62: #ifndef MFILE
      63:             if (ifile EQ NULL)
      64:                 ERM "cannot open %s\n", iname MRE
      65: #endif
      66:         }
      67:         process();
      68:         if (ifile NE NULL && ifile NE stdin)
      69:             VOID(fclose(ifile));
      70:     } while (++argv, --argc > 0);
      71:     exit(0);
      72: }

#### Defined functions

main defined in line 30; never used

#### Defined variables

__void__ defined in line 20; used 1 times

- in line 21

iname defined in line 27; used 4 times

- in line 56-64(4)

pname defined in line 28; used 2 times

- in line 16, 34

#### Defined macros

EOS defined in line 7; used 2 times

- in line 37, 55

EQ defined in line 5; used 10 times

- in line 37-40(2), 55(3), 63
- in /usr/src/new/PORT/B/src/b/retab.c line 85-87(4)

ERM defined in line 16; used 4 times

- in line 41, 47-52(2), 64

ERR defined in line 8; used 4 times

- in line 17, 40
- in /usr/src/new/PORT/B/src/b/retab.c line 44-47(2)

MDOTS defined in line 13; used 2 times

- in line 42-47(2)

MRE defined in line 17; used 4 times

- in line 43-52(3), 64

NE defined in line 6; used 4 times

- in line 37, 68(2)
- in /usr/src/new/PORT/B/src/b/retab.c line 55

VOID defined in line 23; used 2 times

- in line 69
- in /usr/src/new/PORT/B/src/b/retab.c line 34

#### Usage of this include

par.h used 1 times

- in /usr/src/new/PORT/B/src/b/retab.c line 18

Last modified: 1985-08-27 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 607 |