diff options
Diffstat (limited to 'src/fs/gnunet-download.c')
-rw-r--r-- | src/fs/gnunet-download.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c index eda6765ab..14a43e6ec 100644 --- a/src/fs/gnunet-download.c +++ b/src/fs/gnunet-download.c | |||
@@ -87,13 +87,8 @@ display_bar(unsigned long long x, unsigned long long n, unsigned int w) | |||
87 | unsigned int endeq; | 87 | unsigned int endeq; |
88 | float ratio_complete; | 88 | float ratio_complete; |
89 | 89 | ||
90 | #if !WINDOWS | ||
91 | if (0 == isatty(1)) | 90 | if (0 == isatty(1)) |
92 | return; | 91 | return; |
93 | #else | ||
94 | if (FILE_TYPE_CHAR != GetFileType(GetStdHandle(STD_OUTPUT_HANDLE))) | ||
95 | return; | ||
96 | #endif | ||
97 | ratio_complete = x / (float)n; | 92 | ratio_complete = x / (float)n; |
98 | endeq = ratio_complete * w; | 93 | endeq = ratio_complete * w; |
99 | GNUNET_snprintf(buf, sizeof(buf), "%3d%% [", (int)(ratio_complete * 100)); | 94 | GNUNET_snprintf(buf, sizeof(buf), "%3d%% [", (int)(ratio_complete * 100)); |
@@ -175,13 +170,8 @@ progress_cb(void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
175 | break; | 170 | break; |
176 | 171 | ||
177 | case GNUNET_FS_STATUS_DOWNLOAD_ERROR: | 172 | case GNUNET_FS_STATUS_DOWNLOAD_ERROR: |
178 | #if !WINDOWS | ||
179 | if (0 != isatty(1)) | 173 | if (0 != isatty(1)) |
180 | fprintf(stdout, "\n"); | 174 | fprintf(stdout, "\n"); |
181 | #else | ||
182 | if (FILE_TYPE_CHAR == GetFileType(GetStdHandle(STD_OUTPUT_HANDLE))) | ||
183 | fprintf(stdout, "\n"); | ||
184 | #endif | ||
185 | fprintf(stderr, | 175 | fprintf(stderr, |
186 | _("Error downloading: %s.\n"), | 176 | _("Error downloading: %s.\n"), |
187 | info->value.download.specifics.error.message); | 177 | info->value.download.specifics.error.message); |
@@ -192,13 +182,8 @@ progress_cb(void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
192 | s = GNUNET_STRINGS_byte_size_fancy( | 182 | s = GNUNET_STRINGS_byte_size_fancy( |
193 | info->value.download.completed * 1000 / | 183 | info->value.download.completed * 1000 / |
194 | (info->value.download.duration.rel_value_us + 1)); | 184 | (info->value.download.duration.rel_value_us + 1)); |
195 | #if !WINDOWS | ||
196 | if (0 != isatty(1)) | 185 | if (0 != isatty(1)) |
197 | fprintf(stdout, "\n"); | 186 | fprintf(stdout, "\n"); |
198 | #else | ||
199 | if (FILE_TYPE_CHAR == GetFileType(GetStdHandle(STD_OUTPUT_HANDLE))) | ||
200 | fprintf(stdout, "\n"); | ||
201 | #endif | ||
202 | fprintf(stdout, | 187 | fprintf(stdout, |
203 | _("Downloading `%s' done (%s/s).\n"), | 188 | _("Downloading `%s' done (%s/s).\n"), |
204 | info->value.download.filename, | 189 | info->value.download.filename, |