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

Diff for /src/usr.bin/less/optfunc.c between version 1.14 and 1.15

version 1.14, 2016/01/12 23:01:23 version 1.15, 2016/02/03 15:47:27
Line 435 
Line 435 
         extern int tabstops[];          extern int tabstops[];
         extern int ntabstops;          extern int ntabstops;
         extern int tabdefault;          extern int tabdefault;
         char msg[60+(4*TABSTOP_MAX)];          char tabs[60+(4*TABSTOP_MAX)];
         int i;          int i;
         PARG p;          PARG p;
   
Line 460 
Line 460 
                 tabdefault = tabstops[ntabstops-1] - tabstops[ntabstops-2];                  tabdefault = tabstops[ntabstops-1] - tabstops[ntabstops-2];
                 break;                  break;
         case QUERY:          case QUERY:
                 (void) strlcpy(msg, "Tab stops ", sizeof(msg));                  (void) strlcpy(tabs, "Tab stops ", sizeof(tabs));
                 if (ntabstops > 2) {                  if (ntabstops > 2) {
                         for (i = 1;  i < ntabstops;  i++) {                          for (i = 1;  i < ntabstops;  i++) {
                                 if (i > 1)                                  if (i > 1)
                                         strlcat(msg, ",", sizeof(msg));                                          strlcat(tabs, ",", sizeof(tabs));
                                 (void) snprintf(msg+strlen(msg),                                  (void) snprintf(tabs+strlen(tabs),
                                     sizeof(msg)-strlen(msg), "%d", tabstops[i]);                                      sizeof(tabs)-strlen(tabs),
                                       "%d", tabstops[i]);
                         }                          }
                         (void) snprintf(msg+strlen(msg), sizeof(msg)-strlen(msg),                          (void) snprintf(tabs+strlen(tabs),
                             " and then ");                              sizeof(tabs)-strlen(tabs), " and then ");
                 }                  }
                 (void) snprintf(msg+strlen(msg), sizeof(msg)-strlen(msg),                  (void) snprintf(tabs+strlen(tabs), sizeof(tabs)-strlen(tabs),
                     "every %d spaces", tabdefault);                      "every %d spaces", tabdefault);
                 p.p_string = msg;                  p.p_string = tabs;
                 error("%s", &p);                  error("%s", &p);
                 break;                  break;
         }          }

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15