modern syntax for asgops & inits; sccs keywords
authorJay Lepreau <lepreau@ucbvax.Berkeley.EDU>
Mon, 16 Feb 1987 08:42:38 +0000 (00:42 -0800)
committerJay Lepreau <lepreau@ucbvax.Berkeley.EDU>
Mon, 16 Feb 1987 08:42:38 +0000 (00:42 -0800)
SCCS-vsn: local/sccscmds/sccscmds.2/com/date_ab.c 4.4
SCCS-vsn: local/sccscmds/sccscmds.ok/com/date_ab.c 4.4
SCCS-vsn: local/sccscmds/sccscmds.2/com/dohist.c 1.3
SCCS-vsn: local/sccscmds/sccscmds.ok/com/dohist.c 1.3
SCCS-vsn: local/sccscmds/sccscmds.2/com/dolist.c 4.3
SCCS-vsn: local/sccscmds/sccscmds.ok/com/dolist.c 4.3
SCCS-vsn: local/sccscmds/sccscmds.2/com/getline.c 1.2
SCCS-vsn: local/sccscmds/sccscmds.ok/com/getline.c 1.2
SCCS-vsn: local/sccscmds/sccscmds.2/com/pf_ab.c 1.4
SCCS-vsn: local/sccscmds/sccscmds.ok/com/pf_ab.c 1.4
SCCS-vsn: local/sccscmds/sccscmds.2/com/putline.c 1.2
SCCS-vsn: local/sccscmds/sccscmds.ok/com/putline.c 1.2
SCCS-vsn: local/sccscmds/sccscmds.2/com/rdmod.c 1.2
SCCS-vsn: local/sccscmds/sccscmds.ok/com/rdmod.c 1.2
SCCS-vsn: local/sccscmds/sccscmds.2/com/setup.c 1.3
SCCS-vsn: local/sccscmds/sccscmds.ok/com/setup.c 1.3

16 files changed:
usr/src/local/sccscmds/sccscmds.2/com/date_ab.c
usr/src/local/sccscmds/sccscmds.2/com/dohist.c
usr/src/local/sccscmds/sccscmds.2/com/dolist.c
usr/src/local/sccscmds/sccscmds.2/com/getline.c
usr/src/local/sccscmds/sccscmds.2/com/pf_ab.c
usr/src/local/sccscmds/sccscmds.2/com/putline.c
usr/src/local/sccscmds/sccscmds.2/com/rdmod.c
usr/src/local/sccscmds/sccscmds.2/com/setup.c
usr/src/local/sccscmds/sccscmds.ok/com/date_ab.c
usr/src/local/sccscmds/sccscmds.ok/com/dohist.c
usr/src/local/sccscmds/sccscmds.ok/com/dolist.c
usr/src/local/sccscmds/sccscmds.ok/com/getline.c
usr/src/local/sccscmds/sccscmds.ok/com/pf_ab.c
usr/src/local/sccscmds/sccscmds.ok/com/putline.c
usr/src/local/sccscmds/sccscmds.ok/com/rdmod.c
usr/src/local/sccscmds/sccscmds.ok/com/setup.c

index 30e0b2b..d26f726 100644 (file)
@@ -1,6 +1,6 @@
 # include      "../hdr/macros.h"
 
 # include      "../hdr/macros.h"
 
-SCCSID(@(#)date_ab.c   4.3);
+static char Sccsid[] = "@(#)date_ab.c  4.4     %G%";
 
 /*
        Function to convert date in the form "yymmddhhmmss" to
 
 /*
        Function to convert date in the form "yymmddhhmmss" to
@@ -49,22 +49,22 @@ long *bdt;
        if(s<0 || s>59) return(-1);
 
        tim = 0L;
        if(s<0 || s>59) return(-1);
 
        tim = 0L;
-       y =+ 1900;
+       y += 1900;
        for(i=1970; i<y; i++)
        for(i=1970; i<y; i++)
-               tim =+ dysize(i);
+               tim += dysize(i);
        while(--t)
        while(--t)
-               tim =+ mosize(y,t);
-       tim =+ d - 1;
-       tim =* 24;
-       tim =+ h;
-       tim =* 60;
-       tim =+ m;
-       tim =+ timeb.timezone;                  /* GMT correction */
-       tim =* 60;
-       tim =+ s;
+               tim += mosize(y,t);
+       tim += d - 1;
+       tim *= 24;
+       tim += h;
+       tim *= 60;
+       tim += m;
+       tim += timeb.timezone;                  /* GMT correction */
+       tim *= 60;
+       tim += s;
 
        if(localtime(&tim)[8])
 
        if(localtime(&tim)[8])
-               tim =+ -1*60*60;                /* daylight savings */
+               tim += -1*60*60;                /* daylight savings */
        *bdt = tim;
        return(0);
 }
        *bdt = tim;
        return(0);
 }
