diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-06-17 14:47:11 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-06-17 14:47:11 +0000 |
commit | af6398009fc46d35ba447dc2b666fc7a97b53258 (patch) | |
tree | 39a6d4dda7c3f7b6a7aa9ba871698ea4f59be201 /src/fs/gnunet-download.c | |
parent | 7199d671c2a1003f5d96a25cd91530ab519f200b (diff) | |
download | gnunet-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.c | 5 |
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; |