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

Diff for /src/usr.bin/uniq/uniq.c between version 1.24 and 1.25

version 1.24, 2015/12/19 10:21:01 version 1.25, 2017/12/21 10:05:59
Line 47 
Line 47 
   
 #define MAXLINELEN      (8 * 1024)  #define MAXLINELEN      (8 * 1024)
   
 int cflag, dflag, uflag;  int cflag, dflag, iflag, uflag;
 int numchars, numfields, repeats;  int numchars, numfields, repeats;
   
 FILE    *file(char *, char *);  FILE    *file(char *, char *);
Line 70 
Line 70 
                 err(1, "pledge");                  err(1, "pledge");
   
         obsolete(argv);          obsolete(argv);
         while ((ch = getopt(argc, argv, "cdf:s:u")) != -1) {          while ((ch = getopt(argc, argv, "cdf:is:u")) != -1) {
                 const char *errstr;                  const char *errstr;
   
                 switch (ch) {                  switch (ch) {
Line 87 
Line 87 
                                 errx(1, "field skip value is %s: %s",                                  errx(1, "field skip value is %s: %s",
                                     errstr, optarg);                                      errstr, optarg);
                         break;                          break;
                   case 'i':
                           iflag = 1;
                           break;
                 case 's':                  case 's':
                         numchars = (int)strtonum(optarg, 0, INT_MAX,                          numchars = (int)strtonum(optarg, 0, INT_MAX,
                             &errstr);                              &errstr);
Line 149 
Line 152 
                 }                  }
   
                 /* If different, print; set previous to new value. */                  /* If different, print; set previous to new value. */
                 if (strcmp(t1, t2)) {                  if ((!iflag && strcmp(t1, t2)) || strcasecmp(t1, t2)) {
                         show(ofp, prevline);                          show(ofp, prevline);
                         t1 = prevline;                          t1 = prevline;
                         prevline = thisline;                          prevline = thisline;
Line 257 
Line 260 
         extern char *__progname;          extern char *__progname;
   
         (void)fprintf(stderr,          (void)fprintf(stderr,
             "usage: %s [-c] [-d | -u] [-f fields] [-s chars] [input_file [output_file]]\n",              "usage: %s [-ci] [-d | -u] [-f fields] [-s chars] [input_file [output_file]]\n",
             __progname);              __progname);
         exit(1);          exit(1);
 }  }

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25