=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/indent/indent.c,v retrieving revision 1.6 retrieving revision 1.6.4.1 diff -u -r1.6 -r1.6.4.1 --- src/usr.bin/indent/indent.c 1999/05/19 03:17:16 1.6 +++ src/usr.bin/indent/indent.c 2000/10/06 21:16:13 1.6.4.1 @@ -1,4 +1,4 @@ -/* $OpenBSD: indent.c,v 1.6 1999/05/19 03:17:16 alex Exp $ */ +/* $OpenBSD: indent.c,v 1.6.4.1 2000/10/06 21:16:13 jason Exp $ */ /* * Copyright (c) 1985 Sun Microsystems, Inc. @@ -45,7 +45,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)indent.c 5.16 (Berkeley) 2/26/91";*/ -static char rcsid[] = "$OpenBSD: indent.c,v 1.6 1999/05/19 03:17:16 alex Exp $"; +static char rcsid[] = "$OpenBSD: indent.c,v 1.6.4.1 2000/10/06 21:16:13 jason Exp $"; #endif /* not lint */ #include @@ -190,7 +190,7 @@ in_name = argv[i]; /* remember name of input file */ input = fopen(in_name, "r"); if (input == NULL) /* check for open error */ - err(1, in_name); + err(1, "%s", in_name); continue; } else if (output == 0) { /* we have the output file */ @@ -200,7 +200,7 @@ errx(1, "input and output files must be different"); output = fopen(out_name, "w"); if (output == NULL) /* check for create error */ - err(1, out_name); + err(1, "%s", out_name); continue; } errx(1, "unknown parameter: %s", argv[i]); @@ -1155,23 +1155,23 @@ /* copy in_name to backup file */ bakchn = creat(bakfile, 0600); if (bakchn < 0) - err(1, bakfile); + err(1, "%s", bakfile); while ((n = read(fileno(input), buff, sizeof buff)) > 0) if (write(bakchn, buff, n) != n) - err(1, bakfile); + err(1, "%s", bakfile); if (n < 0) - err(1, in_name); + err(1, "%s", in_name); close(bakchn); fclose(input); /* re-open backup file as the input file */ input = fopen(bakfile, "r"); if (input == NULL) - err(1, bakfile); + err(1, "%s", bakfile); /* now the original input file will be the output */ output = fopen(in_name, "w"); if (output == NULL) { unlink(bakfile); - err(1, in_name); + err(1, "%s", in_name); } }