summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-03-12 03:08:30 +0000
committerJim Meyering <jim@meyering.net>1996-03-12 03:08:30 +0000
commit10c96c43ac7f6465fef64f5d46797853bdc0b155 (patch)
treeeaab216688f4d23edb7a1d3439dd833d90757564 /src
parent8e8fd5439a1223a0ac7ac9fcd26e3e012204b349 (diff)
downloadcoreutils-10c96c43ac7f6465fef64f5d46797853bdc0b155.tar.xz
(main): Initialize for internationalized message support: call setlocale,
bindtextdomain, and textdomain.
Diffstat (limited to 'src')
-rw-r--r--src/chmod.c4
-rw-r--r--src/chown.c4
-rw-r--r--src/cp.c4
-rw-r--r--src/dd.c3
-rw-r--r--src/df.c4
-rw-r--r--src/du.c4
-rw-r--r--src/install.c4
-rw-r--r--src/ln.c7
-rw-r--r--src/ls.c6
-rw-r--r--src/mkdir.c4
-rw-r--r--src/mkfifo.c4
-rw-r--r--src/mknod.c4
-rw-r--r--src/mv.c7
-rw-r--r--src/rm.c6
-rw-r--r--src/rmdir.c4
-rw-r--r--src/sync.c3
-rw-r--r--src/touch.c4
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))
diff --git a/src/cp.c b/src/cp.c
index 3b0886e76..692a067f8 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -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");
diff --git a/src/dd.c b/src/dd.c
index f56e55446..2c59bdaa2 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -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++)
diff --git a/src/df.c b/src/df.c
index 38f08cd08..55d2b5905 100644
--- a/src/df.c
+++ b/src/df.c
@@ -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;
diff --git a/src/du.c b/src/du.c
index 5757be63c..8b586a009 100644
--- a/src/du.c
+++ b/src/du.c
@@ -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;
diff --git a/src/ln.c b/src/ln.c
index 6adf6cf4f..83866a3f8 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -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;
diff --git a/src/ls.c b/src/ls.c
index bed1cf831..5b92a2bfb 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -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)
diff --git a/src/mv.c b/src/mv.c
index c24cdcc4f..7db230302 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -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;
diff --git a/src/rm.c b/src/rm.c
index 319aebfca..e318d8d4c 100644
--- a/src/rm.c
+++ b/src/rm.c
@@ -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;