=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/less/optfunc.c,v retrieving revision 1.14 retrieving revision 1.15 diff -c -r1.14 -r1.15 *** src/usr.bin/less/optfunc.c 2016/01/12 23:01:23 1.14 --- src/usr.bin/less/optfunc.c 2016/02/03 15:47:27 1.15 *************** *** 435,441 **** extern int tabstops[]; extern int ntabstops; extern int tabdefault; ! char msg[60+(4*TABSTOP_MAX)]; int i; PARG p; --- 435,441 ---- extern int tabstops[]; extern int ntabstops; extern int tabdefault; ! char tabs[60+(4*TABSTOP_MAX)]; int i; PARG p; *************** *** 460,479 **** tabdefault = tabstops[ntabstops-1] - tabstops[ntabstops-2]; break; case QUERY: ! (void) strlcpy(msg, "Tab stops ", sizeof(msg)); if (ntabstops > 2) { for (i = 1; i < ntabstops; i++) { if (i > 1) ! strlcat(msg, ",", sizeof(msg)); ! (void) snprintf(msg+strlen(msg), ! sizeof(msg)-strlen(msg), "%d", tabstops[i]); } ! (void) snprintf(msg+strlen(msg), sizeof(msg)-strlen(msg), ! " and then "); } ! (void) snprintf(msg+strlen(msg), sizeof(msg)-strlen(msg), "every %d spaces", tabdefault); ! p.p_string = msg; error("%s", &p); break; } --- 460,480 ---- tabdefault = tabstops[ntabstops-1] - tabstops[ntabstops-2]; break; case QUERY: ! (void) strlcpy(tabs, "Tab stops ", sizeof(tabs)); if (ntabstops > 2) { for (i = 1; i < ntabstops; i++) { if (i > 1) ! strlcat(tabs, ",", sizeof(tabs)); ! (void) snprintf(tabs+strlen(tabs), ! sizeof(tabs)-strlen(tabs), ! "%d", tabstops[i]); } ! (void) snprintf(tabs+strlen(tabs), ! sizeof(tabs)-strlen(tabs), " and then "); } ! (void) snprintf(tabs+strlen(tabs), sizeof(tabs)-strlen(tabs), "every %d spaces", tabdefault); ! p.p_string = tabs; error("%s", &p); break; }