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

Diff for /src/usr.bin/head/head.c between version 1.16 and 1.17

version 1.16, 2013/11/26 13:21:17 version 1.17, 2014/10/07 19:38:57
Line 52 
Line 52 
         int     ch, firsttime;          int     ch, firsttime;
         long    linecnt = 10;          long    linecnt = 10;
         char    *p = NULL;          char    *p = NULL;
           int     status = 0;
   
         /* handle obsolete -number syntax */          /* handle obsolete -number syntax */
         if (argc > 1 && argv[1][0] == '-' &&          if (argc > 1 && argv[1][0] == '-' &&
Line 84 
Line 85 
         for (firsttime = 1; ; firsttime = 0) {          for (firsttime = 1; ; firsttime = 0) {
                 if (!*argv) {                  if (!*argv) {
                         if (!firsttime)                          if (!firsttime)
                                 exit(0);                                  exit(status);
                 } else {                  } else {
                         if (!freopen(*argv, "r", stdin)) {                          if (!freopen(*argv, "r", stdin)) {
                                 warn("%s", *argv++);                                  warn("%s", *argv++);
                                   status = 1;
                                 continue;                                  continue;
                         }                          }
                         if (argc > 1) {                          if (argc > 1) {

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17