aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-download.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-download.c')
-rw-r--r--src/fs/gnunet-download.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c
index f38805c2b..9e4a8c2f7 100644
--- a/src/fs/gnunet-download.c
+++ b/src/fs/gnunet-download.c
@@ -97,7 +97,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
97 { 97 {
98 case GNUNET_FS_STATUS_DOWNLOAD_START: 98 case GNUNET_FS_STATUS_DOWNLOAD_START:
99 if (verbose > 1) 99 if (verbose > 1)
100 fprintf (stderr, _("Starting download `%s'.\n"), 100 FPRINTF (stderr, _("Starting download `%s'.\n"),
101 info->value.download.filename); 101 info->value.download.filename);
102 break; 102 break;
103 case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS: 103 case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS:
@@ -108,7 +108,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
108 1000LL / 108 1000LL /
109 (info->value.download. 109 (info->value.download.
110 duration.rel_value + 1)); 110 duration.rel_value + 1));
111 fprintf (stdout, 111 FPRINTF (stdout,
112 _("Downloading `%s' at %llu/%llu (%s remaining, %s/s)\n"), 112 _("Downloading `%s' at %llu/%llu (%s remaining, %s/s)\n"),
113 info->value.download.filename, 113 info->value.download.filename,
114 (unsigned long long) info->value.download.completed, 114 (unsigned long long) info->value.download.completed,
@@ -118,7 +118,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
118 } 118 }
119 break; 119 break;
120 case GNUNET_FS_STATUS_DOWNLOAD_ERROR: 120 case GNUNET_FS_STATUS_DOWNLOAD_ERROR:
121 fprintf (stderr, _("Error downloading: %s.\n"), 121 FPRINTF (stderr, _("Error downloading: %s.\n"),
122 info->value.download.specifics.error.message); 122 info->value.download.specifics.error.message);
123 GNUNET_SCHEDULER_shutdown (); 123 GNUNET_SCHEDULER_shutdown ();
124 break; 124 break;
@@ -126,7 +126,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
126 s = GNUNET_STRINGS_byte_size_fancy (info->value.download.completed * 1000 / 126 s = GNUNET_STRINGS_byte_size_fancy (info->value.download.completed * 1000 /
127 (info->value.download. 127 (info->value.download.
128 duration.rel_value + 1)); 128 duration.rel_value + 1));
129 fprintf (stdout, _("Downloading `%s' done (%s/s).\n"), 129 FPRINTF (stdout, _("Downloading `%s' done (%s/s).\n"),
130 info->value.download.filename, s); 130 info->value.download.filename, s);
131 GNUNET_free (s); 131 GNUNET_free (s);
132 if (info->value.download.dc == dc) 132 if (info->value.download.dc == dc)
@@ -141,7 +141,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
141 case GNUNET_FS_STATUS_DOWNLOAD_INACTIVE: 141 case GNUNET_FS_STATUS_DOWNLOAD_INACTIVE:
142 break; 142 break;
143 default: 143 default:
144 fprintf (stderr, _("Unexpected status: %d\n"), info->status); 144 FPRINTF (stderr, _("Unexpected status: %d\n"), info->status);
145 break; 145 break;
146 } 146 }
147 return NULL; 147 return NULL;
@@ -166,27 +166,27 @@ run (void *cls, char *const *args, const char *cfgfile,
166 166
167 if (NULL == args[0]) 167 if (NULL == args[0])
168 { 168 {
169 fprintf (stderr, _("You need to specify a URI argument.\n")); 169 FPRINTF (stderr, "%s", _("You need to specify a URI argument.\n"));
170 return; 170 return;
171 } 171 }
172 uri = GNUNET_FS_uri_parse (args[0], &emsg); 172 uri = GNUNET_FS_uri_parse (args[0], &emsg);
173 if (NULL == uri) 173 if (NULL == uri)
174 { 174 {
175 fprintf (stderr, _("Failed to parse URI: %s\n"), emsg); 175 FPRINTF (stderr, _("Failed to parse URI: %s\n"), emsg);
176 GNUNET_free (emsg); 176 GNUNET_free (emsg);
177 ret = 1; 177 ret = 1;
178 return; 178 return;
179 } 179 }
180 if ((!GNUNET_FS_uri_test_chk (uri)) && (!GNUNET_FS_uri_test_loc (uri))) 180 if ((!GNUNET_FS_uri_test_chk (uri)) && (!GNUNET_FS_uri_test_loc (uri)))
181 { 181 {
182 fprintf (stderr, _("Only CHK or LOC URIs supported.\n")); 182 FPRINTF (stderr, "%s", _("Only CHK or LOC URIs supported.\n"));
183 ret = 1; 183 ret = 1;
184 GNUNET_FS_uri_destroy (uri); 184 GNUNET_FS_uri_destroy (uri);
185 return; 185 return;
186 } 186 }
187 if (NULL == filename) 187 if (NULL == filename)
188 { 188 {
189 fprintf (stderr, _("Target filename must be specified.\n")); 189 FPRINTF (stderr, "%s", _("Target filename must be specified.\n"));
190 ret = 1; 190 ret = 1;
191 GNUNET_FS_uri_destroy (uri); 191 GNUNET_FS_uri_destroy (uri);
192 return; 192 return;
@@ -200,7 +200,7 @@ run (void *cls, char *const *args, const char *cfgfile,
200 request_parallelism, GNUNET_FS_OPTIONS_END); 200 request_parallelism, GNUNET_FS_OPTIONS_END);
201 if (NULL == ctx) 201 if (NULL == ctx)
202 { 202 {
203 fprintf (stderr, _("Could not initialize `%s' subsystem.\n"), "FS"); 203 FPRINTF (stderr, _("Could not initialize `%s' subsystem.\n"), "FS");
204 GNUNET_FS_uri_destroy (uri); 204 GNUNET_FS_uri_destroy (uri);
205 ret = 1; 205 ret = 1;
206 return; 206 return;