Changes in trunk/src/sh_getopt.c [27:20]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_getopt.c
r27 r20 80 80 sh_util_set_interactive }, 81 81 #endif 82 #if defined(SH_WITH_SERVER) || defined(SH_WITH_CLIENT)83 { N_("server-port"),84 '-',85 N_("Set the server port to connect to"),86 HAS_ARG_YES,87 sh_forward_server_port },88 #endif89 82 #ifdef SH_WITH_SERVER 90 83 { N_("server"), … … 119 112 HAS_ARG_YES, 120 113 sh_calls_set_bind_addr }, 121 #if defined(SH_WITH_SERVER) || defined(SH_WITH_CLIENT)114 #ifdef SH_WITH_CLIENT 122 115 { N_("set-export-severity"), 123 116 'e', … … 398 391 if (op_table[i].hasArg == HAS_ARG_NO) { 399 392 if (sl_strlen(op_table[i].longopt) < 10) 400 s l_strlcpy(fmt,_("%c%c%c --%-s,\t\t\t %s\n"), sizeof(fmt));393 strcpy(fmt,_("%c%c%c --%-s,\t\t\t %s\n"));/* known to fit */ 401 394 else if (sl_strlen(op_table[i].longopt) < 17) 402 s l_strlcpy(fmt, _("%c%c%c --%-s,\t\t %s\n"), sizeof(fmt));395 strcpy(fmt, _("%c%c%c --%-s,\t\t %s\n")); /* known to fit */ 403 396 else 404 sl_strlcpy(fmt, _("%c%c%c --%-s,\t %s\n"), sizeof(fmt)); 405 /* flawfinder: ignore */ 406 fprintf (stdout, fmt, 397 strcpy(fmt, _("%c%c%c --%-s,\t %s\n")); /* known to fit */ 398 /*@-formatconst@*/ 399 fprintf (stdout, 400 fmt, 407 401 (op_table[i].shortopt == '-') ? ' ' : '-', 408 402 (op_table[i].shortopt == '-') ? ' ' : op_table[i].shortopt, … … 410 404 _(op_table[i].longopt), 411 405 _(op_table[i].usage)); 406 /*@+formatconst@*/ 412 407 } else { 413 408 if (sl_strlen(op_table[i].longopt) < 12) 414 sl_strlcpy(fmt, _("%c%c %s --%-s=<arg>,\t\t %s\n"), sizeof(fmt)); 409 strcpy(fmt, /* known to fit */ 410 _("%c%c %s --%-s=<arg>,\t\t %s\n")); 415 411 else 416 sl_strlcpy(fmt, _("%c%c %s --%-s=<arg>,\t %s\n"), sizeof(fmt)); 417 /* flawfinder: ignore */ 418 fprintf (stdout, fmt, 412 strcpy(fmt, /* known to fit */ 413 _("%c%c %s --%-s=<arg>,\t %s\n")); 414 /*@-formatconst@*/ 415 fprintf (stdout, 416 fmt, 419 417 (op_table[i].shortopt == '-') ? ' ' : '-', 420 418 (op_table[i].shortopt == '-') ? ' ' : op_table[i].shortopt, … … 422 420 _(op_table[i].longopt), 423 421 _(op_table[i].usage)); 422 /*@+formatconst@*/ 424 423 } 425 424 } … … 561 560 for (i = 0; op_table[i].longopt != NULL; ++i) 562 561 { 563 562 564 563 if (sl_strncmp(_(op_table[i].longopt), 565 564 &argv[1][2], … … 569 568 if ( op_table[i].hasArg == HAS_ARG_YES ) 570 569 { 571 theequal = strchr(argv[1], '='); 572 if (theequal == NULL) 570 if ( (theequal = strchr(argv[1], '=')) == NULL) 573 571 { 574 572 if (argc < 3)
Note:
See TracChangeset
for help on using the changeset viewer.