summaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-06-10 22:47:57 +0000
committerChristian Grothoff <christian@grothoff.org>2012-06-10 22:47:57 +0000
commit7e5c0a94bacdfe6e1c65035b16fd97a77398df12 (patch)
tree70380ec85a0f4841247de81e8359e063da7486c1 /src/fs
parentdf62a12c9b51fd13cc37058d4a88a32d93386d79 (diff)
LRN: new utf8 argv converter for W32, converting strings on command-line to UTF-8 for all command-line tools.
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/gnunet-directory.c4
-rw-r--r--src/fs/gnunet-download.c4
-rw-r--r--src/fs/gnunet-fs.c4
-rw-r--r--src/fs/gnunet-helper-fs-publish.c5
-rw-r--r--src/fs/gnunet-pseudonym.c4
-rw-r--r--src/fs/gnunet-publish.c4
-rw-r--r--src/fs/gnunet-search.c4
-rw-r--r--src/fs/gnunet-unindex.c4
8 files changed, 32 insertions, 1 deletions
diff --git a/src/fs/gnunet-directory.c b/src/fs/gnunet-directory.c
index c722f57ff..4122cb154 100644
--- a/src/fs/gnunet-directory.c
+++ b/src/fs/gnunet-directory.c
@@ -173,6 +173,10 @@ main (int argc, char *const *argv)
static struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_OPTION_END
};
+
+ if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
+ return 2;
+
return (GNUNET_OK ==
GNUNET_PROGRAM_run (argc, argv, "gnunet-directory [OPTIONS] FILENAME",
gettext_noop
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c
index 5a66aea27..bd5b09c0d 100644
--- a/src/fs/gnunet-download.c
+++ b/src/fs/gnunet-download.c
@@ -272,6 +272,10 @@ main (int argc, char *const *argv)
0, &GNUNET_GETOPT_increment_value, &verbose},
GNUNET_GETOPT_OPTION_END
};
+
+ if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
+ return 2;
+
return (GNUNET_OK ==
GNUNET_PROGRAM_run (argc, argv, "gnunet-download [OPTIONS] URI",
gettext_noop
diff --git a/src/fs/gnunet-fs.c b/src/fs/gnunet-fs.c
index 0b2892371..404c64e4d 100644
--- a/src/fs/gnunet-fs.c
+++ b/src/fs/gnunet-fs.c
@@ -119,6 +119,10 @@ main (int argc, char *const *argv)
GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
GNUNET_GETOPT_OPTION_END
};
+
+ if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
+ return 2;
+
return (GNUNET_OK ==
GNUNET_PROGRAM_run (argc, argv, "gnunet-fs [OPTIONS]",
gettext_noop ("Special file-sharing operations"),
diff --git a/src/fs/gnunet-helper-fs-publish.c b/src/fs/gnunet-helper-fs-publish.c
index 86b02492d..45f6d588d 100644
--- a/src/fs/gnunet-helper-fs-publish.c
+++ b/src/fs/gnunet-helper-fs-publish.c
@@ -413,7 +413,7 @@ extract_files (struct ScanTreeNode *item)
* @return 0 on success
*/
int main(int argc,
- char **argv)
+ char *const *argv)
{
const char *filename_expanded;
const char *ex;
@@ -424,6 +424,9 @@ int main(int argc,
* binary mode.
*/
_setmode (1, _O_BINARY);
+ /* Get utf-8-encoded arguments */
+ if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
+ return 5;
#endif
/* parse command line */
diff --git a/src/fs/gnunet-pseudonym.c b/src/fs/gnunet-pseudonym.c
index 38826d1de..2b1b897c2 100644
--- a/src/fs/gnunet-pseudonym.c
+++ b/src/fs/gnunet-pseudonym.c
@@ -313,6 +313,10 @@ main (int argc, char *const *argv)
};
bo.expiration_time =
GNUNET_FS_year_to_time (GNUNET_FS_get_current_year () + 2);
+
+ if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
+ return 2;
+
return (GNUNET_OK ==
GNUNET_PROGRAM_run (argc, argv, "gnunet-pseudonym [OPTIONS]",
gettext_noop ("Manage GNUnet pseudonyms."),
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c
index a1b26dbd5..24e49d369 100644
--- a/src/fs/gnunet-publish.c
+++ b/src/fs/gnunet-publish.c
@@ -736,6 +736,10 @@ main (int argc, char *const *argv)
"GNUnet publish starts\n");
bo.expiration_time =
GNUNET_FS_year_to_time (GNUNET_FS_get_current_year () + 2);
+
+ if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
+ return 2;
+
return (GNUNET_OK ==
GNUNET_PROGRAM_run (argc, argv, "gnunet-publish [OPTIONS] FILENAME",
gettext_noop
diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c
index 60620a4b3..88507f608 100644
--- a/src/fs/gnunet-search.c
+++ b/src/fs/gnunet-search.c
@@ -302,6 +302,10 @@ main (int argc, char *const *argv)
1, &GNUNET_GETOPT_set_uint, &results_limit},
GNUNET_GETOPT_OPTION_END
};
+
+ if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
+ return 2;
+
return (GNUNET_OK ==
GNUNET_PROGRAM_run (argc, argv, "gnunet-search [OPTIONS] KEYWORD",
gettext_noop
diff --git a/src/fs/gnunet-unindex.c b/src/fs/gnunet-unindex.c
index 3e8308df2..f4e352737 100644
--- a/src/fs/gnunet-unindex.c
+++ b/src/fs/gnunet-unindex.c
@@ -170,6 +170,10 @@ main (int argc, char *const *argv)
0, &GNUNET_GETOPT_set_one, &verbose},
GNUNET_GETOPT_OPTION_END
};
+
+ if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
+ return 2;
+
return (GNUNET_OK ==
GNUNET_PROGRAM_run (argc, argv, "gnunet-unindex [OPTIONS] FILENAME",
gettext_noop