aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-download.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-06-17 14:47:11 +0000
committerChristian Grothoff <christian@grothoff.org>2012-06-17 14:47:11 +0000
commitaf6398009fc46d35ba447dc2b666fc7a97b53258 (patch)
tree39a6d4dda7c3f7b6a7aa9ba871698ea4f59be201 /src/fs/gnunet-download.c
parent7199d671c2a1003f5d96a25cd91530ab519f200b (diff)
downloadgnunet-af6398009fc46d35ba447dc2b666fc7a97b53258.tar.gz
gnunet-af6398009fc46d35ba447dc2b666fc7a97b53258.zip
-LRN: isatty equivalent for w32
Diffstat (limited to 'src/fs/gnunet-download.c')
-rw-r--r--src/fs/gnunet-download.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c
index aa1da8f3d..e3fb10947 100644
--- a/src/fs/gnunet-download.c
+++ b/src/fs/gnunet-download.c
@@ -91,9 +91,12 @@ display_bar (unsigned long long x,
91 unsigned int endeq; 91 unsigned int endeq;
92 float ratio_complete; 92 float ratio_complete;
93 93
94#ifndef MINGW 94#if !WINDOWS
95 if (0 == isatty (1)) 95 if (0 == isatty (1))
96 return; 96 return;
97#else
98 if (FILE_TYPE_CHAR != GetFileType (GetStdHandle (STD_OUTPUT_HANDLE)))
99 return;
97#endif 100#endif
98 ratio_complete = x/(float)n; 101 ratio_complete = x/(float)n;
99 endeq = ratio_complete * w; 102 endeq = ratio_complete * w;