args.c
0a1,12
> /*~!ARGS.C*/
> /* Name:  ARGS.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTargs[] = "@(#)ARGS.C 1.1";
> 
18c30
<         'x',    'n',    'v',    't', STDFLG,    'i',    'e',    'r',    'k',    'u',    0
---
> 'x','n','v','t',STDFLG, 'i','e','r','k','u',0
21c33,34
<         execpr, noexec, readpr, oneflg, stdflg, intflg, errflg, rshflg, keyflg, setflg, 0
---
>         execpr, noexec, readpr, oneflg, stdflg, 
>         intflg, errflg, rshflg, keyflg, setflg, 0
blok.c
0a1,12
> /*~!BLOK.C*/
> /* Name:  BLOK.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTblok[] = "@(#)BLOK.C 1.1";
> 
12d23
< 
22a34
> #ifndef mpx
23a36,38
> #else
> BLKPTR          bloktop=(BLKPTR)(0);    /* start of heap */
> #endif
54a70,82
>         reqd += brkincr; reqd &= ~(brkincr-1);
> #ifdef mpx
>         if (bloktop == (BLKPTR)(0)) {
>                 BLKPTR temp;
> 
>                 bloktop = (BLKPTR)(eas); /* set start of heap */
>                 if (setbrk(reqd) <= 0)error(nospace);
> /*                bloktop->word = BLK(Rcheat(bloktop+1)); */
>                 temp = bloktop->word = BLK(Rcheat(bloktop+1));
>                 stakbot=STK( (Rcheat(bloktop+2) + reqd) );
>                 temp->word = (BLKPTR)(0);
>         }
> #endif
66d93
<         reqd += brkincr; reqd &= ~(brkincr-1);
68a96
> #ifndef mpx
69a98,101
> #else
>         if (setbrk(reqd) <= 0)error(nospace);
>         bloktop->word=(BLKPTR)(BLK(Rcheat(bloktop+1)+1));
> #endif
83c115
<         THEN    Lcheat((--p)->word) &= ~BUSY;
---
>         THEN    (--p)->word = (BLKPTR)(Rcheat(p->word) & ~BUSY);
111a144
> 
brkincr.h
0a1,16
> /*~!BRKINCR.H*/
> /* Name:  BRKINCR.H Part No.: _______-____r
>  *                      
>  *                          SOFTWARE ENGINEERING
>  *  Derived from Berkeley 4.2 distribution which is copyrighted by the
>  *               Regents of the University of California
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software ENgineering.
>  */
> static char  UTbrkincr[] = "@(#)BRKINCR.H       1.1";
> 
> /*      brkincr.h       4.1     82/05/07        */
> 
builtin.c
0a1,12
> /*~!BUILTIN.C*/
> /* Name:  BUILTIN.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTbuiltin[] = "@(#)BUILTIN.C   1.1";
> 
cmd.c
0a1,12
> /*~!CMD.C*/
> /* Name:  CMD.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTcmd[] = "@(#)CMD.C   1.1";
> 
380c392
<         THEN    REG SYSPTR      sp=reserved;
---
>         THEN    REG SYSPTR      sp=wreserved;
ctype.c
0a1,12
> /*~!CTYPE.C*/
> /* Name:  CTYPE.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTctype[] = "@(#)CTYPE.C       1.1";
> 
ctype.h
1c1,19
< #
---
> /*~!CTYPE.H*/
> /* Name:  CTYPE.H Part No.: _______-____r
>  *                      
>  *                       SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  *
>  *                     RESTRICTED RIGHTS LEGEND
>  *
>  * Use, duplication, or disclosure by the Government is  subject  to
>  * restriction  as  set forth in paragraph (b) (3) (B) of the Rights
>  * in Technical Data and Computer Software  Clause  in  DAR  7-104.9
>  * (a).
>  */
> static char     SHctype[] = "@(#)CTYPE.H        1.2";
> 
69c87
< char    _ctype1[];
---
> extern  char    _ctype1[];
80c98
< char    _ctype2[];
---
> extern  char    _ctype2[];
82a101
> #define fngchar(c)      (((c)&QUOTE)==0 ANDF _ctype2[c]&(T_FNG))
defs.h
0a1,12
> /*~!DEFS.H*/
> /* Name:  DEFS.H Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      Hdefs[] = "@(#)DEFS.H  1.2";
> 
90c102
< INT errno;
---
> extern  INT errno;
94,121c106,131
< ADDRESS         alloc();
< VOID            addblok();
< STRING          make();
< STRING          movstr();
< TREPTR          cmd();
< TREPTR          makefork();
< NAMPTR          lookup();
< VOID            setname();
< VOID            setargs();
< DOLPTR          useargs();
< REAL            expr();
< STRING          catpath();
< STRING          getpath();
< STRING          *scan();
< STRING          mactrim();
< STRING          macro();
< STRING          execs();
< VOID            await();
< VOID            post();
< STRING          copyto();
< VOID            exname();
< STRING          staknam();
< VOID            printnam();
< VOID            printflg();
< VOID            prs();
< VOID            prc();
< VOID            getenv();
< STRING          *setenv();
---
> extern  ADDRESS         alloc();
> extern  VOID            addblok();
> 
> extern  STRING          make();
> extern  STRING          movstr();
> extern  TREPTR          cmd();
> extern  TREPTR          makefork();
> extern  NAMPTR          lookup();
> extern  VOID            setname();
> extern  VOID            setargs();
> extern  DOLPTR          useargs();
> extern  STRING          catpath();
> extern  STRING          getfpath();
> extern  STRING          execs();
> extern  STRING          *scan();
> extern  STRING          mactrim();
> extern  STRING          macro();
> extern  VOID            await();
> extern  VOID            post();
> extern  VOID            exname();
> extern  VOID            printnam();
> extern  VOID            printflg();
> extern  VOID            prs();
> extern  VOID            prc();
> extern  VOID            getlenv();
> extern  STRING          *setenv();
132,136c142,146
< UFD             output;
< INT             ioset;
< IOPTR           iotemp;         /* files to be deleted sometime */
< IOPTR           iopend;         /* documents waiting to be read at NL */
< INT     stripflg;
---
> extern  UFD             output;
> extern  INT             ioset;
> extern  IOPTR           iotemp;         /* files to be deleted sometime */
> extern  IOPTR           iopend;         /* documents waiting to be read at NL */
> extern  INT     stripflg;
139,143c149,153
< INT             dolc;
< STRING          *dolv;
< STRING          cmdadr;
< DOLPTR          argfor;
< ARGPTR          gchain;
---
> extern  INT             dolc;
> extern  STRING          *dolv;
> extern  STRING          cmdadr;
> extern  DOLPTR          argfor;
> extern  ARGPTR          gchain;
155,163c165,173
< MSG             atline;
< MSG             readmsg;
< MSG             colon;
< MSG             minus;
< MSG             nullstr;
< MSG             sptbnl;
< MSG             unexpected;
< MSG             endoffile;
< MSG             synmsg;
---
> extern  MSG             atline;
> extern  MSG             readmsg;
> extern  MSG             colon;
> extern  MSG             minus;
> extern  MSG             nullstr;
> extern  MSG             sptbnl;
> extern  MSG             unexpected;
> extern  MSG             endoffile;
> extern  MSG             synmsg;
166,171c176,181
< SYSTAB          reserved;
< INT             wdval;
< INT             wdnum;
< ARGPTR          wdarg;
< INT             wdset;
< BOOL            reserv;
---
> extern  SYSTAB          wreserved;
> extern  INT             wdval;
> extern  INT             wdnum;
> extern  ARGPTR          wdarg;
> extern  INT             wdset;
> extern  BOOL            reserv;
174,177c184,187
< MSG             stdprompt;
< MSG             supprompt;
< MSG             profile;
< MSG             sysprofile;
---
> extern  MSG             stdprompt;
> extern  MSG             supprompt;
> extern  MSG             profile;
> extern  MSG             sysprofile;
180,186c190,196
< NAMNOD          fngnod;
< NAMNOD          ifsnod;
< NAMNOD          homenod;
< NAMNOD          mailnod;
< NAMNOD          pathnod;
< NAMNOD          ps1nod;
< NAMNOD          ps2nod;
---
> extern  NAMNOD          fngnod;
> extern  NAMNOD          ifsnod;
> extern  NAMNOD          homenod;
> extern  NAMNOD          mailnod;
> extern  NAMNOD          pathnod;
> extern  NAMNOD          ps1nod;
> extern  NAMNOD          ps2nod;
189,193c199,203
< MSG             flagadr;
< STRING          exitadr;
< STRING          dolladr;
< STRING          pcsadr;
< STRING          pidadr;
---
> extern  MSG             flagadr;
> extern  STRING          exitadr;
> extern  STRING          dolladr;
> extern  STRING          pcsadr;
> extern  STRING          pidadr;
195c205
< MSG             defpath;
---
> extern  MSG             defpath;
198,204c208,214
< MSG             mailname;
< MSG             homename;
< MSG             pathname;
< MSG             fngname;
< MSG             ifsname;
< MSG             ps1name;
< MSG             ps2name;
---
> extern  MSG             mailname;
> extern  MSG             homename;
> extern  MSG             pathname;
> extern  MSG             fngname;
> extern  MSG             ifsname;
> extern  MSG             ps1name;
> extern  MSG             ps2name;
207,209c217,219
< CHAR            tmpout[];
< STRING          tmpnam;
< INT             serial;
---
> extern  CHAR            tmpout[];
> extern  STRING          tmpnam;
> extern  INT             serial;
211c221
< FILE            standin;
---
> extern  FILE            standin;
214,216c224,226
< INT             peekc;
< STRING          comdiv;
< MSG             devnull;
---
> extern  INT             peekc;
> extern  STRING          comdiv;
> extern  MSG             devnull;
235,236c245,246
< INT             flags;
< INT             rwait;  /* flags read waiting */
---
> extern  INT             flags;
> extern  INT             rwait;  /* flags read waiting */
240,241c250,251
< jmp_buf         subshell;
< jmp_buf         errshell;
---
> extern  jmp_buf         subshell;
> extern  jmp_buf         errshell;
245c255
< POS     brkincr;
---
> extern  POS     brkincr;
247c257
< #define MAXTRAP 17
---
> #define MAXTRAP 64
259,262c269,272
< VOID            fault();
< BOOL            trapnote;
< STRING          trapcom[];
< BOOL            trapflg[];
---
> extern  VOID            fault();
> extern  BOOL            trapnote;
> extern  STRING          trapcom[];
> extern  BOOL            trapflg[];
265,269c275,279
< STRING          *environ;
< CHAR            numbuf[];
< MSG             export;
< MSG     duperr;
< MSG             readonly;
---
> extern  STRING          *environ;
> extern  CHAR            numbuf[];
> extern  MSG             export;
> extern  MSG             duperr;
> extern  MSG             readonly;
272,275c282,285
< INT             exitval;
< BOOL            execbrk;
< INT             loopcnt;
< INT             breakcnt;
---
> extern  INT             exitval;
> extern  BOOL            execbrk;
> extern  INT             loopcnt;
> extern  INT             breakcnt;
278,304c288,314
< MSG             mailmsg;
< MSG             coredump;
< MSG             badopt;
< MSG             badparam;
< MSG             unset;
< MSG             badsub;
< MSG             nospace;
< MSG             notfound;
< MSG             badtrap;
< MSG             baddir;
< MSG             badshift;
< MSG             illegal;
< MSG             restricted;
< MSG             execpmsg;
< MSG             notid;
< MSG             wtfailed;
< MSG             badcreate;
< MSG             nofork;
< MSG             noswap;
< MSG             piperr;
< MSG             badopen;
< MSG             badnum;
< MSG             arglist;
< MSG             txtbsy;
< MSG             toobig;
< MSG             badexec;
< MSG             badfile;
---
> extern  MSG             mailmsg;
> extern  MSG             coredump;
> extern  MSG             badopt;
> extern  MSG             badparam;
> extern  MSG             unset;
> extern  MSG             badsub;
> extern  MSG             nospace;
> extern  MSG             notfound;
> extern  MSG             badtrap;
> extern  MSG             baddir;
> extern  MSG             badshift;
> extern  MSG             illegal;
> extern  MSG             restricted;
> extern  MSG             execpmsg;
> extern  MSG             notid;
> extern  MSG             wtfailed;
> extern  MSG             badcreate;
> extern  MSG             nofork;
> extern  MSG             noswap;
> extern  MSG             piperr;
> extern  MSG             badopen;
> extern  MSG             badnum;
> extern  MSG             arglist;
> extern  MSG             txtbsy;
> extern  MSG             toobig;
> extern  MSG             badexec;
> extern  MSG             badfile;
308,309c318,319
< MSG             btest;
< MSG             badop;
---
> extern  MSG             btest;
> extern  MSG             badop;
316c326,330
< address end[];
---
> #ifndef mpx
> extern  address end[];
> #else
> extern  char**  eas;    /* start of heap */
> #endif
320c334
< INT             wasintr;        /* used to tell if break or delete is hit
---
> extern  INT     wasintr;        /* used to tell if break or delete is hit
dup.h
0a1,12
> /*~!DUP.H*/
> /* Name:  DUP.H Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      Hdup[] = "@(#)DUP.H    1.1";
> 
error.c
expand.c
0a1,19
> /*~!EXPAND.C*/
> /* Name:  EXPAND.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  *
>  *                     RESTRICTED RIGHTS LEGEND
>  *
>  * Use, duplication, or disclosure by the Government is  subject  to
>  * restriction  as  set forth in paragraph (b) (3) (B) of the Rights
>  * in Technical Data and Computer Software  Clause  in  DAR  7-104.9
>  * (a).
>  */
> static char     UTexpand[] = "@(#)EXPAND.C      1.4";
> 
12c31
< #define DIRSIZ 15
---
> #include        <sys/param.h>
14c33
< #include        <sys/dir.h>
---
> #include        <dirent.h>
17d35
< 
33c51,52
<         INT             count, dirf;
---
>         INT             count;
>         DIR             *dirf;
38c57
<         struct direct   entry;
---
>         struct dirent   *dp;
40d58
<         REG INT         i;
44c62
<         s=cs=as; entry.d_name[DIRSIZ-1]=0; /* to end the string */
---
>         s=cs=as;
87c105
<             ANDF (dirf=open(*s?s:".",0))>0
---
>             ANDF (dirf=opendir(*s?s:".")) != NULL
95d112
<                 REG STRING pm;
101,103c118,119
<                 WHILE read(dirf, &entry, 16) == 16 ANDF (trapnote&SIGSET) == 0
<                 DO      IF entry.d_ino==0 ORF
<                             (*entry.d_name=='.' ANDF *cs!='.')
---
>                 WHILE (dp = readdir(dirf)) != NULL ANDF (trapnote&SIGSET) == 0
>                 DO      IF (*dp->d_name=='.' ANDF *cs!='.')
110,112c126,128
<                         chgquot(entry.d_name, 1);
<                         IF gmatch(entry.d_name, cs)
<                         THEN    addg(s,entry.d_name,rescan); count++;
---
>                         chgquot(dp->d_name, 1);
>                         IF gmatch(dp->d_name, cs)
>                         THEN    addg(s,dp->d_name,rescan); count++;
114c130
<                         chgquot(entry.d_name, 0);
---
>                         chgquot(dp->d_name, 0);
116c132
<                 close(dirf);
---
>                 closedir(dirf);
236c252
<         FOR i=0;i<DIRSIZ;i++
---
>         FOR i=0;str[i]!='\0';i++
239,240d254
<                 case '\0':
<                         return;
fault.c
0a1,12
> /*~!FAULT.C*/
> /* Name:  FAULT.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTfault[] = "@(#)FAULT.C       1.2";
> 
11a24
> BOOL    trapnote;
16,31c29,91
<                                         0,      /* hangup */
<                                         SIGCAUGHT,      /* interrupt */
<                                         SIGCAUGHT,      /* quit */
<                                         0,      /* illegal instr */
<                                         0,      /* trace trap */
<                                         0,      /* IOT */
<                                         0,      /* EMT */
<                                         0,      /* float pt. exp */
<                                         0,      /* kill */
<                                         0,      /* bus error */
<                                         0,      /* memory faults */
<                                         0,      /* bad sys call */
<                                         0,      /* bad pipe call */
<                                         SIGCAUGHT,      /* alarm */
<                                         SIGCAUGHT,      /* software termination */
<                                         0,      /* unassigned */
---
>                                         0,              /* 1 hangup */
>                                         SIGCAUGHT,      /* 2 interrupt */
>                                         SIGCAUGHT,      /* 3 quit */
>                                         0,              /* 4 illegal instr */
>                                         0,              /* 5 trace trap */
>                                         0,              /* 6 IOT */
>                                         0,              /* 7 EMT */
>                                         0,              /* 8 data excptn */
>                                         0,              /* 9 kill */
>                                         0,              /* 10 bus error */
>                                         0,              /* 11 data mem prot */
>                                         0,              /* 12 bad sys call */
>                                         0,              /* 13 bad pipe call */
>                                         SIGCAUGHT,      /* 14 alarm */
>                                         SIGCAUGHT,      /* 15 software term */
>                                         0,              /* 16 user defined 1 */
>                                         0,              /* 17 user defined 2 */
>                                         0,              /* 18 death of child */
>                                         0,              /* 19 */
>                                         0,              /* 20 */
>                                         0,              /* 21 */
>                                         0,              /* 22 */
>                                         0,              /* 23 */
>                                         0,              /* 24 */
>                                         0,              /* 25 */
>                                         0,              /* 26 */
>                                         0,              /* 27 */
>                                         0,              /* 28 */
>                                         0,              /* 29 */
>                                         0,              /* 30 */
>                                         0,              /* 31 */
>                                         0,              /* 32 */
>                                         0,              /* 33 */
>                                         0,              /* 34 */
>                                         0,              /* 35 */
>                                         0,              /* 36 */
>                                         0,              /* 37 */
>                                         0,              /* 38 */
>                                         0,              /* 39 */
>                                         0,              /* 40 */
>                                         0,              /* 41 */
>                                         0,              /* 42 */
>                                         0,              /* 43 */
>                                         0,              /* 44 */
>                                         0,              /* 45 */
>                                         0,              /* 46 */
>                                         0,              /* 47 */
>                                         0,              /* 48 */
>                                         0,              /* 49 */
>                                         0,              /* 50 */
>                                         0,              /* 51 */
>                                         0,              /* 52 */
>                                         0,              /* 53 */
>                                         0,              /* 54 */
>                                         0,              /* 55 */
>                                         0,              /* 56 */
>                                         0,              /* 57 */
>                                         0,              /* 58 */
>                                         0,              /* 59 ECC mem error */
>                                         0,              /* 60 pgm mem prot */
>                                         0,              /* 61 simulated instr */
>                                         0,              /* 62 priv instr */
>                                         0,              /* 63 user create flt */
io.c
0a1,12
> /*~!IO.C*/
> /* Name:  IO.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTio[] = "@(#)IO.C     1.1";
> 
12a25,29
> /* define the actual storage */
> INT     ioset;
> IOPTR   iotemp;
> IOPTR   iopend;
> INT     stripflg;
118c135
< BOOL            nosubst;
---
> extern  BOOL            nosubst;
mac.h
0a1,12
> /*~!MAC.H*/
> /* Name:  MAC.H Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      Hmac[] = "@(#)MAC.H    1.1";
> 
macro.c
0a1,12
> /*~!MACRO.C*/
> /* Name:  MACRO.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTmacro[] = "@(#)MACRO.C       1.1";
> 
12a25,30
> STRING  exitadr;
> STRING  pcsadr;
> STRING  pidadr;
> STRING  dolladr;
> INT     peekc;
> 
18c36
< LOCAL STRING    copyto(endch)
---
> STRING  copyto(endch)
main.c
0a1,12
> /*~!MAIN.C*/
> /* Name:  MAIN.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTmain[] = "@(#)MAIN.C 1.2";
> 
10d21
<  *      1/6/84          Dave Foote
27d37
< #include        <execargs.h>
31c41,55
< 
---
> /* define the actual storage */
> INT     dolc;
> STRING  *dolv;
> STRING  cmdadr;
> DOLPTR  argfor;
> ARGPTR  gchain;
> INT     flags;
> INT     rwait;
> INT     serial;
> double  boundval;       /* this is to insure subshell is dw bounded */
> jmp_buf subshell;
> jmp_buf errshell;
> STRING  comdiv;
> STRING  tmpnam;
> extern  BLKPTR  bloktop;
45a70
> #ifndef mpx
47d71
< 
49c73,76
< 
---
> #else
>         addblok((POS)0);
>         setbrk(BRKINCR);
> #endif
56c83
<         rsflag=getenv();
---
>         rsflag=getlenv();
125d151
<         ELSE    *execargs=(STRING) dolv;        /* for `ps' cmd */
185c211
<                 THEN    IF mailnod.namval
---
>                 THEN    IF mailnod.namval ANDF *mailnod.namval
mode.h
0a1,12
> /*~!MODE.H*/
> /* Name:  MODE.H Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      Hmode[] = "@(#)MODE.H  1.1";
> 
49,56d60
< 
< /* the following nonsense is required
<  * because casts turn an Lvalue
<  * into an Rvalue so two cheats
<  * are necessary, one for each context.
<  */
< union { int _cheat;};
< #define Lcheat(a)       ((a)._cheat)
58d61
< 
msg.c
0a1,12
> /*~!MSG.C*/
> /* Name:  MSG.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTmsg[] = "@(#)MSG.C   1.3";
> 
103,107c115,119
<                 "Illegal instruction",
<                 "Trace/BPT trap",
<                 "abort",
<                 "EMT trap",
<                 "Floating exception",
---
>                 "Illegal Instruction",
>                 "Trace/BPT Trap",
>                 "Abort",
>                 "EMT Trap",
>                 "Data Exception",
109,111c121,123
<                 "Bus error",
<                 "Memory fault",
<                 "Bad system call",
---
>                 "Bus Error",
>                 "Data Memory Protection Violation",
>                 "Bad System Call",
113c125
<                 "Alarm call",
---
>                 "Alarm Call",
115a128,174
>                 "Signal 17",
>                 "Signal 18",
>                 "Signal 19",
>                 "Signal 20",
>                 "Signal 21",
>                 "Signal 22",
>                 "Signal 23",
>                 "Signal 24",
>                 "Signal 25",
>                 "Signal 26",
>                 "Signal 27",
>                 "Signal 28",
>                 "Signal 29",
>                 "Signal 30",
>                 "Signal 31",
>                 "Signal 32",
>                 "Signal 33",
>                 "Signal 34",
>                 "Signal 35",
>                 "Signal 36",
>                 "Signal 37",
>                 "Signal 38",
>                 "Signal 39",
>                 "Signal 40",
>                 "Signal 41",
>                 "Signal 42",
>                 "Signal 43",
>                 "Signal 44",
>                 "Signal 45",
>                 "Signal 46",
>                 "Signal 47",
>                 "Signal 48",
>                 "Signal 49",
>                 "Signal 50",
>                 "Signal 51",
>                 "Signal 52",
>                 "Signal 53",
>                 "Signal 54",
>                 "Signal 55",
>                 "Signal 56",
>                 "Signal 57",
>                 "Signal 58",
>                 "ECC Memory Error",
>                 "Program Memory Protection Violation",
>                 "Simulated Instruction",
>                 "Priveleged Instruction",
>                 "User Create Fault",
137d195
<                 {"times",       SYSTIMES},
name.c
0a1,12
> /*~!NAME.C*/
> /* Name:  NAME.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTname[] = "@(#)NAME.C 1.2";
> 
97c109,110
<                         THEN    n->namenv = n->namval = argscan;
---
>                         THEN    n->namval = make(argscan);
>                                 n->namenv = make(argscan);
284c297
< LOCAL STRING    staknam(n)
---
> STRING  staknam(n)
320c333
< VOID    getenv()
---
> VOID    getlenv()
name.h
0a1,12
> /*~!NAME.H*/
> /* Name:  NAME.H Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      Hname[] = "@(#)NAME.H  1.1";
> 
print.c
0a1,12
> /*~!PRINT.C*/
> /* Name:  PRINT.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTprint[] = "@(#)PRINT.C       1.2";
> 
48,62d59
< }
< 
< prt(t)
<         L_INT           t;
< {
<         REG INT hr, min, sec;
< 
<         t += 30; t /= 60;
<         sec=t%60; t /= 60;
<         min=t%60;
<         IF hr=t/60
<         THEN    prn(hr); prc('h');
<         FI
<         prn(min); prc('m');
<         prn(sec); prc('s');
profile.c
service.c
0a1,12
> /*~!SERVICE.C*/
> /* Name:  SERVICE.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTservice[] = "@(#)SERVICE.C   1.1";
> 
11a24
> INT     wasintr;
17,18c30,31
< INT             errno;
< STRING          sysmsg[];
---
> /* INT          errno; defined in defs.h */
> extern  STRING          sysmsg[];
79c92
< STRING  getpath(s)
---
> STRING  getfpath(s)
130c143
<         THEN    xecmsg=notfound; path=getpath(*t);
---
>         THEN    xecmsg=notfound; path=getfpath(*t);
138c151
< LOCAL STRING    execs(ap,t)
---
> STRING  execs(ap,t)
393c406
<                 Lcheat(gchain) |= ARGMK;
---
>                 gchain = (ARGPTR) (Rcheat(gchain) | ARGMK);
setbrk.c
0a1,12
> /*~!SETBRK.C*/
> /* Name:  SETBRK.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTsetbrk[] = "@(#)SETBRK.C     1.2";
> 
15c27
<         brkend=a+incr;
---
>         IF a>0 THEN brkend=a+incr; FI
stak.c
0a1,12
> /*~!STAK.C*/
> /* Name:  STAK.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTstak[] = "@(#)STAK.C 1.1";
> 
12,13c24,27
< STKPTR          stakbot=nullstr;
< 
---
> STKPTR  stakbas;
> STKPTR  brkend;
> BLKPTR  stakbsy;
> STKPTR  staktop;
14a29,33
> #ifndef mpx
> STKPTR          stakbot=nullstr;
> #else
> STKPTR          stakbot=(STKPTR)(0);
> #endif
19c38
<         INT             asize;
---
> INT             asize;
stak.h
0a1,12
> /*~!STAK.H*/
> /* Name:  STAK.H Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      Hstak[] = "@(#)STAK.H  1.1";
> 
37c49
< STKPTR          locstak();
---
> extern  STKPTR          locstak();
47c59
< STKPTR          endstak();
---
> extern  STKPTR          endstak();
52c64
< STKPTR          cpystak();
---
> extern  STKPTR          cpystak();
55c67
< STKPTR          getstak();
---
> extern  STKPTR          getstak();
61c73
< BLKPTR          stakbsy;
---
> extern  BLKPTR          stakbsy;
64c76
< STKPTR          stakbas;
---
> extern  STKPTR          stakbas;
67c79
< STKPTR          brkend;
---
> extern  STKPTR          brkend;
70c82
< STKPTR          stakbot;
---
> extern  STKPTR          stakbot;
73c85
< STKPTR          staktop;
---
> extern  STKPTR          staktop;
76c88
< STKPTR          savstak();
---
> extern  STKPTR          savstak();
string.c
0a1,12
> /*~!STRING.C*/
> /* Name:  STRING.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTstring[] = "@(#)STRING.C     1.1";
> 
sym.h
0a1,12
> /*~!SYM.H*/
> /* Name:  SYM.H Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      Hsym[] = "@(#)SYM.H    1.1";
> 
test.c
0a1,12
> /*~!TEST.C*/
> /* Name:  TEST.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTtest[] = "@(#)TEST.C 1.3";
> 
151a164,168
>         IF (field == S_IFCHR) ORF (field == S_IFDIR)
>         THEN    IF (statb.st_mode & (S_IFCHR | S_IFDIR)) == (S_IFCHR | S_IFDIR)
>                 THEN    return(0);
>                 FI
>         FI
timeout.h
0a1,12
> /*~!TIMEOUT.H*/
> /* Name:  TIMEOUT.H Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      Htimeout[] = "@(#)TIMEOUT.H    1.1";
> 
word.c
0a1,12
> /*~!WORD.C*/
> /* Name:  WORD.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTword[] = "@(#)WORD.C 1.1";
> 
12a25,30
> SYSTAB  wreserved = 0;
> INT     wdval;
> INT     wdnum;
> ARGPTR  wdarg;
> INT     wdset;
> BOOL    reserv;
16d33
< 
57c74
<                         IF reserv==FALSE ORF (wdval=syslook(((ARGPTR) argp)->argval,reserved))==0
---
>                         IF reserv==FALSE ORF (wdval=syslook(((ARGPTR) argp)->argval,wreserved))==0
xec.c
0a1,12
> /*~!XEC.C*/
> /* Name:  XEC.C Part No.: _______-____r
>  *                      
>  *                           SOFTWARE ENGINEERING
>  *
>  * The recipient of this product specifically agrees not to distribute,
>  * disclose, or disseminate in any way, to any one, nor use for its own
>  * benefit, or the benefit of others, any information contained  herein
>  * without the expressed written consent of Software Engineering.
>  */
> static char      UTxec[] = "@(#)XEC.C   1.2";
> 
16,18c28,29
< SYSTAB          commands;
< SYSTAB          xcmds;
< 
---
> extern  SYSTAB          commands;
> extern  SYSTAB          xcmds;
19a31,34
> INT     exitval;
> BOOL    execbrk;
> INT     loopcnt;
> INT     breakcnt;
23d37
< 
25,27c39,40
<         TREPTR          argt;
<         INT             *pf1, *pf2;
< 
---
> TREPTR          argt;
> INT             *pf1, *pf2;
78c91
<                                                 IF (f=pathopen(getpath(a1), a1)) < 0
---
>                                                 IF (f=pathopen(getfpath(a1), a1)) < 0
85,91d97
<                                 case SYSTIMES:
<                                         {
<                                         L_INT   t[4]; times(t);
<                                         prt(t[2]); blank(); prt(t[3]); newline();
<                                         }
<                                         break;
<         
