diff options
author | Jim Meyering <jim@meyering.net> | 1996-03-09 20:19:13 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-03-09 20:19:13 +0000 |
commit | 715765a5487d2e37c4d48e216e6958883db6a41f (patch) | |
tree | 05d3a6daffcd9629e21fb275fe387e06dc3ba440 | |
parent | de0fdbb080e3902f2a6d4ee795b6322565df424b (diff) | |
download | coreutils-715765a5487d2e37c4d48e216e6958883db6a41f.tar.xz |
(main): Initialize for internationalized message support: call setlocale,
bindtextdomain, and textdomain.
-rw-r--r-- | src/cat.c | 3 | ||||
-rw-r--r-- | src/cksum.c | 4 | ||||
-rw-r--r-- | src/comm.c | 3 | ||||
-rw-r--r-- | src/csplit.c | 10 | ||||
-rw-r--r-- | src/cut.c | 3 | ||||
-rw-r--r-- | src/expand.c | 3 | ||||
-rw-r--r-- | src/fmt.c | 3 | ||||
-rw-r--r-- | src/fold.c | 4 | ||||
-rw-r--r-- | src/head.c | 4 | ||||
-rw-r--r-- | src/join.c | 3 | ||||
-rw-r--r-- | src/md5sum.c | 3 | ||||
-rw-r--r-- | src/nl.c | 4 | ||||
-rw-r--r-- | src/od.c | 4 | ||||
-rw-r--r-- | src/paste.c | 4 | ||||
-rw-r--r-- | src/pr.c | 3 | ||||
-rw-r--r-- | src/sort.c | 3 | ||||
-rw-r--r-- | src/split.c | 3 | ||||
-rw-r--r-- | src/sum.c | 4 | ||||
-rw-r--r-- | src/tac.c | 4 | ||||
-rw-r--r-- | src/tail.c | 4 | ||||
-rw-r--r-- | src/tr.c | 3 | ||||
-rw-r--r-- | src/unexpand.c | 6 | ||||
-rw-r--r-- | src/uniq.c | 4 | ||||
-rw-r--r-- | src/wc.c | 4 |
24 files changed, 89 insertions, 4 deletions
@@ -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. */ diff --git a/src/cksum.c b/src/cksum.c index c5c8c020e..c3f3a8119 100644 --- a/src/cksum.c +++ b/src/cksum.c @@ -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) diff --git a/src/comm.c b/src/comm.c index 8ecfa7a9b..e9db88874 100644 --- a/src/comm.c +++ b/src/comm.c @@ -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; diff --git a/src/csplit.c b/src/csplit.c index b89a36925..508eadc77 100644 --- a/src/csplit.c +++ b/src/csplit.c @@ -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) @@ -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; diff --git a/src/expand.c b/src/expand.c index f4939c771..93ddee476 100644 --- a/src/expand.c +++ b/src/expand.c @@ -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) @@ -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; diff --git a/src/fold.c b/src/fold.c index c0d02423b..a23b637c8 100644 --- a/src/fold.c +++ b/src/fold.c @@ -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. */ diff --git a/src/head.c b/src/head.c index 7b59d486e..a0415801e 100644 --- a/src/head.c +++ b/src/head.c @@ -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; diff --git a/src/join.c b/src/join.c index 4c9c71b39..85bd6cf0b 100644 --- a/src/join.c +++ b/src/join.c @@ -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. */ diff --git a/src/md5sum.c b/src/md5sum.c index 0329d8dfe..2e2759d0f 100644 --- a/src/md5sum.c +++ b/src/md5sum.c @@ -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); @@ -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, @@ -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++) diff --git a/src/paste.c b/src/paste.c index 50e53b177..395c6bcaf 100644 --- a/src/paste.c +++ b/src/paste.c @@ -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; @@ -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 diff --git a/src/sort.c b/src/sort.c index 40336caab..53737a9ee 100644 --- a/src/sort.c +++ b/src/sort.c @@ -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); diff --git a/src/split.c b/src/split.c index d589a9f9d..bdc89e551 100644 --- a/src/split.c +++ b/src/split.c @@ -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. */ @@ -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) @@ -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; diff --git a/src/tail.c b/src/tail.c index a54945335..c4c80caf3 100644 --- a/src/tail.c +++ b/src/tail.c @@ -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; @@ -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) diff --git a/src/unexpand.c b/src/unexpand.c index 9ea05ab15..0d0959474 100644 --- a/src/unexpand.c +++ b/src/unexpand.c @@ -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) diff --git a/src/uniq.c b/src/uniq.c index 64a3b8c9c..d6900ceff 100644 --- a/src/uniq.c +++ b/src/uniq.c @@ -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; @@ -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; |