=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/fmt/fmt.c,v retrieving revision 1.21 retrieving revision 1.22 diff -c -r1.21 -r1.22 *** src/usr.bin/fmt/fmt.c 2004/04/01 23:14:19 1.21 --- src/usr.bin/fmt/fmt.c 2004/06/29 16:59:46 1.22 *************** *** 1,4 **** ! /* $OpenBSD: fmt.c,v 1.21 2004/04/01 23:14:19 tedu Exp $ */ /* Sensible version of fmt * --- 1,4 ---- ! /* $OpenBSD: fmt.c,v 1.22 2004/06/29 16:59:46 mickey Exp $ */ /* Sensible version of fmt * *************** *** 170,176 **** #ifndef lint static const char rcsid[] = ! "$OpenBSD: fmt.c,v 1.21 2004/04/01 23:14:19 tedu Exp $"; static const char copyright[] = "Copyright (c) 1997 Gareth McCaughan. All rights reserved.\n"; #endif /* not lint */ --- 170,176 ---- #ifndef lint static const char rcsid[] = ! "$OpenBSD: fmt.c,v 1.22 2004/06/29 16:59:46 mickey Exp $"; static const char copyright[] = "Copyright (c) 1997 Gareth McCaughan. All rights reserved.\n"; #endif /* not lint */ *************** *** 359,365 **** FILE *f; if ((f = fopen(name, "r")) == NULL) { ! perror(name); ++n_errors; } else { process_stream(f, name); --- 359,365 ---- FILE *f; if ((f = fopen(name, "r")) == NULL) { ! warn(name); ++n_errors; } else { process_stream(f, name); *************** *** 468,474 **** new_paragraph(output_in_paragraph ? last_indent : first_indent, 0); if (ferror(stream)) { ! perror(name); ++n_errors; } } --- 468,474 ---- new_paragraph(output_in_paragraph ? last_indent : first_indent, 0); if (ferror(stream)) { ! warn(name); ++n_errors; } } *************** *** 633,639 **** } if (ferror(stream)) { ! perror(name); ++n_errors; } } --- 633,639 ---- } if (ferror(stream)) { ! warn(name); ++n_errors; } } *************** *** 708,716 **** void usage(void) { fprintf(stderr, ! "Usage: fmt [-cmps] [-d chars] [-l num] [-t num]\n" " [-w width | -width | goal [maximum]] [file ...]\n" "Options: -c center each line instead of formatting\n" " -d double-space after at line end\n" --- 708,717 ---- void usage(void) { + extern char *__progname; fprintf(stderr, ! "Usage: %s [-cmps] [-d chars] [-l num] [-t num]\n" " [-w width | -width | goal [maximum]] [file ...]\n" "Options: -c center each line instead of formatting\n" " -d double-space after at line end\n" *************** *** 721,727 **** " -s coalesce whitespace inside lines\n" " -t have tabs every columns\n" " -w set maximum width to \n" ! " goal set target width to goal\n"); ! exit (0); } - --- 722,727 ---- " -s coalesce whitespace inside lines\n" " -t have tabs every columns\n" " -w set maximum width to \n" ! " goal set target width to goal\n", __progname); ! exit (1); }