@@ -92,7 +92,7 @@ g2()
        if (*p) {
                c = (*p++ - '0') * 10;
                if (*p)
        if (*p) {
                c = (*p++ - '0') * 10;
                if (*p)
-                       c =+ (*p++ - '0');
+                       c += (*p++ - '0');
                else
                        c = -1;
        }
                else
                        c = -1;
        }
index 6c8deac..88ca429 100644 (file)
@@ -1,6 +1,6 @@
 # include      "../hdr/defines.h"
 
 # include      "../hdr/defines.h"
 
-SCCSID(@(#)dohist      2.1);
+static char Sccsid[] = "@(#)dohist.c   1.3     %G%";
 
 char   Cstr[RESPSIZE];
 char   Mstr[RESPSIZE];
 
 char   Cstr[RESPSIZE];
 char   Mstr[RESPSIZE];
@@ -157,6 +157,6 @@ register int n;
        p = &stbuf[stind];
        if (&p[n] >= &stbuf[STBUFSZ])
                fatal("out of space (co22)");
        p = &stbuf[stind];
        if (&p[n] >= &stbuf[STBUFSZ])
                fatal("out of space (co22)");
-       stind =+ n;
+       stind += n;
        return(p);
 }
        return(p);
 }
index 45eef30..0146b00 100644 (file)
@@ -1,8 +1,8 @@
 # include      "../hdr/defines.h"
 
 # include      "../hdr/defines.h"
 
-SCCSID(@(#)dolist.c    4.2);
+static char Sccsid[] = "@(#)dolist.c   4.3     %G%";
 
 
-static char br[] "bad range (co12)";
+static char br[] "bad range (co12)";
 
 dolist(pkt,list,ch)
 struct packet *pkt;
 
 dolist(pkt,list,ch)
 struct packet *pkt;
@@ -54,7 +54,7 @@ char ch;
 }
 
 
 }
 
 
-static char dls[] "delta list syntax (co13)";
+static char dls[] "delta list syntax (co13)";
 
 getasid(p,sp)
 register char *p;
 
 getasid(p,sp)
 register char *p;
index 28635b7..5adf1d8 100644 (file)
@@ -1,6 +1,6 @@
 #include       "../hdr/defines.h"
 
 #include       "../hdr/defines.h"
 
