diff options
author | Jim Meyering <jim@meyering.net> | 1996-03-12 03:08:30 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-03-12 03:08:30 +0000 |
commit | 10c96c43ac7f6465fef64f5d46797853bdc0b155 (patch) | |
tree | eaab216688f4d23edb7a1d3439dd833d90757564 /src | |
parent | 8e8fd5439a1223a0ac7ac9fcd26e3e012204b349 (diff) | |
download | coreutils-10c96c43ac7f6465fef64f5d46797853bdc0b155.tar.xz |
(main): Initialize for internationalized message support: call setlocale,
bindtextdomain, and textdomain.
Diffstat (limited to 'src')
-rw-r--r-- | src/chmod.c | 4 | ||||
-rw-r--r-- | src/chown.c | 4 | ||||
-rw-r--r-- | src/cp.c | 4 | ||||
-rw-r--r-- | src/dd.c | 3 | ||||
-rw-r--r-- | src/df.c | 4 | ||||
-rw-r--r-- | src/du.c | 4 | ||||
-rw-r--r-- | src/install.c | 4 | ||||
-rw-r--r-- | src/ln.c | 7 | ||||
-rw-r--r-- | src/ls.c | 6 | ||||
-rw-r--r-- | src/mkdir.c | 4 | ||||
-rw-r--r-- | src/mkfifo.c | 4 | ||||
-rw-r--r-- | src/mknod.c | 4 | ||||
-rw-r--r-- | src/mv.c | 7 | ||||
-rw-r--r-- | src/rm.c | 6 | ||||
-rw-r--r-- | src/rmdir.c | 4 | ||||
-rw-r--r-- | src/sync.c | 3 | ||||
-rw-r--r-- | src/touch.c | 4 |
17 files changed, 72 insertions, 4 deletions
diff --git a/src/chmod.c b/src/chmod.c index b508b45ed..29510712c 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -240,6 +240,10 @@ main (int argc, char **argv) int c; program_name = argv[0]; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + recurse = force_silent = verbose = changes_only = 0; while (1) diff --git a/src/chown.c b/src/chown.c index 111185a6c..026309df2 100644 --- a/src/chown.c +++ b/src/chown.c @@ -244,6 +244,10 @@ main (int argc, char **argv) char *e; program_name = argv[0]; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + recurse = force_silent = verbose = changes_only = 0; while ((optc = getopt_long (argc, argv, "Rcfv", long_options, (int *) 0)) @@ -201,6 +201,10 @@ main (int argc, char **argv) char *version; program_name = argv[0]; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + myeuid = geteuid (); version = getenv ("SIMPLE_BACKUP_SUFFIX"); @@ -327,6 +327,9 @@ main (int argc, char **argv) int i; program_name = argv[0]; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); /* Initialize translation table to identity translation. */ for (i = 0; i < 256; i++) @@ -151,6 +151,10 @@ main (int argc, char **argv) struct stat *stats; program_name = argv[0]; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + fs_select_list = NULL; fs_exclude_list = NULL; inode_format = 0; @@ -250,6 +250,10 @@ main (int argc, char **argv) cwd_only[1] = NULL; program_name = argv[0]; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + xstat = lstat; if (getenv ("POSIXLY_CORRECT")) diff --git a/src/install.c b/src/install.c index 220c5e649..c25e30d5e 100644 --- a/src/install.c +++ b/src/install.c @@ -166,6 +166,10 @@ main (int argc, char **argv) char *version; program_name = argv[0]; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + owner_name = NULL; group_name = NULL; mode = 0755; @@ -306,11 +306,16 @@ main (int argc, char **argv) int make_backups = 0; char *version; + program_name = argv[0]; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + version = getenv ("SIMPLE_BACKUP_SUFFIX"); if (version) simple_backup_suffix = version; version = getenv ("VERSION_CONTROL"); - program_name = argv[0]; + linkfunc = link; symbolic_link = remove_existing_files = interactive = verbose = hard_dir_link = 0; @@ -624,13 +624,17 @@ main (int argc, char **argv) register int i; register struct pending *thispend; + program_name = argv[0]; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + exit_status = 0; dir_defaulted = 1; print_dir_name = 1; pending_dirs = 0; current_time = time ((time_t *) 0); - program_name = argv[0]; i = decode_switches (argc, argv); if (show_version) diff --git a/src/mkdir.c b/src/mkdir.c index 3e52dd636..f5364f5c6 100644 --- a/src/mkdir.c +++ b/src/mkdir.c @@ -91,6 +91,10 @@ main (int argc, char **argv) int optc; program_name = argv[0]; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + path_mode = 0; while ((optc = getopt_long (argc, argv, "pm:", longopts, (int *) 0)) != EOF) diff --git a/src/mkfifo.c b/src/mkfifo.c index d76135553..89cbf1c90 100644 --- a/src/mkfifo.c +++ b/src/mkfifo.c @@ -80,6 +80,10 @@ main (int argc, char **argv) int optc; program_name = argv[0]; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + symbolic_mode = NULL; #ifndef S_ISFIFO diff --git a/src/mknod.c b/src/mknod.c index 5e00ea975..15eed96c7 100644 --- a/src/mknod.c +++ b/src/mknod.c @@ -92,6 +92,10 @@ main (int argc, char **argv) char *s; program_name = argv[0]; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + symbolic_mode = NULL; while ((optc = getopt_long (argc, argv, "m:", longopts, (int *) 0)) != EOF) @@ -408,11 +408,16 @@ main (int argc, char **argv) int make_backups = 0; char *version; + program_name = argv[0]; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + version = getenv ("SIMPLE_BACKUP_SUFFIX"); if (version) simple_backup_suffix = version; version = getenv ("VERSION_CONTROL"); - program_name = argv[0]; + myeuid = geteuid (); interactive = override_mode = verbose = update = 0; errors = 0; @@ -117,11 +117,15 @@ main (int argc, char **argv) int err = 0; int c; + program_name = argv[0]; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + verbose = ignore_missing_files = recursive = interactive = unlink_dirs = 0; pnsize = 256; pathname = xmalloc (pnsize); - program_name = argv[0]; while ((c = getopt_long (argc, argv, "dfirvR", long_opts, (int *) 0)) != EOF) { diff --git a/src/rmdir.c b/src/rmdir.c index 2902b2734..e091fd063 100644 --- a/src/rmdir.c +++ b/src/rmdir.c @@ -102,6 +102,10 @@ main (int argc, char **argv) int optc; program_name = argv[0]; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + empty_paths = 0; while ((optc = getopt_long (argc, argv, "p", longopts, (int *) 0)) != EOF) diff --git a/src/sync.c b/src/sync.c index be6632d45..497fb6955 100644 --- a/src/sync.c +++ b/src/sync.c @@ -52,6 +52,9 @@ void main (int argc, char **argv) { program_name = argv[0]; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); parse_long_options (argc, argv, "sync", version_string, usage); diff --git a/src/touch.c b/src/touch.c index 2bb6e8a5f..0f547ce1b 100644 --- a/src/touch.c +++ b/src/touch.c @@ -274,6 +274,10 @@ main (int argc, char **argv) int err = 0; program_name = argv[0]; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + change_times = no_create = use_ref = posix_date = flexible_date = 0; newtime = (time_t) -1; |