=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/error/Attic/touch.c,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** src/usr.bin/error/Attic/touch.c 1996/06/26 05:32:46 1.3 --- src/usr.bin/error/Attic/touch.c 1996/09/16 01:47:06 1.4 *************** *** 1,4 **** ! /* $OpenBSD: touch.c,v 1.3 1996/06/26 05:32:46 deraadt Exp $ */ /* $NetBSD: touch.c,v 1.3 1995/09/02 06:15:54 jtc Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: touch.c,v 1.4 1996/09/16 01:47:06 deraadt Exp $ */ /* $NetBSD: touch.c,v 1.3 1995/09/02 06:15:54 jtc Exp $ */ /* *************** *** 38,44 **** #if 0 static char sccsid[] = "@(#)touch.c 8.1 (Berkeley) 6/6/93"; #endif ! static char rcsid[] = "$OpenBSD: touch.c,v 1.3 1996/06/26 05:32:46 deraadt Exp $"; #endif /* not lint */ #include --- 38,44 ---- #if 0 static char sccsid[] = "@(#)touch.c 8.1 (Berkeley) 6/6/93"; #endif ! static char rcsid[] = "$OpenBSD: touch.c,v 1.4 1996/09/16 01:47:06 deraadt Exp $"; #endif /* not lint */ #include *************** *** 521,527 **** FILE *n_touchedfile; /* the new file */ char *o_name; char n_name[64]; - char *canon_name = _PATH_TMP; int o_lineno; int n_lineno; boolean tempfileopen = FALSE; --- 521,526 ---- *************** *** 540,546 **** processname, name); return(TRUE); } ! (void)strcpy(n_name, canon_name); if ((fd = mkstemp(n_name)) == -1 || (n_touchedfile = fdopen(fd, "w")) == NULL) { if (fd != -1) --- 539,545 ---- processname, name); return(TRUE); } ! snprintf(n_name, sizeof n_name, "%s/error.XXXXXXXX", _PATH_TMP); if ((fd = mkstemp(n_name)) == -1 || (n_touchedfile = fdopen(fd, "w")) == NULL) { if (fd != -1) *************** *** 639,646 **** fclose(tmpfile); } if (oktorm == 0){ ! fprintf(stderr, "%s: Catastrophe: A copy of \"%s\": was saved in \"%s\"\n", ! processname, o_name, n_name); exit(1); } /* --- 638,646 ---- fclose(tmpfile); } if (oktorm == 0){ ! fprintf(stderr, ! "%s: Catastrophe: A copy of \"%s\": was saved in \"%s\"\n", ! processname, o_name, n_name); exit(1); } /*