-SCCSID(@(#)getline     2.1.1.1);
+static char Sccsid[] = "@(#)getline.c  1.2     %G%";
 /*
        Routine to read a line into the packet.  The main reason for
        it is to make sure that pkt->p_wrttn gets turned off,
 /*
        Routine to read a line into the packet.  The main reason for
        it is to make sure that pkt->p_wrttn gets turned off,
@@ -19,7 +19,7 @@ register struct packet *pkt;
                pkt->p_slnno++;
                pkt->p_wrttn = 0;
                for (p = pkt->p_line; *p; )
                pkt->p_slnno++;
                pkt->p_wrttn = 0;
                for (p = pkt->p_line; *p; )
-                       pkt->p_chash =+ *p++;
+                       pkt->p_chash += *p++;
        }
        else {
                if (!pkt->p_reopen) {
        }
        else {
                if (!pkt->p_reopen) {
index f54944c..f8ce90a 100644 (file)
@@ -1,6 +1,6 @@
 # include      "../hdr/defines.h"
 
 # include      "../hdr/defines.h"
 
-SCCSID(@(#)pf_ab.c     1.3     %G%);
+static char Sccsid[] = "@(#)pf_ab.c    1.4     %G%";
 
 pf_ab(s,pp,all)
 char *s;
 
 pf_ab(s,pp,all)
 char *s;
@@ -39,7 +39,7 @@ int all;
        pp->pf_elist = 0;
        if (!all || !*p)
                return;
        pp->pf_elist = 0;
        if (!all || !*p)
                return;
-       p =+ 2;
+       p += 2;
        xp = alloc(size(p));
        copy(p,xp);
        p = xp;
        xp = alloc(size(p));
        copy(p,xp);
        p = xp;
index d0ea635..88f023a 100644 (file)
@@ -1,6 +1,6 @@
 # include      "../hdr/defines.h"
 
 # include      "../hdr/defines.h"
 
-SCCSID(@(#)putline     2.1.1.1);
+static char Sccsid[] = "@(#)putline.c  1.2     %G%";
 /*
        Routine to write out either the current line in the packet
        (if newline is zero) or the line specified by newline.
 /*
        Routine to write out either the current line in the packet
        (if newline is zero) or the line specified by newline.
@@ -44,7 +44,7 @@ char *newline;
                fputs(p,Xiop);
                if (Xcreate)
                        while (*p)
                fputs(p,Xiop);
                if (Xcreate)
                        while (*p)
-                               pkt->p_nhash =+ *p++;
+                               pkt->p_nhash += *p++;
        }
        Xcreate = 1;
 }
        }
        Xcreate = 1;
 }
@@ -67,11 +67,11 @@ register struct stats *stats;
                sprintf(del,"%05u",stats->s_del);
                sprintf(unc,"%05u",stats->s_unc);
                for (p = ins; *p; p++)
                sprintf(del,"%05u",stats->s_del);
                sprintf(unc,"%05u",stats->s_unc);
                for (p = ins; *p; p++)
-                       pkt->p_nhash =+ (*p - '0');
+                       pkt->p_nhash += (*p - '0');
                for (p = del; *p; p++)
                for (p = del; *p; p++)
-                       pkt->p_nhash =+ (*p - '0');
+                       pkt->p_nhash += (*p - '0');
                for (p = unc; *p; p++)
                for (p = unc; *p; p++)
-                       pkt->p_nhash =+ (*p - '0');
+                       pkt->p_nhash += (*p - '0');
        }
 
        sprintf(hash,"%5u",pkt->p_nhash&0xFFFF);
        }
 
        sprintf(hash,"%5u",pkt->p_nhash&0xFFFF);
index 95a4ac0..ceaeef0 100644 (file)
@@ -1,9 +1,9 @@
 # include      "../hdr/defines.h"
 # define msg(s,help)   fprintf(pkt->p_stdout,msgstr,s,pkt->p_glnno,help)
 
 # include      "../hdr/defines.h"
 # define msg(s,help)   fprintf(pkt->p_stdout,msgstr,s,pkt->p_glnno,help)
 
-SCCSID(@(#)rdmod       2.1);
+static char Sccsid[] = "@(#)rdmod.c    1.2     %G%";
 
 
-static char msgstr[]   "Inex conflict %s at line %u (%s)\n";
+static char msgstr[] = "Inex conflict %s at line %u (%s)\n";
 
 readmod(pkt)
 register struct packet *pkt;
 
 readmod(pkt)
 register struct packet *pkt;
index 9234f6a..7cfeb27 100644 (file)
@@ -1,6 +1,6 @@
 # include      "../hdr/defines.h"
 
 # include      "../hdr/defines.h"
 
-SCCSID(@(#)setup       2.2);
+static char Sccsid[] = "@(#)setup.c    1.3     %G%";
 
 setup(pkt,serial)
 register struct packet *pkt;
 
 setup(pkt,serial)
 register struct packet *pkt;
@@ -8,7 +8,7 @@ int serial;
 {
        register int n;
        register struct apply *rap;
 {
        register int n;
        register struct apply *rap;
-       int     first_app       1;
+       int     first_app = 1;
 
        pkt->p_apply[serial].a_inline = 1;
        for (n = maxser(pkt); n; n--) {
 
        pkt->p_apply[serial].a_inline = 1;
        for (n = maxser(pkt); n; n--) {
@@ -73,9 +73,9 @@ register struct apply *ap;
 int code, reason;
 {
        if (code == EMPTY)
 int code, reason;
 {
        if (code == EMPTY)
-               ap->a_reason =| reason;
+               ap->a_reason |= reason;
        else if (ap->a_code == EMPTY) {
                ap->a_code = code;
        else if (ap->a_code == EMPTY) {
                ap->a_code = code;
-               ap->a_reason =| reason;
+               ap->a_reason |= reason;
        }
 }
        }
 }
index 30e0b2b..d26f726 100644 (file)
@@ -1,6 +1,6 @@
 # include      "../hdr/macros.h"
 
 # include      "../hdr/macros.h"
 
-SCCSID(@(#)date_ab.c   4.3);
+static char Sccsid[] = "@(#)date_ab.c  4.4     %G%";
 
 /*
        Function to convert date in the form "yymmddhhmmss" to
 
 /*
        Function to convert date in the form "yymmddhhmmss" to
@@ -49,22 +49,22 @@ long *bdt;
        if(s<0 || s>59) return(-1);
 
        tim = 0L;
        if(s<0 || s>59) return(-1);
 
        tim = 0L;
-       y =+ 1900;
+       y += 1900;
        for(i=1970; i<y; i++)
        for(i=1970; i<y; i++)
-               tim =+ dysize(i);
+               tim += dysize(i);
        while(--t)
        while(--t)
-               tim =+ mosize(y,t);
-       tim =+ d - 1;
-       tim =* 24;
-       tim =+ h;
-       tim =* 60;
-       tim =+ m;
-       tim =+ timeb.timezone;                  /* GMT correction */
-       tim =* 60;
-       tim =+ s;
+               tim += mosize(y,t);
+       tim += d - 1;
+       tim *= 24;
+       tim += h;
+       tim *= 60;
+       tim += m;
+       tim += timeb.timezone;                  /* GMT correction */
+       tim *= 60;
+       tim += s;
 
        if(localtime(&tim)[8])
 
        if(localtime(&tim)[8])
-               tim =+ -1*60*60;                /* daylight savings */
+               tim += -1*60*60;                /* daylight savings */
        *bdt = tim;
        return(0);
 }
        *bdt = tim;
        return(0);
 }
