summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2014-06-11 15:38:14 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2014-06-12 18:49:14 +0200
commit3b502901c021cb0eda46ea44bbf2d73e6b6f7265 (patch)
tree2d9aee19810558685c8a71888753468ebe24df08 /src
parenta22cd7394b05dc3d70654fbf4d7bc4bfbc7401b6 (diff)
downloadwget-3b502901c021cb0eda46ea44bbf2d73e6b6f7265.tar.gz
Ensure main calls bindtextdomain
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/decc_ver.c9
-rw-r--r--src/hash.c9
-rw-r--r--src/html-parse.c8
-rw-r--r--src/netrc.c8
-rw-r--r--src/test.c8
6 files changed, 51 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index dbe10283..91abc52d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
+2014-06-11 Giuseppe Scrivano <gscrivan@redhat.com>
+
+ * decc_ver.c (main): Ensure bindtextdomain is called.
+ * hash.c (main): Likewise.
+ * html-parse.c: Likewise.
+ * netrc.c: Likewise.
+ * test.c: Likewise.
+ * trunc.c: Likewise.
+
2014-06-10 Giuseppe Scrivano <gscrivan@redhat.com>
* wget.h: Remove trailing whitespaces.
diff --git a/src/decc_ver.c b/src/decc_ver.c
index 8d9e5142..6eb7a9d0 100644
--- a/src/decc_ver.c
+++ b/src/decc_ver.c
@@ -2,6 +2,15 @@
int main( void)
{
+
+#ifdef ENABLE_NLS
+ /* Set the current locale. */
+ setlocale (LC_ALL, "");
+ /* Set the text message domain. */
+ bindtextdomain ("wget", LOCALEDIR);
+ textdomain ("wget");
+#endif /* ENABLE_NLS */
+
#ifdef __VMS_VERSION
printf( " __VMS_VERSION: >%s<.\n", __VMS_VERSION);
#else /* def __VMS_VERSION */
diff --git a/src/hash.c b/src/hash.c
index 129ead1a..af8e583f 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -767,6 +767,15 @@ main (void)
{
struct hash_table *ht = make_string_hash_table (0);
char line[80];
+
+#ifdef ENABLE_NLS
+ /* Set the current locale. */
+ setlocale (LC_ALL, "");
+ /* Set the text message domain. */
+ bindtextdomain ("wget", LOCALEDIR);
+ textdomain ("wget");
+#endif /* ENABLE_NLS */
+
while ((fgets (line, sizeof (line), stdin)))
{
int len = strlen (line);
diff --git a/src/html-parse.c b/src/html-parse.c
index 20791cd8..f9418c70 100644
--- a/src/html-parse.c
+++ b/src/html-parse.c
@@ -1189,6 +1189,14 @@ int main ()
int read_count;
int tag_counter = 0;
+#ifdef ENABLE_NLS
+ /* Set the current locale. */
+ setlocale (LC_ALL, "");
+ /* Set the text message domain. */
+ bindtextdomain ("wget", LOCALEDIR);
+ textdomain ("wget");
+#endif /* ENABLE_NLS */
+
while ((read_count = fread (x + length, 1, size - length, stdin)))
{
length += read_count;
diff --git a/src/netrc.c b/src/netrc.c
index 5fc34ccf..bad574d0 100644
--- a/src/netrc.c
+++ b/src/netrc.c
@@ -455,6 +455,14 @@ main (int argc, char **argv)
file = argv[1];
target = argv[2];
+#ifdef ENABLE_NLS
+ /* Set the current locale. */
+ setlocale (LC_ALL, "");
+ /* Set the text message domain. */
+ bindtextdomain ("wget", LOCALEDIR);
+ textdomain ("wget");
+#endif /* ENABLE_NLS */
+
if (stat (file, &sb))
{
fprintf (stderr, _("%s: cannot stat %s: %s\n"), argv[0], file,
diff --git a/src/test.c b/src/test.c
index 68c4863b..c8351ca2 100644
--- a/src/test.c
+++ b/src/test.c
@@ -75,6 +75,14 @@ main (int argc _GL_UNUSED, char *argv[])
{
const char *result;
+#ifdef ENABLE_NLS
+ /* Set the current locale. */
+ setlocale (LC_ALL, "");
+ /* Set the text message domain. */
+ bindtextdomain ("wget", LOCALEDIR);
+ textdomain ("wget");
+#endif /* ENABLE_NLS */
+
program_name = argv[0];
result = all_tests();