summaryrefslogtreecommitdiff
path: root/src/fs/gnunet-fs.c
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-09-06 22:46:29 +0000
committerng0 <ng0@n0.is>2019-09-06 22:46:29 +0000
commit6e599264ad13e8fc105493d74d7c11d46f8739ed (patch)
tree169bef1ecbade5a659831fb169f3ae6943af127f /src/fs/gnunet-fs.c
parent4f13bc15113021ebf71d5d81e99bc29f8a07fc9c (diff)
first step to remove plibc
Diffstat (limited to 'src/fs/gnunet-fs.c')
-rw-r--r--src/fs/gnunet-fs.c42
1 files changed, 28 insertions, 14 deletions
diff --git a/src/fs/gnunet-fs.c b/src/fs/gnunet-fs.c
index 26970c06a..ad2a8d6c5 100644
--- a/src/fs/gnunet-fs.c
+++ b/src/fs/gnunet-fs.c
@@ -55,7 +55,9 @@ static unsigned int verbose;
* @return GNUNET_OK to continue iteration
*/
static int
-print_indexed (void *cls, const char *filename, const struct GNUNET_HashCode * file_id)
+print_indexed (void *cls,
+ const char *filename,
+ const struct GNUNET_HashCode *file_id)
{
if (NULL == filename)
{
@@ -64,9 +66,9 @@ print_indexed (void *cls, const char *filename, const struct GNUNET_HashCode * f
return GNUNET_OK;
}
if (verbose)
- FPRINTF (stdout, "%s: %s\n", GNUNET_h2s (file_id), filename);
+ fprintf (stdout, "%s: %s\n", GNUNET_h2s (file_id), filename);
else
- FPRINTF (stdout, "%s\n", filename);
+ fprintf (stdout, "%s\n", filename);
return GNUNET_OK;
}
@@ -80,12 +82,18 @@ print_indexed (void *cls, const char *filename, const struct GNUNET_HashCode * f
* @param cfg configuration
*/
static void
-run (void *cls, char *const *args, const char *cfgfile,
+run (void *cls,
+ char *const *args,
+ const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
if (list_indexed_files)
{
- fs = GNUNET_FS_start (cfg, "gnunet-fs", NULL, NULL, GNUNET_FS_FLAGS_NONE,
+ fs = GNUNET_FS_start (cfg,
+ "gnunet-fs",
+ NULL,
+ NULL,
+ GNUNET_FS_FLAGS_NONE,
GNUNET_FS_OPTIONS_END);
if (NULL == fs)
{
@@ -115,21 +123,27 @@ main (int argc, char *const *argv)
struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_option_flag ('i',
- "list-indexed",
- gettext_noop ("print a list of all indexed files"),
- &list_indexed_files),
+ "list-indexed",
+ gettext_noop (
+ "print a list of all indexed files"),
+ &list_indexed_files),
GNUNET_GETOPT_option_verbose (&verbose),
- GNUNET_GETOPT_OPTION_END
- };
+ GNUNET_GETOPT_OPTION_END};
if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
return 2;
ret = (GNUNET_OK ==
- GNUNET_PROGRAM_run (argc, argv, "gnunet-fs [OPTIONS]",
- gettext_noop ("Special file-sharing operations"),
- options, &run, NULL)) ? ret : 1;
- GNUNET_free ((void*) argv);
+ GNUNET_PROGRAM_run (argc,
+ argv,
+ "gnunet-fs [OPTIONS]",
+ gettext_noop ("Special file-sharing operations"),
+ options,
+ &run,
+ NULL))
+ ? ret
+ : 1;
+ GNUNET_free ((void *) argv);
return ret;
}