diff options
| -rw-r--r-- | src/bitcopy.c | 78 |
1 files changed, 22 insertions, 56 deletions
diff --git a/src/bitcopy.c b/src/bitcopy.c index 83f3786..728a174 100644 --- a/src/bitcopy.c +++ b/src/bitcopy.c | |||
| @@ -71,26 +71,6 @@ | |||
| 71 | 71 | ||
| 72 | /////////////////// | 72 | /////////////////// |
| 73 | // // | 73 | // // |
| 74 | // i18l Support // | ||
| 75 | // // | ||
| 76 | /////////////////// | ||
| 77 | |||
| 78 | #ifdef HAVE_GETTEXT | ||
| 79 | # include <gettext.h> | ||
| 80 | # include <libintl.h> | ||
| 81 | # define _(String) gettext (String) | ||
| 82 | # define gettext_noop(String) String | ||
| 83 | # define N_(String) gettext_noop (String) | ||
| 84 | #else | ||
| 85 | # define _(String) (String) | ||
| 86 | # define N_(String) String | ||
| 87 | # define textdomain(Domain) | ||
| 88 | # define bindtextdomain(Package, Directory) | ||
| 89 | #endif | ||
| 90 | |||
| 91 | |||
| 92 | /////////////////// | ||
| 93 | // // | ||
| 94 | // Definitions // | 74 | // Definitions // |
| 95 | // // | 75 | // // |
| 96 | /////////////////// | 76 | /////////////////// |
| @@ -316,13 +296,11 @@ int main(int argc, char * argv[]) | |||
| 316 | verbose++; | 296 | verbose++; |
| 317 | break; | 297 | break; |
| 318 | case '?': | 298 | case '?': |
| 319 | fprintf(stderr, _("Try `%s --help' for more information.\n"), PROGRAM_NAME); | 299 | fprintf(stderr, "Try `%s --help' for more information.\n", PROGRAM_NAME); |
| 320 | return(1); | 300 | return(1); |
| 321 | default: | 301 | default: |
| 322 | fprintf(stderr, _("%s: unrecognized option `--%c'\n" | 302 | fprintf(stderr, "%s: unrecognized option `--%c'\n", PROGRAM_NAME, c); |
| 323 | "Try `%s --help' for more information.\n" | 303 | fprintf(stderr, "Try `%s --help' for more information.\n", PROGRAM_NAME); |
| 324 | ), PROGRAM_NAME, c, PROGRAM_NAME | ||
| 325 | ); | ||
| 326 | return(1); | 304 | return(1); |
| 327 | }; | 305 | }; |
| 328 | }; | 306 | }; |
| @@ -381,25 +359,19 @@ int32_t my_make_littleendian(uint32_t data) | |||
| 381 | /// displays usage information | 359 | /// displays usage information |
| 382 | void my_usage() | 360 | void my_usage() |
| 383 | { | 361 | { |
| 384 | // TRANSLATORS: The following strings provide usage for command. These | 362 | printf("Usage: %s [options]\n", PROGRAM_NAME); |
| 385 | // strings are displayed if the program is passed `--help' on the command | 363 | printf(" -B bytes size of buffer to use\n"); |
| 386 | // line. The two strings referenced are: PROGRAM_NAME, and | 364 | printf(" -b bits size of buffer to use\n"); |
| 387 | // PACKAGE_BUGREPORT | 365 | printf(" -d data data to insert\n"); |
| 388 | printf(_("Usage: %s [options]\n" | 366 | printf(" -h, --help print this help and exit\n"); |
| 389 | " -B bytes size of buffer to use\n" | 367 | printf(" -L bytes length of data in bytes\n"); |
| 390 | " -b bits size of buffer to use\n" | 368 | printf(" -l bits length of data in bits\n"); |
| 391 | " -d data data to insert\n" | 369 | printf(" -O bytes offset in bytes to store data\n"); |
| 392 | " -h, --help print this help and exit\n" | 370 | printf(" -o bits offset in bits to store data\n"); |
| 393 | " -L bytes length of data in bytes\n" | 371 | printf(" -V, --version print verbose messages\n"); |
| 394 | " -l bits length of data in bits\n" | 372 | printf(" -v, --verbose print version number and exit\n"); |
| 395 | " -O bytes offset in bytes to store data\n" | 373 | printf("\n"); |
| 396 | " -o bits offset in bits to store data\n" | 374 | printf("Report bugs to <%s>.\n", PACKAGE_BUGREPORT); |
| 397 | " -V, --version print verbose messages\n" | ||
| 398 | " -v, --verbose print version number and exit\n" | ||
| 399 | "\n" | ||
| 400 | "Report bugs to <%s>.\n" | ||
| 401 | ), PROGRAM_NAME, PACKAGE_BUGREPORT | ||
| 402 | ); | ||
| 403 | return; | 375 | return; |
| 404 | } | 376 | } |
| 405 | 377 | ||
| @@ -407,18 +379,12 @@ void my_usage() | |||
| 407 | /// displays version information | 379 | /// displays version information |
| 408 | void my_version(void) | 380 | void my_version(void) |
| 409 | { | 381 | { |
| 410 | // TRANSLATORS: The following strings provide version and copyright | 382 | printf("%s (%s) %s\n", PROGRAM_NAME, PACKAGE_NAME, PACKAGE_VERSION); |
| 411 | // information if the program is passed --version on the command line. | 383 | printf("Written by David M. Syzdek.\n"); |
| 412 | // The three strings referenced are: PROGRAM_NAME, PACKAGE_NAME, | 384 | printf("\n"); |
| 413 | // PACKAGE_VERSION. | 385 | printf("%s\n", PACKAGE_COPYRIGHT); |
| 414 | printf(_("%s (%s) %s\n" | 386 | printf("This is free software; see the source for copying conditions. There is NO\n"); |
| 415 | "Written by David M. Syzdek.\n" | 387 | printf("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"); |
| 416 | "\n" | ||
| 417 | "%s\n" | ||
| 418 | "This is free software; see the source for copying conditions. There is NO\n" | ||
| 419 | "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" | ||
| 420 | ), PROGRAM_NAME, PACKAGE_NAME, PACKAGE_VERSION, PACKAGE_COPYRIGHT | ||
| 421 | ); | ||
| 422 | return; | 388 | return; |
| 423 | } | 389 | } |
| 424 | 390 | ||
