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

Diff for /src/usr.bin/column/column.c between version 1.12 and 1.13

version 1.12, 2007/03/20 03:50:39 version 1.13, 2007/05/01 01:26:23
Line 77 
Line 77 
         FILE *fp;          FILE *fp;
         int ch, tflag, xflag;          int ch, tflag, xflag;
         char *p;          char *p;
           const char *errstr;
   
         if (ioctl(1, TIOCGWINSZ, &win) == -1 || !win.ws_col) {          if (ioctl(1, TIOCGWINSZ, &win) == -1 || !win.ws_col) {
                 if ((p = getenv("COLUMNS")))                  if ((p = getenv("COLUMNS")) && *p != '\0') {
                         termwidth = atoi(p);                          termwidth = strtonum(p, 1, INT_MAX, &errstr);
                           if (errstr != NULL)
                                   errx(1, "%s: %s", errstr, p);
                   }
         } else          } else
                 termwidth = win.ws_col;                  termwidth = win.ws_col;
   
Line 88 
Line 92 
         while ((ch = getopt(argc, argv, "c:s:tx")) != -1)          while ((ch = getopt(argc, argv, "c:s:tx")) != -1)
                 switch(ch) {                  switch(ch) {
                 case 'c':                  case 'c':
                         termwidth = atoi(optarg);                          termwidth = strtonum(optarg, 1, INT_MAX, &errstr);
                           if (errstr != NULL)
                                   errx(1, "%s: %s", errstr, optarg);
                         break;                          break;
                 case 's':                  case 's':
                         separator = optarg;                          separator = optarg;

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13