1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

xz: Use is_tty() in message.c.

This commit is contained in:
Jia Tan 2023-11-23 22:13:39 +08:00
parent 584e3a258f
commit 2ab2e4b5a5

View file

@ -15,11 +15,6 @@
#include <stdarg.h> #include <stdarg.h>
#ifdef _MSC_VER
# include <io.h>
# define isatty _isatty
#endif
/// Number of the current file /// Number of the current file
static unsigned int files_pos = 0; static unsigned int files_pos = 0;
@ -125,7 +120,7 @@ message_init(void)
// exception, even if --verbose was not used, user can send SIGALRM // exception, even if --verbose was not used, user can send SIGALRM
// to make us print progress information once without automatic // to make us print progress information once without automatic
// updating. // updating.
progress_automatic = isatty(STDERR_FILENO); progress_automatic = is_tty(STDERR_FILENO);
// Commented out because COLUMNS is rarely exported to environment. // Commented out because COLUMNS is rarely exported to environment.
// Most users have at least 80 columns anyway, let's think something // Most users have at least 80 columns anyway, let's think something