diff options
| -rw-r--r-- | src/endian.c | 62 |
1 files changed, 14 insertions, 48 deletions
diff --git a/src/endian.c b/src/endian.c index 5dfcf6e..178df7f 100644 --- a/src/endian.c +++ b/src/endian.c | |||
| @@ -70,26 +70,6 @@ | |||
| 70 | 70 | ||
| 71 | /////////////////// | 71 | /////////////////// |
| 72 | // // | 72 | // // |
| 73 | // i18l Support // | ||
| 74 | // // | ||
| 75 | /////////////////// | ||
| 76 | |||
| 77 | #ifdef HAVE_GETTEXT | ||
| 78 | # include <gettext.h> | ||
| 79 | # include <libintl.h> | ||
| 80 | # define _(String) gettext (String) | ||
| 81 | # define gettext_noop(String) String | ||
| 82 | # define N_(String) gettext_noop (String) | ||
| 83 | #else | ||
| 84 | # define _(String) (String) | ||
| 85 | # define N_(String) String | ||
| 86 | # define textdomain(Domain) | ||
| 87 | # define bindtextdomain(Package, Directory) | ||
| 88 | #endif | ||
| 89 | |||
| 90 | |||
| 91 | /////////////////// | ||
| 92 | // // | ||
| 93 | // Definitions // | 73 | // Definitions // |
| 94 | // // | 74 | // // |
| 95 | /////////////////// | 75 | /////////////////// |
| @@ -179,13 +159,11 @@ int main(int argc, char * argv[]) | |||
| 179 | my_version(); | 159 | my_version(); |
| 180 | return(0); | 160 | return(0); |
| 181 | case '?': | 161 | case '?': |
| 182 | fprintf(stderr, _("Try `%s --help' for more information.\n"), PROGRAM_NAME); | 162 | fprintf(stderr, "Try `%s --help' for more information.\n", PROGRAM_NAME); |
| 183 | return(1); | 163 | return(1); |
| 184 | default: | 164 | default: |
| 185 | fprintf(stderr, _("%s: unrecognized option `--%c'\n" | 165 | fprintf(stderr, "%s: unrecognized option `--%c'\n", PROGRAM_NAME, c); |
| 186 | "Try `%s --help' for more information.\n" | 166 | fprintf(stderr, "Try `%s --help' for more information.\n", PROGRAM_NAME); |
| 187 | ), PROGRAM_NAME, c, PROGRAM_NAME | ||
| 188 | ); | ||
| 189 | return(1); | 167 | return(1); |
| 190 | }; | 168 | }; |
| 191 | }; | 169 | }; |
| @@ -193,8 +171,8 @@ int main(int argc, char * argv[]) | |||
| 193 | // checks for extra arguments | 171 | // checks for extra arguments |
| 194 | if (optind != argc) | 172 | if (optind != argc) |
| 195 | { | 173 | { |
| 196 | fprintf(stderr, _("%s: unknown option `%s'\n"), PROGRAM_NAME, argv[optind]); | 174 | fprintf(stderr, "%s: unknown option `%s'\n", PROGRAM_NAME, argv[optind]); |
| 197 | fprintf(stderr, _("Try `%s --help' for more information.\n"), PROGRAM_NAME); | 175 | fprintf(stderr, "Try `%s --help' for more information.\n", PROGRAM_NAME); |
| 198 | return(1); | 176 | return(1); |
| 199 | }; | 177 | }; |
| 200 | 178 | ||
| @@ -211,15 +189,9 @@ int main(int argc, char * argv[]) | |||
| 211 | /// displays usage information | 189 | /// displays usage information |
| 212 | void my_usage() | 190 | void my_usage() |
| 213 | { | 191 | { |
| 214 | // TRANSLATORS: The following strings provide usage for command. These | 192 | printf("Usage: %s\n", PROGRAM_NAME); |
| 215 | // strings are displayed if the program is passed `--help' on the command | 193 | printf("\n"); |
| 216 | // line. The two strings referenced are: PROGRAM_NAME, and | 194 | printf("Report bugs to <%s>.\n", PACKAGE_BUGREPORT); |
| 217 | // PACKAGE_BUGREPORT | ||
| 218 | printf(_("Usage: %s\n" | ||
| 219 | "\n" | ||
| 220 | "Report bugs to <%s>.\n" | ||
| 221 | ), PROGRAM_NAME, PACKAGE_BUGREPORT | ||
| 222 | ); | ||
| 223 | return; | 195 | return; |
| 224 | } | 196 | } |
| 225 | 197 | ||
| @@ -227,18 +199,12 @@ void my_usage() | |||
| 227 | /// displays version information | 199 | /// displays version information |
| 228 | void my_version(void) | 200 | void my_version(void) |
| 229 | { | 201 | { |
| 230 | // TRANSLATORS: The following strings provide version and copyright | 202 | printf("%s (%s) %s\n", PROGRAM_NAME, PACKAGE_NAME, PACKAGE_VERSION); |
| 231 | // information if the program is passed --version on the command line. | 203 | printf("Written by David M. Syzdek.\n"); |
| 232 | // The three strings referenced are: PROGRAM_NAME, PACKAGE_NAME, | 204 | printf("\n"); |
| 233 | // PACKAGE_VERSION. | 205 | printf("%s\n", PACKAGE_COPYRIGHT); |
| 234 | printf(_("%s (%s) %s\n" | 206 | printf("This is free software; see the source for copying conditions. There is NO\n"); |
| 235 | "Written by David M. Syzdek.\n" | 207 | printf("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"); |
| 236 | "\n" | ||
| 237 | "%s\n" | ||
| 238 | "This is free software; see the source for copying conditions. There is NO\n" | ||
| 239 | "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" | ||
| 240 | ), PROGRAM_NAME, PACKAGE_NAME, PACKAGE_VERSION, PACKAGE_COPYRIGHT | ||
| 241 | ); | ||
| 242 | return; | 208 | return; |
| 243 | } | 209 | } |
| 244 | 210 | ||
