1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-05 08:10:15 +02:00

(main): Initialize for internationalized message support: call setlocale,

bindtextdomain, and textdomain.
This commit is contained in:
Jim Meyering
1996-03-09 20:19:13 +00:00
parent de0fdbb080
commit 715765a548
24 changed files with 89 additions and 4 deletions
+3
View File
@@ -505,6 +505,9 @@ main (int argc, char **argv)
};
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
/* Parse command line options. */
+4
View File
@@ -287,6 +287,10 @@ main (int argc, char **argv)
int errors = 0;
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
have_read_stdin = 0;
while ((c = getopt_long (argc, argv, "", long_options, (int *) 0)) != EOF)
+3
View File
@@ -218,6 +218,9 @@ main (int argc, char **argv)
int c;
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
only_file_1 = 1;
only_file_2 = 1;
+7 -3
View File
@@ -1404,9 +1404,13 @@ main (int argc, char **argv)
unsigned long val;
#ifdef SA_INTERRUPT
struct sigaction oldact, newact;
#endif /* SA_INTERRUPT */
#endif
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
global_argv = argv;
controls = NULL;
control_used = 0;
@@ -1434,7 +1438,7 @@ main (int argc, char **argv)
sigaction (SIGTERM, NULL, &oldact);
if (oldact.sa_handler != SIG_IGN)
sigaction (SIGTERM, &newact, NULL);
#else
#else /* not SA_INTERRUPT */
if (signal (SIGHUP, SIG_IGN) != SIG_IGN)
signal (SIGHUP, interrupt_handler);
if (signal (SIGINT, SIG_IGN) != SIG_IGN)
@@ -1443,7 +1447,7 @@ main (int argc, char **argv)
signal (SIGQUIT, interrupt_handler);
if (signal (SIGTERM, SIG_IGN) != SIG_IGN)
signal (SIGTERM, interrupt_handler);
#endif
#endif /* not SA_INTERRUPT */
while ((optc = getopt_long (argc, argv, "f:b:kn:sqz", longopts, (int *) 0))
!= EOF)
+3
View File
@@ -676,6 +676,9 @@ main (int argc, char **argv)
int optc, exit_status = 0;
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
operating_mode = undefined_mode;
+3
View File
@@ -334,6 +334,9 @@ main (int argc, char **argv)
tab_list = NULL;
first_free_tab = 0;
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
while ((c = getopt_long (argc, argv, "it:,0123456789", longopts, (int *) 0))
!= EOF)
+3
View File
@@ -327,6 +327,9 @@ main (register int argc, register char **argv)
FILE *infile;
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
crown = tagged = split = uniform = FALSE;
max_width = WIDTH;
+4
View File
@@ -255,6 +255,10 @@ main (int argc, char **argv)
int errs = 0;
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
break_spaces = count_bytes = have_read_stdin = 0;
/* Turn any numeric options into -w options. */
+4
View File
@@ -258,6 +258,10 @@ main (int argc, char **argv)
int c; /* Option character. */
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
have_read_stdin = 0;
unit_size = 0;
print_headers = 0;
+3
View File
@@ -774,6 +774,9 @@ main (int argc, char **argv)
int optc, prev_optc = 0, nfiles;
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
/* Initialize this before parsing options. In parsing options,
it may be increased. */
+3
View File
@@ -399,6 +399,9 @@ main (int argc, char **argv)
/* Setting values of global variables. */
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
parse_long_options (argc, argv, "md5sum", version_string, usage);
+4
View File
@@ -466,6 +466,10 @@ main (int argc, char **argv)
int c, exit_status = 0;
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
have_read_stdin = 0;
while ((c = getopt_long (argc, argv, "h:b:f:v:i:pl:s:w:n:d:", longopts,
+4
View File
@@ -1586,6 +1586,10 @@ main (int argc, char **argv)
#endif
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
err = 0;
for (i = 0; i <= MAX_INTEGRAL_TYPE_SIZE; i++)
+4
View File
@@ -437,6 +437,10 @@ main (int argc, char **argv)
char default_delims[2], zero_delims[3];
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
have_read_stdin = 0;
serial_merge = 0;
delims = default_delims;
+3
View File
@@ -467,6 +467,9 @@ main (int argc, char **argv)
char **file_names;
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
n_files = 0;
file_names = (argc > 1
+3
View File
@@ -1674,6 +1674,9 @@ main (int argc, char **argv)
#endif /* SA_INTERRUPT */
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
parse_long_options (argc, argv, "sort", version_string, usage);
+3
View File
@@ -370,6 +370,9 @@ main (int argc, char **argv)
int digits_optind = 0;
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
/* Parse command line options. */
+4
View File
@@ -207,6 +207,10 @@ main (int argc, char **argv)
int (*sum_func) () = bsd_sum_file;
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
have_read_stdin = 0;
while ((optc = getopt_long (argc, argv, "rs", longopts, (int *) 0)) != -1)
+4
View File
@@ -588,6 +588,10 @@ main (int argc, char **argv)
int have_read_stdin = 0;
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
errors = 0;
separator = "\n";
sentinel_length = 1;
+4
View File
@@ -851,6 +851,10 @@ main (int argc, char **argv)
int fileind; /* Index in ARGV of first file name. */
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
have_read_stdin = 0;
count_lines = 1;
forever = forever_multiple = from_start = print_headers = 0;
+3
View File
@@ -1796,6 +1796,9 @@ main (int argc, char **argv)
struct Spec_list *s2 = &buf2;
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
while ((c = getopt_long (argc, argv, "cdst", long_options,
(int *) 0)) != EOF)
+5 -1
View File
@@ -383,12 +383,16 @@ main (int argc, char **argv)
int tabval = -1; /* Value of tabstop being read, or -1. */
int c; /* Option character. */
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
have_read_stdin = 0;
exit_status = 0;
convert_entire_line = 0;
tab_list = NULL;
first_free_tab = 0;
program_name = argv[0];
while ((c = getopt_long (argc, argv, "at:,0123456789", longopts, (int *) 0))
!= EOF)
+4
View File
@@ -280,6 +280,10 @@ main (int argc, char **argv)
char *infile = "-", *outfile = "-";
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
skip_chars = 0;
skip_fields = 0;
check_chars = 0;
+4
View File
@@ -261,6 +261,10 @@ main (int argc, char **argv)
int nfiles;
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
exit_status = 0;
print_lines = print_words = print_chars = 0;
total_lines = total_words = total_chars = 0;