# include "../hdr/defines.h"
# include "../hdr/had.h"
-SCCSID(@(#)admin.c 4.1);
+static char Sccsid[] = "@(#)admin.c 4.2 %G%";
/*
Program to create new SCCS files and change parameters
char *z; /* for validation program name */
char had[26], had_flag[26], rm_flag[26];
char *Comments, *Mrs;
-char Valpgm[] "/usr/local/val";
+char Valpgm[] = "/usr/local/val";
int irel, fexists, num_files;
-int VFLAG 0;
+int VFLAG = 0;
int Domrs;
char *Sflags[];
char *anames[MAXNAMES], *enames[MAXNAMES];
Change flags for 'fatal' so that it will return to this
routine (main) instead of terminating processing.
*/
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
/*
Call 'admin' routine for each file argument.
gpkt.p_wrttn = 1; /* don't write previous line */
- cp =+ 2; /* point to flag character */
+ cp += 2; /* point to flag character */
k = *cp - 'a';
if (!had_flag[k] && !rm_flag[k]) {
# include "../hdr/defines.h"
-SCCSID(@(#)bdiff.c 4.2);
+static char Sccsid[] = "@(#)bdiff.c 4.3 %G%";
/*
This program segments two files into pieces of <= seglim lines
int seglim; /* limit of size of file segment to be generated */
-char diff[] "/bin/diff";
-char tempskel[] "/tmp/bdXXXXX"; /* used to generate temp file names */
+char diff[] = "/bin/diff";
+char tempskel[] = "/tmp/bdXXXXX"; /* used to generate temp file names */
char tempfile[32];
char otmp[32], ntmp[32];
int linenum;
if (argc > 3) {
if (argv[3][0] == '-' && argv[3][1] == 's')
- Fflags =& ~FTLMSG;
+ Fflags &= ~FTLMSG;
else {
if ((seglim = patoi(argv[3])) == -1)
fatal("non-numeric limit (bd4)");
if (argc == 5 && argv[4][0] == '-' &&
argv[4][1] == 's')
- Fflags =& ~FTLMSG;
+ Fflags &= ~FTLMSG;
}
}
if (status&~0x100)
fatal(sprintf(Error,"'%s' failed (bd6)",diff));
}
- linenum =+ seglim;
+ linenum += seglim;
/*
Remove temporary files.
default:
lp = satoi(lp,&num);
- num =+ linenum;
+ num += linenum;
printf("%d",num);
}
}
# include "../hdr/defines.h"
# include "../hdr/had.h"
-SCCSID(@(#)cmt.c 4.3);
+static char Sccsid[] = "@(#)cmt.c 4.4 %G%";
struct packet gpkt;
int num_files, had_ffile;
char *Comments, *Mrs, *ffile;
char Cstr[BUFSIZ], Mstr[BUFSIZ], Line[BUFSIZ], had[26];
FILE *iop, *Xiop;
-static char ifde[] "initial file does not exists";
+static char ifde[] = "initial file does not exists";
main(argc,argv)
int argc;
Reset flags for 'fatal' so that it will return to 'main'
rather than exiting.
*/
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
/*
Invoke 'cmt' for each file argument.
}
-static char s_warn[] "WARNING: MR flag is set; `%s' should contain both MR line and comment line\n";
+static char s_warn[] = "WARNING: MR flag is set; `%s' should contain both MR line and comment line\n";
-static char ns_warn[] "WARNING: MR flag is not set; `%s' should only contain comment line\n";
+static char ns_warn[] = "WARNING: MR flag is not set; `%s' should only contain comment line\n";
cmt(file)
register char *file;
}
-static char cle[] "comment line for initial delta already exists";
+static char cle[] = "comment line for initial delta already exists";
do_delt(pkt)
register struct packet *pkt;
{
int n;
- int did_zero 0;
+ int did_zero = 0;
struct deltab dt;
struct stats stats;
# include "../hdr/defines.h"
# include "../hdr/had.h"
-SCCSID(@(#)comb.c 4.2);
+static char Sccsid[] = "@(#)comb.c 4.3 %G%";
USXALLOC();
struct packet gpkt;
if (HADP && HADC)
fatal("can't have both -p and -c (cb2)");
setsig();
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
iop = stdout;
for (i = 1; i < argc; i++)
if (p=argv[i])
# include "../hdr/defines.h"
# include "../hdr/had.h"
-SCCSID(@(#)delta.c 4.7);
+static char Sccsid[] = "@(#)delta.c 4.8 %G%";
USXALLOC();
# ifdef LOGDELTA
char Diffpgm[] = "/usr/local/bdiff";
FILE *Diffin;
-int Debug 0;
+int Debug = 0;
struct packet gpkt;
struct sid sid;
int num_files;
Logf = fopen(LogFile, "a");
# endif
setsig();
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
for (i=1; i<argc; i++)
if (p=argv[i])
do_file(p,delta);
delta(file)
char *file;
{
- static int first 1;
+ static int first = 1;
register char *p;
int n, linenum;
char type;
Diffin = dodiff(auxf(gpkt.p_file,'g'),dfilename,difflim);
while (n = getdiff(&type,&linenum)) {
if (type == INS) {
- inserted =+ n;
+ inserted += n;
insert(&gpkt,linenum,n,newser);
}
else {
- deleted =+ n;
+ deleted += n;
delete(&gpkt,linenum,n,newser);
}
}
# include "../hdr/had.h"
# include <sys/dir.h>
-SCCSID(@(#)get.c 4.7);
+static char Sccsid[] = "@(#)get.c 4.8 %G%";
-int Debug 0;
+int Debug = 0;
struct packet gpkt;
struct sid sid;
unsigned Ser;
int num_files;
char had[26];
char *ilist, *elist, *lfile;
-long cutoff 0X7FFFFFFFL; /* max positive long */
+long cutoff = 0X7FFFFFFFL; /* max positive long */
int verbosity;
char Gfile[MAXNAMLEN + 3];
char Mod[MAXNAMLEN + 3]; /* should be as large as Gfile? */
if (!HADS)
verbosity = -1;
setsig();
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
for (i=1; i<argc; i++)
if (p=argv[i])
do_file(p,get);
chkbr = 0;
if (pkt->p_reqsid.s_br == 0) {
- pkt->p_reqsid.s_lev =+ 1;
+ pkt->p_reqsid.s_lev += 1;
if (sidtoser(&pkt->p_reqsid,pkt) ||
pkt->p_maxr > pkt->p_reqsid.s_rel || branch) {
pkt->p_reqsid.s_rel = pkt->p_gotsid.s_rel;
else if (pkt->p_reqsid.s_seq == 0 && !branch)
pkt->p_reqsid.s_seq = pkt->p_gotsid.s_seq + 1;
else {
- pkt->p_reqsid.s_seq =+ 1;
+ pkt->p_reqsid.s_seq += 1;
if (branch || sidtoser(&pkt->p_reqsid,pkt)) {
- pkt->p_reqsid.s_br =+ 1;
+ pkt->p_reqsid.s_br += 1;
pkt->p_reqsid.s_seq = 1;
chkbr++;
}
}
if (chkbr)
while (sidtoser(&pkt->p_reqsid,pkt))
- pkt->p_reqsid.s_br =+ 1;
+ pkt->p_reqsid.s_br += 1;
if (sidtoser(&pkt->p_reqsid,pkt))
fatal("internal error in newsid()");
}
*new = '\0';
}
-static char Zkeywd[5] "@(#)";
+static char Zkeywd[5] = "@(#)";
idsubst(pkt,line)
# include "../hdr/defines.h"
-SCCSID(@(#)help.c 4.1);
+static char Sccsid[] = "@(#)help.c 4.2 %G%";
/*
Program to locate helpful info in an ascii file.
If the argument is omitted, the program requests it.
*/
-char oldfile[] "/usr/local/lib/sccs.hf";
-char helpdir[] "/usr/local/lib/help/";
+char oldfile[] = "/usr/local/lib/sccs.hf";
+char helpdir[] = "/usr/local/lib/help/";
char hfile[64];
FILE *iop;
char line [512];
# include "../hdr/defines.h"
# include "../hdr/had.h"
-SCCSID(@(#)prs.c 4.1);
+static char Sccsid[] = "@(#)prs.c 4.2 %G%";
char had[26];
-char Getpgm[] "/usr/local/get";
+char Getpgm[] = "/usr/local/get";
char Sid[32];
char Mod[16];
char *Type;
char Deltadate[18];
char *Deltatime;
-char tempskel[] "/tmp/prXXXXXX"; /* used to generate temp
- file names
- */
+char tempskel[] = "/tmp/prXXXXXX"; /* used to generate temp file names */
+
char untmp[32], uttmp[32], cmtmp[32];
char mrtmp[32], bdtmp[32];
FILE *UNiop;
Change flags for 'fatal' so that it will return to this
routine (main) instead of terminating processing.
*/
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
/*
Call 'prs' routine for each file argument.
* immediately.
*/
-static char Zkeywd[5] "@(#)";
+static char Zkeywd[5] = "@(#)";
scanspec(spec,dtp,statp)
char spec[];
struct deltab *dtp;
else if(lp[0] == ':' && lp[1] != 0 && lp[2] !=0 && lp[3] == ':') {
if (lp[1] == ':') {
putchar(':');
- *lp =+ 2;
+ *lp += 2;
continue;
}
u.str[1] = *++lp;
getit(str,cp)
register char *str, *cp;
{
- cp =+ 2;
+ cp += 2;
NONBLANK(cp);
cp[length(cp) - 1] = '\0';
sprintf(str,"%s",cp);
# include "../hdr/defines.h"
# include "../hdr/had.h"
-SCCSID(@(#)prt.c 4.1);
+static char Sccsid[] = "@(#)prt.c 4.2 %G%";
/*
Program to print parts or all of an SCCS file.
long revcut;
int linenum;
char *ysid;
-char *flagdesc[26] { "",
+char *flagdesc[26] = { "",
"branch",
"ceiling",
"default SID",
Change flags for 'fatal' so that it will return to this
routine (main) instead of terminating processing.
*/
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
/*
Call 'prt' routine for each file argument.
register struct delent *delp;
register char *lp;
{
- lp =+ 2;
+ lp += 2;
NONBLANK(lp);
delp->type = *lp++;
NONBLANK(lp);
# include "../hdr/defines.h"
# include "../hdr/had.h"
-SCCSID(@(#)rmchg.c 4.2);
+static char Sccsid[] = "@(#)rmchg.c 4.3 %G%";
/*
Program to remove a specified delta from an SCCS file,
Change flags for 'fatal' so that it will return to this
routine (main) instead of terminating processing.
*/
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
/*
Call 'rmchg' routine for each file argument.
rmchg(file)
char *file;
{
- static int first_time 1;
+ static int first_time = 1;
struct deltab dt; /* see file s.defines.h */
struct stats stats; /* see file s.defines.h */
extern char *Sflags[];
# include "../hdr/defines.h"
# include "../hdr/had.h"
-SCCSID(@(#)snull.c 4.3);
+static char Sccsid[] = "@(#)snull.c 4.4 %G%";
USXALLOC();
-int Debug 0;
+int Debug = 0;
struct packet gpkt;
struct sid sid;
int num_files;
Reset flags for 'fatal' so that it will return to 'main'
rather than exiting.
*/
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
/*
Invoke 'snull' for each file argument.
if (reldiff < 0)
fatal("file has invalid trunk delta (sn1)");
- currel =+ reldiff; /* update currel */
+ currel += reldiff; /* update currel */
/*
Find pointer to ancestor delta.
reldiff--;
while (ptrtemp) {
if (ptrtemp->ds_ser >= serhold)
- ptrtemp->ds_ser =+ reldiff;
+ ptrtemp->ds_ser += reldiff;
if (ptrtemp->ds_pred >= serhold)
- ptrtemp->ds_pred =+ reldiff;
+ ptrtemp->ds_pred += reldiff;
ptrtemp = ptrtemp->ds_youngerdel;
}
char *pred;
} del;
-SCCSID(@(#)val.c 4.2);
+static char Sccsid[] = "@(#)val.c 4.3 %G%";
/* This is the main program that determines whether the command line
* comes from the standard input or read off the original command
if (line[0] != '\n') {
repl (line,'\n','\0');
process(line);
- ret_code =| inline_err;
+ ret_code |= inline_err;
}
}
}
testklt = 1;
NONBLANK(p_line);
if (*p_line == '-') {
- p_line =+ 1;
+ p_line += 1;
c = *p_line;
p_line++;
switch (c) {
p_line = getval(p_line,name);
break;
default:
- inline_err =| UNKDUP_ERR;
+ inline_err |= UNKDUP_ERR;
}
/*
use 'had' array and determine if the keyletter
was given twice.
*/
if (had[c - 'a']++ && testklt++)
- inline_err =| UNKDUP_ERR;
+ inline_err |= UNKDUP_ERR;
}
else {
/*
check if any files were named as arguments
*/
if (num_files == 0)
- inline_err =| FILARG_ERR;
+ inline_err |= FILARG_ERR;
/*
check for error in command line.
*/
*/
sprintf(path,"%s",filelist[j]);
validate(path,sid,type,name);
- inline_err =| infile_err;
+ inline_err |= infile_err;
/*
check for error from 'validate' and call 'report'
depending on 'silent' flag.
infile_err = goods = goodt = goodn = hadmflag = 0;
sinit(&gpkt,c_path);
if (!sccsfile(c_path) || (gpkt.p_iop = fopen(c_path,"r")) == NULL)
- infile_err =| FILENAM_ERR;
+ infile_err |= FILENAM_ERR;
else {
l = get_line(&gpkt); /* read first line in file */
/*
check that it is header line.
*/
if (*l++ != CTLCHAR || *l++ != HEAD)
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
else {
/*
check for invalid or ambiguous SID.
*/
if (invalid(c_sid))
- infile_err =| INVALSID_ERR;
+ infile_err |= INVALSID_ERR;
/*
read delta table checking for errors and/or
SID.
*/
if (do_delt(&gpkt,goods,c_sid)) {
fclose(gpkt.p_iop);
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
return;
}
NONBLANK(l);
repl(l,'\n','\0');
if (*l == TYPEFLAG) {
- l =+ 2;
+ l += 2;
if (equal(c_type,l))
goodt++;
}
else if (*l == MODFLAG) {
hadmflag++;
- l =+ 2;
+ l += 2;
if (equal(c_name,l))
goodn++;
}
}
if (*(--l) != BUSERTXT) {
fclose(gpkt.p_iop);
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
return;
}
/*
check if 'y' flag matched '-y' arg value.
*/
if (!goodt && HADY)
- infile_err =| TYPE_ERR;
+ infile_err |= TYPE_ERR;
/*
check if 'm' flag matched '-m' arg value.
*/
if (HADM && !hadmflag) {
if (!equal(auxf(sname(c_path),'g'),c_name))
- infile_err =| NAME_ERR;
+ infile_err |= NAME_ERR;
}
else if (HADM && hadmflag && !goodn)
- infile_err =| NAME_ERR;
+ infile_err |= NAME_ERR;
}
else read_to(BUSERTXT,&gpkt);
read_to(EUSERTXT,&gpkt);
if ((n = fgets(pkt->p_line,sizeof(pkt->p_line),pkt->p_iop)) != NULL) {
pkt->p_slnno++;
for (p = pkt->p_line; *p; )
- pkt->p_chash =+ *p++;
+ pkt->p_chash += *p++;
}
else {
if (!pkt->p_chkeof)
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
if (pkt->do_chksum && (pkt->p_chash ^ pkt->p_ihash)&0xFFFF)
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
}
return(n);
}
continue;
else {
if (!((iord = *p++) == INS || iord == DEL || iord == END)) {
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
return(0);
}
NONBLANK(p);
}
}
if (pkt->p_q)
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
return(0);
}
if (cur->q_sernum <= ser)
break;
if (cur->q_sernum == ser)
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
prev->q_next = q = alloc(sizeof(*q));
q->q_next = cur;
q->q_sernum = ser;
setkeep(pkt);
}
else
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
}
if (pkt->p_line[1] != BUSERNAM)
return(1);
if (HADR && !goods && !(infile_err & INVALSID_ERR))
- infile_err =| NONEXSID_ERR;
+ infile_err |= NONEXSID_ERR;
return(0);
}
# include "../hdr/defines.h"
# include "../hdr/had.h"
-SCCSID(@(#)admin.c 4.1);
+static char Sccsid[] = "@(#)admin.c 4.2 %G%";
/*
Program to create new SCCS files and change parameters
char *z; /* for validation program name */
char had[26], had_flag[26], rm_flag[26];
char *Comments, *Mrs;
-char Valpgm[] "/usr/local/val";
+char Valpgm[] = "/usr/local/val";
int irel, fexists, num_files;
-int VFLAG 0;
+int VFLAG = 0;
int Domrs;
char *Sflags[];
char *anames[MAXNAMES], *enames[MAXNAMES];
Change flags for 'fatal' so that it will return to this
routine (main) instead of terminating processing.
*/
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
/*
Call 'admin' routine for each file argument.
gpkt.p_wrttn = 1; /* don't write previous line */
- cp =+ 2; /* point to flag character */
+ cp += 2; /* point to flag character */
k = *cp - 'a';
if (!had_flag[k] && !rm_flag[k]) {
# include "../hdr/defines.h"
-SCCSID(@(#)bdiff.c 4.2);
+static char Sccsid[] = "@(#)bdiff.c 4.3 %G%";
/*
This program segments two files into pieces of <= seglim lines
int seglim; /* limit of size of file segment to be generated */
-char diff[] "/bin/diff";
-char tempskel[] "/tmp/bdXXXXX"; /* used to generate temp file names */
+char diff[] = "/bin/diff";
+char tempskel[] = "/tmp/bdXXXXX"; /* used to generate temp file names */
char tempfile[32];
char otmp[32], ntmp[32];
int linenum;
if (argc > 3) {
if (argv[3][0] == '-' && argv[3][1] == 's')
- Fflags =& ~FTLMSG;
+ Fflags &= ~FTLMSG;
else {
if ((seglim = patoi(argv[3])) == -1)
fatal("non-numeric limit (bd4)");
if (argc == 5 && argv[4][0] == '-' &&
argv[4][1] == 's')
- Fflags =& ~FTLMSG;
+ Fflags &= ~FTLMSG;
}
}
if (status&~0x100)
fatal(sprintf(Error,"'%s' failed (bd6)",diff));
}
- linenum =+ seglim;
+ linenum += seglim;
/*
Remove temporary files.
default:
lp = satoi(lp,&num);
- num =+ linenum;
+ num += linenum;
printf("%d",num);
}
}
# include "../hdr/defines.h"
# include "../hdr/had.h"
-SCCSID(@(#)cmt.c 4.3);
+static char Sccsid[] = "@(#)cmt.c 4.4 %G%";
struct packet gpkt;
int num_files, had_ffile;
char *Comments, *Mrs, *ffile;
char Cstr[BUFSIZ], Mstr[BUFSIZ], Line[BUFSIZ], had[26];
FILE *iop, *Xiop;
-static char ifde[] "initial file does not exists";
+static char ifde[] = "initial file does not exists";
main(argc,argv)
int argc;
Reset flags for 'fatal' so that it will return to 'main'
rather than exiting.
*/
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
/*
Invoke 'cmt' for each file argument.
}
-static char s_warn[] "WARNING: MR flag is set; `%s' should contain both MR line and comment line\n";
+static char s_warn[] = "WARNING: MR flag is set; `%s' should contain both MR line and comment line\n";
-static char ns_warn[] "WARNING: MR flag is not set; `%s' should only contain comment line\n";
+static char ns_warn[] = "WARNING: MR flag is not set; `%s' should only contain comment line\n";
cmt(file)
register char *file;
}
-static char cle[] "comment line for initial delta already exists";
+static char cle[] = "comment line for initial delta already exists";
do_delt(pkt)
register struct packet *pkt;
{
int n;
- int did_zero 0;
+ int did_zero = 0;
struct deltab dt;
struct stats stats;
# include "../hdr/defines.h"
# include "../hdr/had.h"
-SCCSID(@(#)comb.c 4.2);
+static char Sccsid[] = "@(#)comb.c 4.3 %G%";
USXALLOC();
struct packet gpkt;
if (HADP && HADC)
fatal("can't have both -p and -c (cb2)");
setsig();
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
iop = stdout;
for (i = 1; i < argc; i++)
if (p=argv[i])
# include "../hdr/defines.h"
# include "../hdr/had.h"
-SCCSID(@(#)delta.c 4.7);
+static char Sccsid[] = "@(#)delta.c 4.8 %G%";
USXALLOC();
# ifdef LOGDELTA
char Diffpgm[] = "/usr/local/bdiff";
FILE *Diffin;
-int Debug 0;
+int Debug = 0;
struct packet gpkt;
struct sid sid;
int num_files;
Logf = fopen(LogFile, "a");
# endif
setsig();
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
for (i=1; i<argc; i++)
if (p=argv[i])
do_file(p,delta);
delta(file)
char *file;
{
- static int first 1;
+ static int first = 1;
register char *p;
int n, linenum;
char type;
Diffin = dodiff(auxf(gpkt.p_file,'g'),dfilename,difflim);
while (n = getdiff(&type,&linenum)) {
if (type == INS) {
- inserted =+ n;
+ inserted += n;
insert(&gpkt,linenum,n,newser);
}
else {
- deleted =+ n;
+ deleted += n;
delete(&gpkt,linenum,n,newser);
}
}
# include "../hdr/had.h"
# include <sys/dir.h>
-SCCSID(@(#)get.c 4.7);
+static char Sccsid[] = "@(#)get.c 4.8 %G%";
-int Debug 0;
+int Debug = 0;
struct packet gpkt;
struct sid sid;
unsigned Ser;
int num_files;
char had[26];
char *ilist, *elist, *lfile;
-long cutoff 0X7FFFFFFFL; /* max positive long */
+long cutoff = 0X7FFFFFFFL; /* max positive long */
int verbosity;
char Gfile[MAXNAMLEN + 3];
char Mod[MAXNAMLEN + 3]; /* should be as large as Gfile? */
if (!HADS)
verbosity = -1;
setsig();
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
for (i=1; i<argc; i++)
if (p=argv[i])
do_file(p,get);
chkbr = 0;
if (pkt->p_reqsid.s_br == 0) {
- pkt->p_reqsid.s_lev =+ 1;
+ pkt->p_reqsid.s_lev += 1;
if (sidtoser(&pkt->p_reqsid,pkt) ||
pkt->p_maxr > pkt->p_reqsid.s_rel || branch) {
pkt->p_reqsid.s_rel = pkt->p_gotsid.s_rel;
else if (pkt->p_reqsid.s_seq == 0 && !branch)
pkt->p_reqsid.s_seq = pkt->p_gotsid.s_seq + 1;
else {
- pkt->p_reqsid.s_seq =+ 1;
+ pkt->p_reqsid.s_seq += 1;
if (branch || sidtoser(&pkt->p_reqsid,pkt)) {
- pkt->p_reqsid.s_br =+ 1;
+ pkt->p_reqsid.s_br += 1;
pkt->p_reqsid.s_seq = 1;
chkbr++;
}
}
if (chkbr)
while (sidtoser(&pkt->p_reqsid,pkt))
- pkt->p_reqsid.s_br =+ 1;
+ pkt->p_reqsid.s_br += 1;
if (sidtoser(&pkt->p_reqsid,pkt))
fatal("internal error in newsid()");
}
*new = '\0';
}
-static char Zkeywd[5] "@(#)";
+static char Zkeywd[5] = "@(#)";
idsubst(pkt,line)
# include "../hdr/defines.h"
-SCCSID(@(#)help.c 4.1);
+static char Sccsid[] = "@(#)help.c 4.2 %G%";
/*
Program to locate helpful info in an ascii file.
If the argument is omitted, the program requests it.
*/
-char oldfile[] "/usr/local/lib/sccs.hf";
-char helpdir[] "/usr/local/lib/help/";
+char oldfile[] = "/usr/local/lib/sccs.hf";
+char helpdir[] = "/usr/local/lib/help/";
char hfile[64];
FILE *iop;
char line [512];
# include "../hdr/defines.h"
# include "../hdr/had.h"
-SCCSID(@(#)prs.c 4.1);
+static char Sccsid[] = "@(#)prs.c 4.2 %G%";
char had[26];
-char Getpgm[] "/usr/local/get";
+char Getpgm[] = "/usr/local/get";
char Sid[32];
char Mod[16];
char *Type;
char Deltadate[18];
char *Deltatime;
-char tempskel[] "/tmp/prXXXXXX"; /* used to generate temp
- file names
- */
+char tempskel[] = "/tmp/prXXXXXX"; /* used to generate temp file names */
+
char untmp[32], uttmp[32], cmtmp[32];
char mrtmp[32], bdtmp[32];
FILE *UNiop;
Change flags for 'fatal' so that it will return to this
routine (main) instead of terminating processing.
*/
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
/*
Call 'prs' routine for each file argument.
* immediately.
*/
-static char Zkeywd[5] "@(#)";
+static char Zkeywd[5] = "@(#)";
scanspec(spec,dtp,statp)
char spec[];
struct deltab *dtp;
else if(lp[0] == ':' && lp[1] != 0 && lp[2] !=0 && lp[3] == ':') {
if (lp[1] == ':') {
putchar(':');
- *lp =+ 2;
+ *lp += 2;
continue;
}
u.str[1] = *++lp;
getit(str,cp)
register char *str, *cp;
{
- cp =+ 2;
+ cp += 2;
NONBLANK(cp);
cp[length(cp) - 1] = '\0';
sprintf(str,"%s",cp);
# include "../hdr/defines.h"
# include "../hdr/had.h"
-SCCSID(@(#)prt.c 4.1);
+static char Sccsid[] = "@(#)prt.c 4.2 %G%";
/*
Program to print parts or all of an SCCS file.
long revcut;
int linenum;
char *ysid;
-char *flagdesc[26] { "",
+char *flagdesc[26] = { "",
"branch",
"ceiling",
"default SID",
Change flags for 'fatal' so that it will return to this
routine (main) instead of terminating processing.
*/
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
/*
Call 'prt' routine for each file argument.
register struct delent *delp;
register char *lp;
{
- lp =+ 2;
+ lp += 2;
NONBLANK(lp);
delp->type = *lp++;
NONBLANK(lp);
# include "../hdr/defines.h"
# include "../hdr/had.h"
-SCCSID(@(#)rmchg.c 4.2);
+static char Sccsid[] = "@(#)rmchg.c 4.3 %G%";
/*
Program to remove a specified delta from an SCCS file,
Change flags for 'fatal' so that it will return to this
routine (main) instead of terminating processing.
*/
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
/*
Call 'rmchg' routine for each file argument.
rmchg(file)
char *file;
{
- static int first_time 1;
+ static int first_time = 1;
struct deltab dt; /* see file s.defines.h */
struct stats stats; /* see file s.defines.h */
extern char *Sflags[];
# include "../hdr/defines.h"
# include "../hdr/had.h"
-SCCSID(@(#)snull.c 4.3);
+static char Sccsid[] = "@(#)snull.c 4.4 %G%";
USXALLOC();
-int Debug 0;
+int Debug = 0;
struct packet gpkt;
struct sid sid;
int num_files;
Reset flags for 'fatal' so that it will return to 'main'
rather than exiting.
*/
- Fflags =& ~FTLEXIT;
- Fflags =| FTLJMP;
+ Fflags &= ~FTLEXIT;
+ Fflags |= FTLJMP;
/*
Invoke 'snull' for each file argument.
if (reldiff < 0)
fatal("file has invalid trunk delta (sn1)");
- currel =+ reldiff; /* update currel */
+ currel += reldiff; /* update currel */
/*
Find pointer to ancestor delta.
reldiff--;
while (ptrtemp) {
if (ptrtemp->ds_ser >= serhold)
- ptrtemp->ds_ser =+ reldiff;
+ ptrtemp->ds_ser += reldiff;
if (ptrtemp->ds_pred >= serhold)
- ptrtemp->ds_pred =+ reldiff;
+ ptrtemp->ds_pred += reldiff;
ptrtemp = ptrtemp->ds_youngerdel;
}
char *pred;
} del;
-SCCSID(@(#)val.c 4.2);
+static char Sccsid[] = "@(#)val.c 4.3 %G%";
/* This is the main program that determines whether the command line
* comes from the standard input or read off the original command
if (line[0] != '\n') {
repl (line,'\n','\0');
process(line);
- ret_code =| inline_err;
+ ret_code |= inline_err;
}
}
}
testklt = 1;
NONBLANK(p_line);
if (*p_line == '-') {
- p_line =+ 1;
+ p_line += 1;
c = *p_line;
p_line++;
switch (c) {
p_line = getval(p_line,name);
break;
default:
- inline_err =| UNKDUP_ERR;
+ inline_err |= UNKDUP_ERR;
}
/*
use 'had' array and determine if the keyletter
was given twice.
*/
if (had[c - 'a']++ && testklt++)
- inline_err =| UNKDUP_ERR;
+ inline_err |= UNKDUP_ERR;
}
else {
/*
check if any files were named as arguments
*/
if (num_files == 0)
- inline_err =| FILARG_ERR;
+ inline_err |= FILARG_ERR;
/*
check for error in command line.
*/
*/
sprintf(path,"%s",filelist[j]);
validate(path,sid,type,name);
- inline_err =| infile_err;
+ inline_err |= infile_err;
/*
check for error from 'validate' and call 'report'
depending on 'silent' flag.
infile_err = goods = goodt = goodn = hadmflag = 0;
sinit(&gpkt,c_path);
if (!sccsfile(c_path) || (gpkt.p_iop = fopen(c_path,"r")) == NULL)
- infile_err =| FILENAM_ERR;
+ infile_err |= FILENAM_ERR;
else {
l = get_line(&gpkt); /* read first line in file */
/*
check that it is header line.
*/
if (*l++ != CTLCHAR || *l++ != HEAD)
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
else {
/*
check for invalid or ambiguous SID.
*/
if (invalid(c_sid))
- infile_err =| INVALSID_ERR;
+ infile_err |= INVALSID_ERR;
/*
read delta table checking for errors and/or
SID.
*/
if (do_delt(&gpkt,goods,c_sid)) {
fclose(gpkt.p_iop);
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
return;
}
NONBLANK(l);
repl(l,'\n','\0');
if (*l == TYPEFLAG) {
- l =+ 2;
+ l += 2;
if (equal(c_type,l))
goodt++;
}
else if (*l == MODFLAG) {
hadmflag++;
- l =+ 2;
+ l += 2;
if (equal(c_name,l))
goodn++;
}
}
if (*(--l) != BUSERTXT) {
fclose(gpkt.p_iop);
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
return;
}
/*
check if 'y' flag matched '-y' arg value.
*/
if (!goodt && HADY)
- infile_err =| TYPE_ERR;
+ infile_err |= TYPE_ERR;
/*
check if 'm' flag matched '-m' arg value.
*/
if (HADM && !hadmflag) {
if (!equal(auxf(sname(c_path),'g'),c_name))
- infile_err =| NAME_ERR;
+ infile_err |= NAME_ERR;
}
else if (HADM && hadmflag && !goodn)
- infile_err =| NAME_ERR;
+ infile_err |= NAME_ERR;
}
else read_to(BUSERTXT,&gpkt);
read_to(EUSERTXT,&gpkt);
if ((n = fgets(pkt->p_line,sizeof(pkt->p_line),pkt->p_iop)) != NULL) {
pkt->p_slnno++;
for (p = pkt->p_line; *p; )
- pkt->p_chash =+ *p++;
+ pkt->p_chash += *p++;
}
else {
if (!pkt->p_chkeof)
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
if (pkt->do_chksum && (pkt->p_chash ^ pkt->p_ihash)&0xFFFF)
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
}
return(n);
}
continue;
else {
if (!((iord = *p++) == INS || iord == DEL || iord == END)) {
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
return(0);
}
NONBLANK(p);
}
}
if (pkt->p_q)
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
return(0);
}
if (cur->q_sernum <= ser)
break;
if (cur->q_sernum == ser)
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
prev->q_next = q = alloc(sizeof(*q));
q->q_next = cur;
q->q_sernum = ser;
setkeep(pkt);
}
else
- infile_err =| CORRUPT_ERR;
+ infile_err |= CORRUPT_ERR;
}
if (pkt->p_line[1] != BUSERNAM)
return(1);
if (HADR && !goods && !(infile_err & INVALSID_ERR))
- infile_err =| NONEXSID_ERR;
+ infile_err |= NONEXSID_ERR;
return(0);
}