@@ -92,7 +92,7 @@ g2()
        if (*p) {
                c = (*p++ - '0') * 10;
                if (*p)
        if (*p) {
                c = (*p++ - '0') * 10;
                if (*p)
-                       c =+ (*p++ - '0');
+                       c += (*p++ - '0');
                else
                        c = -1;
        }
                else
                        c = -1;
        }
index 6c8deac..88ca429 100644 (file)
@@ -1,6 +1,6 @@
 # include      "../hdr/defines.h"
 
 # include      "../hdr/defines.h"
 
-SCCSID(@(#)dohist      2.1);
+static char Sccsid[] = "@(#)dohist.c   1.3     %G%";
 
 char   Cstr[RESPSIZE];
 char   Mstr[RESPSIZE];
 
 char   Cstr[RESPSIZE];
 char   Mstr[RESPSIZE];
@@ -157,6 +157,6 @@ register int n;
        p = &stbuf[stind];
        if (&p[n] >= &stbuf[STBUFSZ])
                fatal("out of space (co22)");
        p = &stbuf[stind];
        if (&p[n] >= &stbuf[STBUFSZ])
                fatal("out of space (co22)");
-       stind =+ n;
+       stind += n;
        return(p);
 }
        return(p);
 }
index 45eef30..0146b00 100644 (file)
@@ -1,8 +1,8 @@
 # include      "../hdr/defines.h"
 
 # include      "../hdr/defines.h"
 
-SCCSID(@(#)dolist.c    4.2);
+static char Sccsid[] = "@(#)dolist.c   4.3     %G%";
 
 
-static char br[] "bad range (co12)";
+static char br[] "bad range (co12)";
 
 dolist(pkt,list,ch)
 struct packet *pkt;
 
 dolist(pkt,list,ch)
 struct packet *pkt;
@@ -54,7 +54,7 @@ char ch;
 }
 
 
 }
 
 
-static char dls[] "delta list syntax (co13)";
+static char dls[] "delta list syntax (co13)";
 
 getasid(p,sp)
 register char *p;
 
 getasid(p,sp)
 register char *p;
index 28635b7..5adf1d8 100644 (file)
@@ -1,6 +1,6 @@
 #include       "../hdr/defines.h"
 
 #include       "../hdr/defines.h"
 
