aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid M. Syzdek <david@syzdek.net>2021-10-11 11:52:02 -0800
committerDavid M. Syzdek <david@syzdek.net>2021-10-11 11:52:02 -0800
commit9698943a28eb5ae5be15f70aa0419bd33ce7c12d (patch)
tree8ac9715b68dc2b39182ab553c7004319800ba2d9
parent75d648f6c10fdd27da2c6de022416d14d24e6cf8 (diff)
downloaddmstools-9698943a28eb5ae5be15f70aa0419bd33ce7c12d.tar.gz
dmstools-9698943a28eb5ae5be15f70aa0419bd33ce7c12d.tar.bz2
dmstools-9698943a28eb5ae5be15f70aa0419bd33ce7c12d.tar.xz
dmstools-9698943a28eb5ae5be15f70aa0419bd33ce7c12d.zip
bitops: removing i18l support
-rw-r--r--src/bitops.c78
1 files changed, 22 insertions, 56 deletions
diff --git a/src/bitops.c b/src/bitops.c
index 0c1d02a..1aec951 100644
--- a/src/bitops.c
+++ b/src/bitops.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///////////////////
@@ -213,13 +193,11 @@ int main(int argc, char * argv[])
213 opts = MY_OPT_HEX; 193 opts = MY_OPT_HEX;
214 break; 194 break;
215 case '?': 195 case '?':
216 fprintf(stderr, _("Try `%s --help' for more information.\n"), PROGRAM_NAME); 196 fprintf(stderr, "Try `%s --help' for more information.\n", PROGRAM_NAME);
217 return(1); 197 return(1);
218 default: 198 default:
219 fprintf(stderr, _("%s: unrecognized option `--%c'\n" 199 fprintf(stderr, "%s: unrecognized option `--%c'\n", PROGRAM_NAME, c);
220 "Try `%s --help' for more information.\n" 200 fprintf(stderr, "Try `%s --help' for more information.\n", PROGRAM_NAME);
221 ), PROGRAM_NAME, c, PROGRAM_NAME
222 );
223 return(1); 201 return(1);
224 }; 202 };
225 }; 203 };
@@ -384,25 +362,19 @@ const char * my_spaces(char * dst)
384/// displays usage information 362/// displays usage information
385void my_usage() 363void my_usage()
386{ 364{
387 // TRANSLATORS: The following strings provide usage for command. These 365 printf("Usage: %s [options] num1 num2\n", PROGRAM_NAME);
388 // strings are displayed if the program is passed `--help' on the command 366 printf(" -B display output in binary notation\n");
389 // line. The two strings referenced are: PROGRAM_NAME, and 367 printf(" -D display output in decimal notation\n");
390 // PACKAGE_BUGREPORT 368 printf(" -O display output in octal notation\n");
391 printf(_("Usage: %s [options] num1 num2\n" 369 printf(" -X display output in hexadecimal notation\n");
392 " -B display output in binary notation\n" 370 printf("\n");
393 " -D display output in decimal notation\n" 371 printf("Input Notation:\n");
394 " -O display output in octal notation\n" 372 printf(" 00NNNNNNNN input number is in binary\n");
395 " -X display output in hexadecimal notation\n" 373 printf(" NNNNNNNN input number is in decimal\n");
396 "\n" 374 printf(" 0xNNNNNNNN input number is in hexadecimal\n");
397 "Input Notation:\n" 375 printf(" 0NNNNNNNN input number is in octal\n");
398 " 00NNNNNNNN input number is in binary\n" 376 printf("\n");
399 " NNNNNNNN input number is in decimal\n" 377 printf("Report bugs to <%s>.\n", PACKAGE_BUGREPORT);
400 " 0xNNNNNNNN input number is in hexadecimal\n"
401 " 0NNNNNNNN input number is in octal\n"
402 "\n"
403 "Report bugs to <%s>.\n"
404 ), PROGRAM_NAME, PACKAGE_BUGREPORT
405 );
406 return; 378 return;
407} 379}
408 380
@@ -410,18 +382,12 @@ void my_usage()
410/// displays version information 382/// displays version information
411void my_version(void) 383void my_version(void)
412{ 384{
413 // TRANSLATORS: The following strings provide version and copyright 385 printf("%s (%s) %s\n", PROGRAM_NAME, PACKAGE_NAME, PACKAGE_VERSION);
414 // information if the program is passed --version on the command line. 386 printf("Written by David M. Syzdek.\n");
415 // The three strings referenced are: PROGRAM_NAME, PACKAGE_NAME, 387 printf("\n");
416 // PACKAGE_VERSION. 388 printf("%s\n", PACKAGE_COPYRIGHT);
417 printf(_("%s (%s) %s\n" 389 printf("This is free software; see the source for copying conditions. There is NO\n");
418 "Written by David M. Syzdek.\n" 390 printf("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
419 "\n"
420 "%s\n"
421 "This is free software; see the source for copying conditions. There is NO\n"
422 "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
423 ), PROGRAM_NAME, PACKAGE_NAME, PACKAGE_VERSION, PACKAGE_COPYRIGHT
424 );
425 return; 391 return;
426} 392}
427 393