Changeset 22 for trunk/src/sh_getopt.c
- Timestamp:
- Feb 23, 2006, 12:03:58 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_getopt.c
r20 r22 391 391 if (op_table[i].hasArg == HAS_ARG_NO) { 392 392 if (sl_strlen(op_table[i].longopt) < 10) 393 s trcpy(fmt,_("%c%c%c --%-s,\t\t\t %s\n"));/* known to fit */393 sl_strlcpy(fmt,_("%c%c%c --%-s,\t\t\t %s\n"), sizeof(fmt)); 394 394 else if (sl_strlen(op_table[i].longopt) < 17) 395 s trcpy(fmt, _("%c%c%c --%-s,\t\t %s\n")); /* known to fit */395 sl_strlcpy(fmt, _("%c%c%c --%-s,\t\t %s\n"), sizeof(fmt)); 396 396 else 397 strcpy(fmt, _("%c%c%c --%-s,\t %s\n")); /* known to fit */ 398 /*@-formatconst@*/ 399 fprintf (stdout, 400 fmt, 397 sl_strlcpy(fmt, _("%c%c%c --%-s,\t %s\n"), sizeof(fmt)); 398 /* flawfinder: ignore */ 399 fprintf (stdout, fmt, 401 400 (op_table[i].shortopt == '-') ? ' ' : '-', 402 401 (op_table[i].shortopt == '-') ? ' ' : op_table[i].shortopt, … … 404 403 _(op_table[i].longopt), 405 404 _(op_table[i].usage)); 406 /*@+formatconst@*/407 405 } else { 408 406 if (sl_strlen(op_table[i].longopt) < 12) 409 strcpy(fmt, /* known to fit */ 410 _("%c%c %s --%-s=<arg>,\t\t %s\n")); 407 sl_strlcpy(fmt, _("%c%c %s --%-s=<arg>,\t\t %s\n"), sizeof(fmt)); 411 408 else 412 strcpy(fmt, /* known to fit */ 413 _("%c%c %s --%-s=<arg>,\t %s\n")); 414 /*@-formatconst@*/ 415 fprintf (stdout, 416 fmt, 409 sl_strlcpy(fmt, _("%c%c %s --%-s=<arg>,\t %s\n"), sizeof(fmt)); 410 /* flawfinder: ignore */ 411 fprintf (stdout, fmt, 417 412 (op_table[i].shortopt == '-') ? ' ' : '-', 418 413 (op_table[i].shortopt == '-') ? ' ' : op_table[i].shortopt, … … 420 415 _(op_table[i].longopt), 421 416 _(op_table[i].usage)); 422 /*@+formatconst@*/423 417 } 424 418 }
Note:
See TracChangeset
for help on using the changeset viewer.