-SCCSID(@(#)getline     2.1.1.1);
+static char Sccsid[] = "@(#)getline.c  1.2     %G%";
 /*
        Routine to read a line into the packet.  The main reason for
        it is to make sure that pkt->p_wrttn gets turned off,
 /*
        Routine to read a line into the packet.  The main reason for
        it is to make sure that pkt->p_wrttn gets turned off,
@@ -19,7 +19,7 @@ register struct packet *pkt;
                pkt->p_slnno++;
                pkt->p_wrttn = 0;
                for (p = pkt->p_line; *p; )
                pkt->p_slnno++;
                pkt->p_wrttn = 0;
                for (p = pkt->p_line; *p; )
-                       pkt->p_chash =+ *p++;
+                       pkt->p_chash += *p++;
        }
        else {
                if (!pkt->p_reopen) {
        }
        else {
                if (!pkt->p_reopen) {
index f54944c..f8ce90a 100644 (file)
@@ -1,6 +1,6 @@
 # include      "../hdr/defines.h"
 
 # include      "../hdr/defines.h"
 
-SCCSID(@(#)pf_ab.c     1.3     %G%);
+static char Sccsid[] = "@(#)pf_ab.c    1.4     %G%";
 
 pf_ab(s,pp,all)
 char *s;
 
 pf_ab(s,pp,all)
 char *s;
@@ -39,7 +39,7 @@ int all;
        pp->pf_elist = 0;
        if (!all || !*p)
                return;
        pp->pf_elist = 0;
        if (!all || !*p)
                return;
-       p =+ 2;
+       p += 2;
        xp = alloc(size(p));
        copy(p,xp);
        p = xp;
        xp = alloc(size(p));
        copy(p,xp);
        p = xp;
index d0ea635..88f023a 100644 (file)
@@ -1,6 +1,6 @@
 # include      "../hdr/defines.h"
 
 # include      "../hdr/defines.h"
 
-SCCSID(@(#)putline     2.1.1.1);
+static char Sccsid[] = "@(#)putline.c  1.2     %G%";
 /*
        Routine to write out either the current line in the packet
        (if newline is zero) or the line specified by newline.
 /*
        Routine to write out either the current line in the packet
        (if newline is zero) or the line specified by newline.
@@ -44,7 +44,7 @@ char *newline;
                fputs(p,Xiop);
                if (Xcreate)
                        while (*p)
                fputs(p,Xiop);
                if (Xcreate)
                        while (*p)
-                               pkt->p_nhash =+ *p++;
+                               pkt->p_nhash += *p++;
        }
        Xcreate = 1;
 }
        }
        Xcreate = 1;
 }
@@ -67,11 +67,11 @@ register struct stats *stats;
                sprintf(del,"%05u",stats->s_del);
                sprintf(unc,"%05u",stats->s_unc);
                for (p = ins; *p; p++)
                sprintf(del,"%05u",stats->s_del);
                sprintf(unc,"%05u",stats->s_unc);
                for (p = ins; *p; p++)
-                       pkt->p_nhash =+ (*p - '0');
+                       pkt->p_nhash += (*p - '0');
                for (p = del; *p; p++)
                for (p = del; *p; p++)
-                       pkt->p_nhash =+ (*p - '0');
+                       pkt->p_nhash += (*p - '0');
                for (p = unc; *p; p++)
                for (p = unc; *p; p++)
-                       pkt->p_nhash =+ (*p - '0');
+                       pkt->p_nhash += (*p - '0');
        }
 
        sprintf(hash,"%5u",pkt->p_nhash&0xFFFF);
        }
 
        sprintf(hash,"%5u",pkt->p_nhash&0xFFFF);
index 95a4ac0..ceaeef0 100644 (file)
@@ -1,9 +1,9 @@
 # include      "../hdr/defines.h"
 # define msg(s,help)   fprintf(pkt->p_stdout,msgstr,s,pkt->p_glnno,help)
 
 # include      "../hdr/defines.h"
 # define msg(s,help)   fprintf(pkt->p_stdout,msgstr,s,pkt->p_glnno,help)
 
-SCCSID(@(#)rdmod       2.1);
+static char Sccsid[] = "@(#)rdmod.c    1.2     %G%";
 
 
-static char msgstr[]   "Inex conflict %s at line %u (%s)\n";
+static char msgstr[] = "Inex conflict %s at line %u (%s)\n";
 
 readmod(pkt)
 register struct packet *pkt;
 
 readmod(pkt)
 register struct packet *pkt;
index 9234f6a..7cfeb27 100644 (file)
@@ -1,6 +1,6 @@
 # include      "../hdr/defines.h"
 
 # include      "../hdr/defines.h"
 
-SCCSID(@(#)setup       2.2);
+static char Sccsid[] = "@(#)setup.c    1.3     %G%";
 
 setup(pkt,serial)
 register struct packet *pkt;
 
 setup(pkt,serial)
 register struct packet *pkt;
@@ -8,7 +8,7 @@ int serial;
 {
        register int n;
        register struct apply *rap;
 {
        register int n;
        register struct apply *rap;
-       int     first_app       1;
+       int     first_app = 1;
 
        pkt->p_apply[serial].a_inline = 1;
        for (n = maxser(pkt); n; n--) {
 
        pkt->p_apply[serial].a_inline = 1;
        for (n = maxser(pkt); n; n--) {
@@ -73,9 +73,9 @@ register struct apply *ap;
 int code, reason;
 {
        if (code == EMPTY)
 int code, reason;
 {
        if (code == EMPTY)
-               ap->a_reason =| reason;
+               ap->a_reason |= reason;
        else if (ap->a_code == EMPTY) {
                ap->a_code = code;
        else if (ap->a_code == EMPTY) {
                ap->a_code = code;
-               ap->a_reason =| reason;
+               ap->a_reason |= reason;
        }
 }
        }
 }