From: Christian Grothoff Date: Sun, 17 Jun 2012 14:47:11 +0000 (+0000) Subject: -LRN: isatty equivalent for w32 X-Git-Tag: initial-import-from-subversion-38251~13012 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=af6398009fc46d35ba447dc2b666fc7a97b53258;p=oweals%2Fgnunet.git -LRN: isatty equivalent for w32 --- 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, unsigned int endeq; float ratio_complete; -#ifndef MINGW +#if !WINDOWS if (0 == isatty (1)) return; +#else + if (FILE_TYPE_CHAR != GetFileType (GetStdHandle (STD_OUTPUT_HANDLE))) + return; #endif ratio_complete = x/(float)n; endeq = ratio_complete * w;