Subject: Mail int vs. long bugs, wasted D space, lint errors Index: ucb/Mail 2.11BSD Description: Mail had a couple lingering "long" vs. "int" problems. Repeat-By: Use ~r to incorporate a file greater than 32kb in size. Observe the line/character count display a negative number for the character count. Fix: What started out as a simple "long/int" fix turned into a larger cleanup story. Apparently Mail has not been subjected to the scrutiny of "lint" ('lint' has been ported from 4.3BSD to 2.11BSD and will be posted shortly), there were routines declared but never used, argument count mismatches, etc. In addition to those problems the silly practice of including static SCCS strings was wasting over 1kb of D space. cd /usr/src/ucb/Mail and use 'patch' using the following diffs. ------------------------------------------------------------------------ *** aux.c.old Tue Feb 17 01:07:15 1987 --- aux.c Sat Aug 17 15:35:25 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)aux.c 5.4 (Berkeley) 1/13/86"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)aux.c 5.4 (Berkeley) 1/13/86"; #endif not lint *************** *** 40,61 **** } /* - * Copy the name from the passed header line into the passed - * name buffer. Null pad the name buffer. - */ - - copyname(linebuf, nbuf) - char *linebuf, *nbuf; - { - register char *cp, *cp2; - - for (cp = linebuf + 5, cp2 = nbuf; *cp != ' ' && cp2-nbuf < 8; cp++) - *cp2++ = *cp; - while (cp2-nbuf < 8) - *cp2++ = 0; - } - - /* * Announce a fatal error and die. */ --- 40,45 ---- *************** *** 69,87 **** } /* - * Catch stdio errors and report them more nicely. - */ - - _error(str) - char *str; - { - prs("Stdio Error: "); - prs(str); - prs("\n"); - abort(); - } - - /* * Print a string on diagnostic output. */ --- 53,58 ---- *************** *** 213,219 **** --- 184,192 ---- register int rem; { char line2[LINESIZE]; + #ifdef CANTELL long loc; + #endif register char *cp, *cp2; register int c; *************** *** 412,432 **** } /* - * Source a file, but do nothing if the file cannot be opened. - */ - - source1(name) - char name[]; - { - register int f; - - if ((f = open(name, 0)) < 0) - return(0); - close(f); - source(name); - } - - /* * Pop the current input back to the previous level. * Update the "sourcing" flag as appropriate. */ --- 385,390 ---- *************** *** 739,759 **** if (c == *cp) cp2 = cp; return(cp2); - } - - /* - * See if the string is a number. - */ - - numeric(str) - char str[]; - { - register char *cp = str; - - while (*cp) - if (!isdigit(*cp++)) - return(0); - return(1); } /* --- 697,702 ---- *** cmd1.c.old Tue Feb 17 01:07:16 1987 --- cmd1.c Sat Aug 17 14:30:21 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)cmd1.c 5.3 (Berkeley) 9/15/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)cmd1.c 5.3 (Berkeley) 9/15/85"; #endif not lint *************** *** 325,333 **** register struct message *mp; register int mesg; register char *cp; ! int c, nlines; int brokpipe(); ! FILE *ibuf, *obuf; obuf = stdout; if (setjmp(pipestop)) { --- 325,333 ---- register struct message *mp; register int mesg; register char *cp; ! int nlines; int brokpipe(); ! FILE *obuf; obuf = stdout; if (setjmp(pipestop)) { *************** *** 487,493 **** */ folders() { ! char dirname[BUFSIZ], cmd[BUFSIZ]; int pid, s, e; if (getfold(dirname) < 0) { --- 487,493 ---- */ folders() { ! char dirname[BUFSIZ]; int pid, s, e; if (getfold(dirname) < 0) { *** cmd2.c.old Tue Feb 17 01:07:16 1987 --- cmd2.c Sat Aug 17 14:30:50 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)cmd2.c 5.3 (Berkeley) 9/10/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)cmd2.c 5.3 (Berkeley) 9/10/85"; #endif not lint *************** *** 195,201 **** register struct message *mp; register char *file, *disp; char linebuf[BUFSIZ]; ! int f, *msgvec, lc, cc, t; FILE *obuf, *mesf; struct stat statb; --- 195,202 ---- register struct message *mp; register char *file, *disp; char linebuf[BUFSIZ]; ! int f, *msgvec, lc, t; ! long cc; FILE *obuf, *mesf; struct stat statb; *************** *** 248,254 **** if (ferror(obuf)) perror(file); fclose(obuf); ! printf("%s %d/%d\n", disp, lc, cc); return(0); } --- 249,255 ---- if (ferror(obuf)) perror(file); fclose(obuf); ! printf("%s %d/%ld\n", disp, lc, cc); return(0); } *************** *** 423,428 **** --- 424,430 ---- printf(" -- Core dumped\n"); else printf("\n"); + return(0); } /* *** cmd3.c.old Tue Feb 17 01:07:16 1987 --- cmd3.c Sat Aug 17 14:58:22 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)cmd3.c 5.3 (Berkeley) 9/15/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)cmd3.c 5.3 (Berkeley) 9/15/85"; #endif not lint *************** *** 61,68 **** * Fork an interactive shell. */ ! dosh(str) ! char *str; { int (*sig[2])(), stat[1]; register int t; --- 61,67 ---- * Fork an interactive shell. */ ! dosh() { int (*sig[2])(), stat[1]; register int t; *************** *** 205,211 **** int *msgvec; { struct message *mp; ! char *cp, *cp2, *cp3, *rcv, *replyto; char buf[2 * LINESIZE], **ap; struct name *np; struct header head; --- 204,210 ---- int *msgvec; { struct message *mp; ! char *cp, *rcv, *replyto; char buf[2 * LINESIZE], **ap; struct name *np; struct header head; *************** *** 375,380 **** --- 374,380 ---- if (Tflag != NOSTR) close(creat(Tflag, 0600)); exit(e); + /* NOTREACHED */ } /* *************** *** 433,441 **** char **arglist; { register struct var *vp, *vp2; - register char *cp; int errs, h; ! char **ap; errs = 0; for (ap = arglist; *ap != NOSTR; ap++) { --- 433,440 ---- char **arglist; { register struct var *vp, *vp2; int errs, h; ! register char **ap; errs = 0; for (ap = arglist; *ap != NOSTR; ap++) { *************** *** 553,559 **** * The do nothing command for comments. */ ! null(e) { return(0); } --- 552,558 ---- * The do nothing command for comments. */ ! null() { return(0); } *************** *** 568,574 **** char **argv; { register char *cp; - char fname[BUFSIZ]; int edit; if (argv[0] == NOSTR) { --- 567,572 ---- *************** *** 594,599 **** --- 592,598 ---- return(-1); } announce(0); + return(0); } /* *************** *** 707,713 **** { struct header head; struct message *mp; ! register int i, s, *ap; register char *cp, *cp2, *subject; for (s = 0, ap = msgvec; *ap != 0; ap++) { --- 706,712 ---- { struct header head; struct message *mp; ! register int s, *ap; register char *cp, *cp2, *subject; for (s = 0, ap = msgvec; *ap != 0; ap++) { *** cmdtab.c.old Tue Feb 17 01:07:16 1987 --- cmdtab.c Sat Aug 17 15:03:41 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)cmdtab.c 5.3 (Berkeley) 9/15/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)cmdtab.c 5.3 (Berkeley) 9/15/85"; #endif not lint *************** *** 17,23 **** */ extern int type(), preserve(), delete(), undelete(), next(), shell(), schdir(); ! extern int save(), help(), headers(), pdot(), strace(), respond(), editor(); extern int edstop(), rexit(), pcmdlist(), sendmail(), from(), copycmd(); extern int messize(), psalloc(), deltype(), unset(), set(), source(); extern int pversion(), group(), top(), core(), null(), stouch(), visual(); --- 17,23 ---- */ extern int type(), preserve(), delete(), undelete(), next(), shell(), schdir(); ! extern int save(), help(), headers(), pdot(), respond(), editor(); extern int edstop(), rexit(), pcmdlist(), sendmail(), from(), copycmd(); extern int messize(), psalloc(), deltype(), unset(), set(), source(); extern int pversion(), group(), top(), core(), null(), stouch(), visual(); *** collect.c.old Wed Mar 11 12:53:50 1987 --- collect.c Sat Aug 17 15:07:34 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)collect.c 5.2 (Berkeley) 6/21/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)collect.c 5.2 (Berkeley) 6/21/85"; #endif not lint *************** *** 48,54 **** struct header *hp; { FILE *ibuf, *fbuf, *obuf; ! int lc, cc, escape, collrub(), intack(), collhup, collcont(), eof; register int c, t; char linebuf[LINESIZE], *cp; extern char tempMail[]; --- 48,55 ---- struct header *hp; { FILE *ibuf, *fbuf, *obuf; ! int lc, escape, collrub(), intack(), collcont(), eof; ! long cc; register int c, t; char linebuf[LINESIZE], *cp; extern char tempMail[]; *************** *** 298,304 **** cc += t; } fclose(fbuf); ! printf("%d/%d\n", lc, cc); break; case 'w': --- 299,305 ---- cc += t; } fclose(fbuf); ! printf("%d/%ld\n", lc, cc); break; case 'w': *************** *** 430,448 **** } /* - * Non destructively interrogate the value of the given signal. - */ - - psig(n) - { - register (*wassig)(); - - wassig = sigset(n, SIG_IGN); - sigset(n, wassig); - return((int) wassig); - } - - /* * Write a file, ex-like if f set. */ --- 431,436 ---- *************** *** 773,779 **** /* * Print (continue) when continued after ^Z. */ ! collcont(s) { printf("(continue)\n"); --- 761,767 ---- /* * Print (continue) when continued after ^Z. */ ! collcont() { printf("(continue)\n"); *************** *** 833,839 **** # endif VMUNIX if (rcvmode) { if (s == SIGHUP) ! hangup(SIGHUP); else stop(s); } --- 821,827 ---- # endif VMUNIX if (rcvmode) { if (s == SIGHUP) ! hangup(); else stop(s); } *************** *** 845,851 **** * Acknowledge an interrupt signal from the tty by typing an @ */ ! intack(s) { puts("@"); --- 833,839 ---- * Acknowledge an interrupt signal from the tty by typing an @ */ ! intack() { puts("@"); *** config.c.old Tue Feb 17 01:07:16 1987 --- config.c Sat Aug 17 13:52:46 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)config.c 5.2 (Berkeley) 6/21/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)config.c 5.2 (Berkeley) 6/21/85"; #endif not lint *** def.h.old Tue Feb 17 01:07:17 1987 --- def.h Sat Aug 17 15:05:23 1991 *************** *** 328,331 **** struct var *lookup(); long transmit(); int icequal(); - int cmpdomain(); --- 328,330 ---- *** edit.c.old Thu Nov 2 13:12:41 1989 --- edit.c Sat Aug 17 13:53:20 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)edit.c 5.2 (Berkeley) 6/21/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)edit.c 5.2 (Berkeley) 6/21/85"; #endif not lint *** fio.c.old Wed Mar 11 12:59:43 1987 --- fio.c Sat Aug 17 14:42:15 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)fio.c 5.3 (Berkeley) 9/5/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)fio.c 5.3 (Berkeley) 9/5/85"; #endif not lint *************** *** 26,38 **** setptr(ibuf) FILE *ibuf; { ! register int c; ! register char *cp, *cp2; register int count, l; long s; off_t offset; char linebuf[LINESIZE]; - char wbuf[LINESIZE]; int maybe, mestmp, flag, inhead; struct message this; extern char tempSet[]; --- 26,36 ---- setptr(ibuf) FILE *ibuf; { ! register char *cp; register int count, l; long s; off_t offset; char linebuf[LINESIZE]; int maybe, mestmp, flag, inhead; struct message this; extern char tempSet[]; *************** *** 247,253 **** FILE *obuf, *ibuf, *readstat; struct stat statb; char tempname[30], *id; - int (*sigs[3])(); if (readonly) return; --- 245,250 ---- *************** *** 352,358 **** */ holdsigs() { - register int i; if (sigdepth++ == 0) omask = sigblock(sigmask(SIGHUP)|sigmask(SIGINT)|sigmask(SIGQUIT)); --- 349,354 ---- *************** *** 363,369 **** */ relsesigs() { - register int i; if (--sigdepth == 0) sigsetmask(omask); --- 359,364 ---- *************** *** 423,431 **** { char xname[BUFSIZ]; char cmdbuf[BUFSIZ]; ! register int pid, l, rc; register char *cp, *Shell; ! int s, pivec[2], (*sigint)(); struct stat sbuf; if (name[0] == '+' && getfold(cmdbuf) >= 0) { --- 418,426 ---- { char xname[BUFSIZ]; char cmdbuf[BUFSIZ]; ! register int pid, l; register char *cp, *Shell; ! int s, pivec[2]; struct stat sbuf; if (name[0] == '+' && getfold(cmdbuf) >= 0) { *** fmt.c.old Tue Feb 17 01:07:17 1987 --- fmt.c Sat Aug 17 13:54:55 1991 *************** *** 4,16 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint char *copyright = "@(#) Copyright (c) 1980 Regents of the University of California.\n\ All rights reserved.\n"; - #endif not lint - #ifndef lint static char *sccsid = "@(#)fmt.c 5.2 (Berkeley) 6/21/85"; #endif not lint --- 4,14 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) char *copyright = "@(#) Copyright (c) 1980 Regents of the University of California.\n\ All rights reserved.\n"; static char *sccsid = "@(#)fmt.c 5.2 (Berkeley) 6/21/85"; #endif not lint *** getname.c.old Tue Feb 17 01:07:17 1987 --- getname.c Sat Aug 17 13:55:20 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)getname.c 5.2 (Berkeley) 6/21/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)getname.c 5.2 (Berkeley) 6/21/85"; #endif not lint *** glob.h.old Tue Feb 17 01:07:17 1987 --- glob.h Sat Aug 17 15:04:27 1991 *************** *** 27,33 **** int noreset; /* String resets suspended */ int sourcing; /* Currently reading variant file */ int loading; /* Loading user definitions */ - int shudann; /* Print headers when possible */ int cond; /* Current state of conditional exc. */ FILE *itf; /* Input temp file buffer */ FILE *otf; /* Output temp file buffer */ --- 27,32 ---- *** head.c.old Tue Feb 17 01:07:17 1987 --- head.c Sat Aug 17 15:02:58 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)head.c 5.2 (Berkeley) 6/21/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)head.c 5.2 (Berkeley) 6/21/85"; #endif not lint *************** *** 242,259 **** if (*cp == '\0') return(NOSTR); return(cp); - } - - /* - * Test to see if the character is an ascii alphabetic. - */ - - isalpha(c) - { - register int ch; - - ch = raise(c); - return(ch >= 'A' && ch <= 'Z'); } /* --- 242,247 ---- *** lex.c.old Sun Feb 22 17:28:23 1987 --- lex.c Sat Aug 17 15:28:58 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)lex.c 5.4 (Berkeley) 11/2/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)lex.c 5.4 (Berkeley) 11/2/85"; #endif not lint *************** *** 440,446 **** /* * When we wake up after ^Z, reprint the prompt. */ ! contin(s) { printf(prompt); --- 440,446 ---- /* * When we wake up after ^Z, reprint the prompt. */ ! contin() { printf(prompt); *************** *** 553,561 **** } } stop(s) { - register FILE *fp; # ifndef VMUNIX s = SIGINT; --- 553,561 ---- } } + /* ARGSUSED */ stop(s) { # ifndef VMUNIX s = SIGINT; *************** *** 672,684 **** return(mdot); } - strace() {} - /* * Print the current version number. */ ! pversion(e) { printf("Version %s\n", version); return(0); --- 672,682 ---- return(mdot); } /* * Print the current version number. */ ! pversion() { printf("Version %s\n", version); return(0); *** list.c.old Tue Feb 17 01:07:18 1987 --- list.c Sat Aug 17 13:57:07 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)list.c 5.4 (Berkeley) 11/2/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)list.c 5.4 (Berkeley) 11/2/85"; #endif not lint *** main.c.old Tue Feb 17 01:07:18 1987 --- main.c Sat Aug 17 14:44:45 1991 *************** *** 4,16 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint char *copyright = "@(#) Copyright (c) 1980 Regents of the University of California.\n\ All rights reserved.\n"; - #endif not lint - #ifndef lint static char *sccsid = "@(#)main.c 5.3 (Berkeley) 9/15/85"; #endif not lint --- 4,14 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) char *copyright = "@(#) Copyright (c) 1980 Regents of the University of California.\n\ All rights reserved.\n"; static char *sccsid = "@(#)main.c 5.3 (Berkeley) 9/15/85"; #endif not lint *************** *** 41,48 **** { register char *ef; register int i, argp; ! int mustsend, uflag, hdrstop(), (*prevint)(), f; ! FILE *ibuf, *ftat; struct sgttyb tbuf; #ifdef signal --- 39,45 ---- { register char *ef; register int i, argp; ! int mustsend, hdrstop(), (*prevint)(), f; struct sgttyb tbuf; #ifdef signal *************** *** 56,62 **** * all the temporary files, buffer standard output, and so forth. */ - uflag = 0; argv[argc] = (char *) -1; #ifdef GETHOST inithost(); --- 53,58 ---- *************** *** 134,140 **** /* * Next argument is person to pretend to be. */ - uflag++; if (i >= argc - 1) { fprintf(stderr, "Missing user name for -u\n"); exit(1); --- 130,135 ---- *** names.c.old Tue Feb 17 01:07:18 1987 --- names.c Sat Aug 17 15:06:20 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)names.c 5.3 (Berkeley) 11/10/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)names.c 5.3 (Berkeley) 11/10/85"; #endif not lint *************** *** 194,201 **** verify(names) struct name *names; { register struct name *np, *top, *t, *x; ! register char *cp; #ifdef SENDMAIL return(names); --- 194,202 ---- verify(names) struct name *names; { + #ifndef SENDMAIL register struct name *np, *top, *t, *x; ! #endif #ifdef SENDMAIL return(names); *************** *** 258,268 **** struct header *hp; { register int c; ! register struct name *np, *top, *t, *x; long now; char *date, *fname, *shell, *ctime(); FILE *fout, *fin; ! int ispipe, s, pid; extern char tempEdit[]; top = names; --- 259,272 ---- struct header *hp; { register int c; ! register struct name *np, *top; ! #ifdef CRAZYWOW ! struct name *t, *x; ! #endif long now; char *date, *fname, *shell, *ctime(); FILE *fout, *fin; ! int ispipe, s; extern char tempEdit[]; top = names; *************** *** 321,327 **** if (ispipe) { wait(&s); ! switch (pid = fork()) { case 0: sigchild(); sigsys(SIGHUP, SIG_IGN); --- 325,331 ---- if (ispipe) { wait(&s); ! switch (fork()) { case 0: sigchild(); sigsys(SIGHUP, SIG_IGN); *************** *** 437,449 **** struct name *names; { register struct name *new, *np, *cp; - struct name *getto; struct grouphead *gh; register int metoo; new = NIL; np = names; - getto = NIL; metoo = (value("metoo") != NOSTR); while (np != NIL) { if (np->n_name[0] == '\\') { --- 441,451 ---- *************** *** 790,805 **** return(c); } - cmpdomain(name, dname) - register char *name, *dname; - { - char buf[BUFSIZ]; - - strcpy(buf, dname); - buf[strlen(name)] = '\0'; - return(icequal(name, buf)); - } - /* * Delete the given name from a namelist, using the passed * function to compare the names. --- 792,797 ---- *************** *** 844,865 **** for (p = np; p != NIL; p = p->n_flink) p->n_name = netmap(p->n_name, from); - } - - /* - * Pretty print a name list - * Uncomment it if you need it. - */ - - prettyprint(name) - struct name *name; - { - register struct name *np; - - np = name; - while (np != NIL) { - fprintf(stderr, "%s(%d) ", np->n_name, np->n_type); - np = np->n_flink; - } - fprintf(stderr, "\n"); } --- 836,839 ---- *** optim.c.old Sun Feb 22 18:21:31 1987 --- optim.c Sat Aug 17 15:00:47 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)optim.c 5.5 (Berkeley) 11/2/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)optim.c 5.5 (Berkeley) 11/2/85"; #endif not lint *************** *** 273,279 **** minit() { register struct xtrahash *xp, **tp; - register int i; midfree = 0; tp = &xtab[0]; --- 273,278 ---- *************** *** 473,479 **** printf("Made up bad net name\n"); printf("Machine code %c (0%o)\n", cp[-1], cp[-1]); printf("Sorry -- dumping now. Alert K. Shoens\n"); ! core(0); goto err; } strcat(name, cp2); --- 472,478 ---- printf("Made up bad net name\n"); printf("Machine code %c (0%o)\n", cp[-1], cp[-1]); printf("Sorry -- dumping now. Alert K. Shoens\n"); ! core(); goto err; } strcat(name, cp2); *** popen.c.old Wed Mar 11 13:01:42 1987 --- popen.c Sat Aug 17 13:59:27 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)popen.c 5.2 (Berkeley) 6/21/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)popen.c 5.2 (Berkeley) 6/21/85"; #endif not lint *** quit.c.old Tue Feb 17 01:07:19 1987 --- quit.c Sat Aug 17 14:00:05 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)quit.c 5.3 (Berkeley) 3/6/86"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)quit.c 5.3 (Berkeley) 3/6/86"; #endif not lint *** send.c.old Sun Feb 22 18:23:52 1987 --- send.c Sat Aug 17 14:53:16 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)send.c 5.2 (Berkeley) 6/21/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)send.c 5.2 (Berkeley) 6/21/85"; #endif not lint *************** *** 32,43 **** FILE *obuf; { register struct message *mp; - register int t; long c; FILE *ibuf; char line[LINESIZE], field[BUFSIZ]; int lc, ishead, infld, fline, dostat; ! char *cp, *cp2; mp = mailp; ibuf = setinput(mp); --- 32,42 ---- FILE *obuf; { register struct message *mp; long c; FILE *ibuf; char line[LINESIZE], field[BUFSIZ]; int lc, ishead, infld, fline, dostat; ! register char *cp, *cp2; mp = mailp; ibuf = setinput(mp); *************** *** 217,225 **** sendmail(str) char *str; { - register char **ap; - char *bufp; - register int t; struct header head; if (blankline(str)) --- 216,221 ---- *************** *** 330,336 **** printf(" \"%s\"", *t); printf("\n"); fflush(stdout); ! return; } if ((cp = value("record")) != NOSTR) savemail(expand(cp), hp, mtf); --- 326,332 ---- printf(" \"%s\"", *t); printf("\n"); fflush(stdout); ! return(0); } if ((cp = value("record")) != NOSTR) savemail(expand(cp), hp, mtf); *************** *** 372,378 **** sigset(i, SIG_IGN); if (!stat(POSTAGE, &sbuf)) if ((postage = fopen(POSTAGE, "a")) != NULL) { ! fprintf(postage, "%s %d %d\n", myname, count(to), fsize(mtf)); fclose(postage); } --- 368,374 ---- sigset(i, SIG_IGN); if (!stat(POSTAGE, &sbuf)) if ((postage = fopen(POSTAGE, "a")) != NULL) { ! fprintf(postage, "%s %d %ld\n", myname, count(to), fsize(mtf)); fclose(postage); } *************** *** 419,425 **** struct header *hp; struct name *tolist; { - register struct name *nlist; register int f; register struct name *np; --- 415,420 ---- *************** *** 556,561 **** --- 551,557 ---- * Save the outgoing mail on the passed file. */ + /* ARGSUSED */ savemail(name, hp, fi) char name[]; struct header *hp; *** sigretro.c.old Tue Feb 17 01:07:19 1987 --- sigretro.c Sat Aug 17 14:06:08 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)sigretro.c 5.2 (Berkeley) 6/21/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)sigretro.c 5.2 (Berkeley) 6/21/85"; #endif not lint *** strings.c.old Tue Feb 17 01:07:19 1987 --- strings.c Sat Aug 17 14:06:40 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)strings.c 5.2 (Berkeley) 6/21/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)strings.c 5.2 (Berkeley) 6/21/85"; #endif not lint *** temp.c.old Tue Feb 17 01:07:19 1987 --- temp.c Sat Aug 17 14:53:53 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)temp.c 5.2 (Berkeley) 6/21/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)temp.c 5.2 (Berkeley) 6/21/85"; #endif not lint *************** *** 25,33 **** tinit() { ! register char *cp, *cp2; char uname[PATHSIZE]; - register int err = 0; register int pid; pid = getpid(); --- 25,32 ---- tinit() { ! register char *cp; char uname[PATHSIZE]; register int pid; pid = getpid(); *************** *** 50,56 **** uid = getuid() & UIDMASK; if (username(uid, uname) < 0) { copy("ubluit", myname); - err++; if (rcvmode) { printf("Who are you!?\n"); exit(1); --- 49,54 ---- *** v7.local.c.old Tue Feb 17 01:07:20 1987 --- v7.local.c Sat Aug 17 14:07:55 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)v7.local.c 5.2 (Berkeley) 6/21/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)v7.local.c 5.2 (Berkeley) 6/21/85"; #endif not lint *** vars.c.old Tue Feb 17 01:07:20 1987 --- vars.c Sat Aug 17 14:56:13 1991 *************** *** 4,10 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)vars.c 5.2 (Berkeley) 6/21/85"; #endif not lint --- 4,10 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)vars.c 5.2 (Berkeley) 6/21/85"; #endif not lint *************** *** 155,161 **** hash(name) char name[]; { ! register unsigned h; register char *cp; for (cp = name, h = 0; *cp; h = (h << 2) + *cp++) --- 155,161 ---- hash(name) char name[]; { ! register int h; register char *cp; for (cp = name, h = 0; *cp; h = (h << 2) + *cp++) *** version.c.old Tue Feb 17 01:07:20 1987 --- version.c Sat Aug 17 14:57:36 1991 *************** *** 4,12 **** * specifies the terms and conditions for redistribution. */ ! #ifndef lint static char *sccsid = "@(#)version.c 5.2 (Berkeley) 6/21/85"; - #endif not lint /* * Just keep track of the date/sid of this version of Mail. --- 4,11 ---- * specifies the terms and conditions for redistribution. */ ! #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)version.c 5.2 (Berkeley) 6/21/85"; /* * Just keep track of the date/sid of this version of Mail. *************** *** 13,16 **** --- 12,16 ---- * Load this file first to get a "total" Mail version. */ static char *SccsID = "@(#)UCB Mail Version 5.2 (6/21/85)"; + #endif not lint char *version = "5.2 6/21/85";