Changeset 210 for trunk/src/sh_getopt.c
- Timestamp:
- Jan 29, 2009, 7:54:16 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_getopt.c
r183 r210 321 321 #ifndef DEFAULT_CONSOLE 322 322 if (num > 0) fputc ('\n', stdout); 323 printf ( _(" console (/dev/console)")); ++num;323 printf ("%s", _(" console (/dev/console)")); ++num; 324 324 #else 325 325 if (num > 0) fputc ('\n', stdout); 326 326 if (0 == strcmp (DEFAULT_CONSOLE, _("NULL"))) 327 { printf ( _("console (/dev/console)")); ++num; }327 { printf ("%s", _("console (/dev/console)")); ++num; } 328 328 else 329 329 { printf (_("console (%s)"), DEFAULT_CONSOLE); ++num; } … … 406 406 #if defined(USE_SYSTEM_MALLOC) 407 407 if (num > 0) fputc ('\n', stdout); 408 printf (_(" using system malloc")); ++num;408 fputs (_(" using system malloc"), stdout); ++num; 409 409 #else 410 410 if (num > 0) fputc ('\n', stdout); 411 printf (_(" using dnmalloc")); ++num;411 fputs (_(" using dnmalloc"), stdout); ++num; 412 412 #endif 413 413 … … 554 554 "(c) 1999-2008 Rainer Wichmann (http://la-samhna.de).\n"), 555 555 VERSION); 556 fprintf (stdout, _("This software comes with ABSOLUTELY NO WARRANTY. "));557 fprintf (stdout, _("Use at own risk.\n\n"));556 fprintf (stdout, "%s",_("This software comes with ABSOLUTELY NO WARRANTY. ")); 557 fprintf (stdout, "%s",_("Use at own risk.\n\n")); 558 558 559 559 sh_getopt_print_log_facilities (); … … 567 567 static int sh_getopt_copyright (const char * dummy) 568 568 { 569 fprintf (stdout, 569 fprintf (stdout, "%s", 570 570 _("Copyright (C) 1999-2008 Rainer Wichmann"\ 571 571 " (http://la-samhna.de).\n\n")); 572 572 573 fprintf (stdout, 573 fprintf (stdout, "%s", 574 574 _("This program is free software; "\ 575 575 "you can redistribute it and/or modify\n")); 576 fprintf (stdout, _("it under the terms of the GNU General "\576 fprintf (stdout, "%s",_("it under the terms of the GNU General "\ 577 577 "Public License as published by\n")); 578 fprintf (stdout, _("the Free Software Foundation; either version 2 "\578 fprintf (stdout, "%s",_("the Free Software Foundation; either version 2 "\ 579 579 "of the License, or\n")); 580 fprintf (stdout, _("(at your option) any later version.\n\n"));581 582 fprintf (stdout, _("This program is distributed in the hope "\580 fprintf (stdout, "%s",_("(at your option) any later version.\n\n")); 581 582 fprintf (stdout, "%s",_("This program is distributed in the hope "\ 583 583 "that it will be useful,\n")); 584 fprintf (stdout, _("but WITHOUT ANY WARRANTY; "\584 fprintf (stdout, "%s",_("but WITHOUT ANY WARRANTY; "\ 585 585 "without even the implied warranty of\n")); 586 fprintf (stdout, _("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."\587 " See the\n"));588 fprintf (stdout, _("GNU General Public License for more details.\n\n"));589 590 fprintf (stdout, _("You should have received a copy of the "\586 fprintf (stdout, "%s",_("MERCHANTABILITY or FITNESS FOR A PARTICULAR "\ 587 "PURPOSE. See the\n")); 588 fprintf (stdout, "%s",_("GNU General Public License for more details.\n\n")); 589 590 fprintf (stdout, "%s",_("You should have received a copy of the "\ 591 591 "GNU General Public License\n")); 592 fprintf (stdout, _("along with this program; "\592 fprintf (stdout, "%s",_("along with this program; "\ 593 593 "if not, write to the Free Software\n")); 594 fprintf (stdout, _("Foundation, Inc., 59 Temple Place - Suite 330, "\594 fprintf (stdout, "%s",_("Foundation, Inc., 59 Temple Place - Suite 330, "\ 595 595 "Boston, MA 02111-1307, USA.\n\n")); 596 596 597 fprintf (stdout, _("This product makes use of the reference implementation"\598 " of the TIGER message\n"));599 fprintf (stdout, _("digest algorithm. This code is copyright Eli Biham "\597 fprintf (stdout, "%s",_("This product makes use of the reference "\ 598 "implementation of the TIGER message\n")); 599 fprintf (stdout, "%s",_("digest algorithm. This code is copyright Eli Biham "\ 600 600 "(biham@cs.technion.ac.il)\n")); 601 fprintf (stdout, _("and Ross Anderson (rja14@cl.cam.ac.uk). It can be used "\601 fprintf (stdout, "%s",_("and Ross Anderson (rja14@cl.cam.ac.uk). It can be used "\ 602 602 "freely without any\n")); 603 fprintf (stdout, _("restrictions.\n"));603 fprintf (stdout, "%s",_("restrictions.\n")); 604 604 #if defined(USE_SRP_PROTOCOL) && !defined(SH_STANDALONE) 605 605 #if (!defined(HAVE_LIBGMP) || !defined(HAVE_GMP_H)) 606 fprintf (stdout, _("This product makes use of the 'bignum' library by "\606 fprintf (stdout, "%s",_("This product makes use of the 'bignum' library by "\ 607 607 "Henrik Johansson\n")); 608 fprintf (stdout, _("(Henrik.Johansson@Nexus.Comm.SE). If you are including"\609 " this library in a\n"));610 fprintf (stdout, _("commercial product, be sure to distribute ALL of"\608 fprintf (stdout, "%s",_("(Henrik.Johansson@Nexus.Comm.SE). If you are "\ 609 "including this library in a\n")); 610 fprintf (stdout, "%s",_("commercial product, be sure to distribute ALL of"\ 611 611 " it with the product.\n")); 612 612 #endif 613 fprintf (stdout, _("This product uses the 'Secure Remote Password' "\613 fprintf (stdout, "%s",_("This product uses the 'Secure Remote Password' "\ 614 614 "cryptographic\n")); 615 fprintf (stdout, _("authentication system developed by Tom Wu "\615 fprintf (stdout, "%s",_("authentication system developed by Tom Wu "\ 616 616 "(tjw@CS.Stanford.EDU).\n")); 617 617 #endif 618 fprintf (stdout, _("\nPlease refer to the file COPYING in the source "\618 fprintf (stdout, "%s",_("\nPlease refer to the file COPYING in the source "\ 619 619 "distribution for a")); 620 fprintf (stdout, _("\nfull list of incorporated code and associated "\620 fprintf (stdout, "%s",_("\nfull list of incorporated code and associated "\ 621 621 "licenses.\n")); 622 622 … … 644 644 "(c) 1999-2006 Rainer Wichmann (http://la-samhna.de).\n"), 645 645 VERSION); 646 fprintf (stdout, _("This software comes with ABSOLUTELY NO WARRANTY. "));647 fprintf (stdout, _("Use at own risk.\n"));648 649 fprintf (stdout, _("Usage:\n\n"));646 fprintf (stdout, "%s",_("This software comes with ABSOLUTELY NO WARRANTY. ")); 647 fprintf (stdout, "%s",_("Use at own risk.\n")); 648 649 fprintf (stdout, "%s",_("Usage:\n\n")); 650 650 651 651 for (i = 0; op_table[i].longopt != NULL; ++i) { … … 656 656 if (op_table[i].shortopt != '-' && 657 657 strchr(opts, op_table[i].shortopt) != NULL) 658 fprintf (stdout, _("Short option char collision !\n"));658 fprintf (stdout, "%s",_("Short option char collision !\n")); 659 659 opts[i] = op_table[i].shortopt; 660 660 … … 689 689 } 690 690 691 fprintf (stdout, 691 fprintf (stdout, "%s", 692 692 _("\nPlease report bugs to support@la-samhna.de.\n")); 693 693 … … 767 767 /* not last option 768 768 */ 769 fprintf (stderr, 769 fprintf (stderr, "%s", 770 770 _("Error: short option with argument is not last in option string\n")); 771 771 (void) sh_getopt_usage(_("fail")); … … 775 775 /* argument required, but no avail 776 776 */ 777 fprintf (stderr, _("Error: missing argument\n")); 777 fprintf (stderr, "%s", 778 _("Error: missing argument\n")); 778 779 (void) sh_getopt_usage(_("fail")); 779 780 } … … 813 814 { 814 815 /* unrecognized short option */ 815 fprintf (stderr, _("Error: unrecognized short option\n"));816 fprintf (stderr, "%s",_("Error: unrecognized short option\n")); 816 817 (void) sh_getopt_usage(_("fail")); 817 818 } … … 840 841 /* argument required, but no avail 841 842 */ 842 fprintf (stderr, _("Error: missing argument\n")); 843 fprintf (stderr, "%s", 844 _("Error: missing argument\n")); 843 845 (void) sh_getopt_usage(_("fail")); 844 846 } … … 870 872 else 871 873 { 872 fprintf (stderr, _("Error: invalid argument\n")); 874 fprintf (stderr, "%s", 875 _("Error: invalid argument\n")); 873 876 /* argument required, but no avail */ 874 877 (void) sh_getopt_usage(_("fail")); … … 899 902 { 900 903 /* unrecognized long option */ 901 fprintf (stderr, _("Error: unrecognized long option\n"));904 fprintf (stderr, "%s",_("Error: unrecognized long option\n")); 902 905 (void) sh_getopt_usage(_("fail")); 903 906 }
Note:
See TracChangeset
for help on using the changeset viewer.