=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mail/Attic/aux.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** src/usr.bin/mail/Attic/aux.c 1995/10/18 08:45:37 1.1 --- src/usr.bin/mail/Attic/aux.c 1996/06/11 12:53:32 1.2 *************** *** 1,3 **** --- 1,6 ---- + /* $OpenBSD: aux.c,v 1.2 1996/06/11 12:53:32 deraadt Exp $ */ + /* $NetBSD: aux.c,v 1.4 1996/06/08 19:48:10 christos Exp $ */ + /* * Copyright (c) 1980, 1993 * The Regents of the University of California. All rights reserved. *************** *** 32,39 **** */ #ifndef lint ! static char sccsid[] = "from: @(#)aux.c 8.1 (Berkeley) 6/6/93"; ! static char rcsid[] = "$Id: aux.c,v 1.1 1995/10/18 08:45:37 deraadt Exp $"; #endif /* not lint */ #include "rcv.h" --- 35,45 ---- */ #ifndef lint ! #if 0 ! static char sccsid[] = "@(#)aux.c 8.1 (Berkeley) 6/6/93"; ! #else ! static char rcsid[] = "$OpenBSD: aux.c,v 1.2 1996/06/11 12:53:32 deraadt Exp $"; ! #endif #endif /* not lint */ #include "rcv.h" *************** *** 44,49 **** --- 50,56 ---- * * Auxiliary functions. */ + static char *save2str __P((char *, char *)); /* * Return a pointer to a dynamic copy of the argument. *************** *** 63,69 **** /* * Make a copy of new argument incorporating old one. */ ! char * save2str(str, old) char *str, *old; { --- 70,76 ---- /* * Make a copy of new argument incorporating old one. */ ! static char * save2str(str, old) char *str, *old; { *************** *** 180,186 **** while (lc > 0) { if ((lc = gethfield(ibuf, linebuf, lc, &colon)) < 0) return oldhfield; ! if (hfield = ishfield(linebuf, colon, field)) oldhfield = save2str(hfield, oldhfield); } return oldhfield; --- 187,193 ---- while (lc > 0) { if ((lc = gethfield(ibuf, linebuf, lc, &colon)) < 0) return oldhfield; ! if ((hfield = ishfield(linebuf, colon, field)) != NULL) oldhfield = save2str(hfield, oldhfield); } return oldhfield; *************** *** 304,312 **** * that they are no longer reading from a tty (in all probability). */ int ! source(arglist) ! char **arglist; { FILE *fi; char *cp; --- 311,320 ---- * that they are no longer reading from a tty (in all probability). */ int ! source(v) ! void *v; { + char **arglist = v; FILE *fi; char *cp; *************** *** 366,372 **** { struct stat sb; struct timeval tv[2]; - time_t time(); if (stat(name, &sb)) return; --- 374,379 ---- *************** *** 465,471 **** gotlt = 0; lastsp = 0; bufend = nbuf; ! for (cp = name, cp2 = bufend; c = *cp++; ) { switch (c) { case '(': cp = skip_comment(cp); --- 472,478 ---- gotlt = 0; lastsp = 0; bufend = nbuf; ! for (cp = name, cp2 = bufend; (c = *cp++) != '\0'; ) { switch (c) { case '(': cp = skip_comment(cp); *************** *** 477,489 **** * Start of a "quoted-string". * Copy it in its entirety. */ ! while (c = *cp) { cp++; if (c == '"') break; if (c != '\\') *cp2++ = c; ! else if (c = *cp) { *cp2++ = c; cp++; } --- 484,496 ---- * Start of a "quoted-string". * Copy it in its entirety. */ ! while ((c = *cp) != '\0') { cp++; if (c == '"') break; if (c != '\\') *cp2++ = c; ! else if ((c = *cp) != '\0') { *cp2++ = c; cp++; } *************** *** 515,521 **** if (c == '(') cp = skip_comment(cp); else if (c == '"') ! while (c = *cp) { cp++; if (c == '"') break; --- 522,528 ---- if (c == '(') cp = skip_comment(cp); else if (c == '"') ! while ((c = *cp) != '\0') { cp++; if (c == '"') break; *************** *** 663,669 **** register char *s1, *s2; { ! while (*s2++ = *s1++) ; return s2 - 1; } --- 670,676 ---- register char *s1, *s2; { ! while ((*s2++ = *s1++) != '\0') ; return s2 - 1; }