[BACK]Return to fmt.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / fmt

Diff for /src/usr.bin/fmt/fmt.c between version 1.21 and 1.22

version 1.21, 2004/04/01 23:14:19 version 1.22, 2004/06/29 16:59:46
Line 359 
Line 359 
         FILE *f;          FILE *f;
   
         if ((f = fopen(name, "r")) == NULL) {          if ((f = fopen(name, "r")) == NULL) {
                 perror(name);                  warn(name);
                 ++n_errors;                  ++n_errors;
         } else {          } else {
                 process_stream(f, name);                  process_stream(f, name);
Line 468 
Line 468 
   
         new_paragraph(output_in_paragraph ? last_indent : first_indent, 0);          new_paragraph(output_in_paragraph ? last_indent : first_indent, 0);
         if (ferror(stream)) {          if (ferror(stream)) {
                 perror(name);                  warn(name);
                 ++n_errors;                  ++n_errors;
         }          }
 }  }
Line 633 
Line 633 
         }          }
   
         if (ferror(stream)) {          if (ferror(stream)) {
                 perror(name);                  warn(name);
                 ++n_errors;                  ++n_errors;
         }          }
 }  }
Line 708 
Line 708 
 void  void
 usage(void)  usage(void)
 {  {
           extern char *__progname;
   
         fprintf(stderr,          fprintf(stderr,
                 "Usage:   fmt [-cmps] [-d chars] [-l num] [-t num]\n"                  "Usage:   %s [-cmps] [-d chars] [-l num] [-t num]\n"
                 "             [-w width | -width | goal [maximum]] [file ...]\n"                  "             [-w width | -width | goal [maximum]] [file ...]\n"
                 "Options: -c     center each line instead of formatting\n"                  "Options: -c     center each line instead of formatting\n"
                 "         -d <chars> double-space after <chars> at line end\n"                  "         -d <chars> double-space after <chars> at line end\n"
Line 721 
Line 722 
                 "         -s     coalesce whitespace inside lines\n"                  "         -s     coalesce whitespace inside lines\n"
                 "         -t <n> have tabs every <n> columns\n"                  "         -t <n> have tabs every <n> columns\n"
                 "         -w <n> set maximum width to <n>\n"                  "         -w <n> set maximum width to <n>\n"
                 "         goal   set target width to goal\n");                  "         goal   set target width to goal\n", __progname);
         exit (0);          exit (1);
 }  }
   

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22