pv 1.7.18 doesn't use the whole terminal width #72

Closed
opened 2023-07-30 00:55:44 +00:00 by andrew-schulman · 4 comments
andrew-schulman commented 2023-07-30 00:55:44 +00:00 (Migrated from github.com)

In Cygwin, the output of pv 1.7.18 is always 80 characters wide, even when the terminal is wider, for example 199 columns as here:

$ pv -S -s 100G < /dev/zero > /dev/null
 100GiB 0:00:11 [8.73GiB/s] [================================>] 100%

$ echo $COLUMNS
199

pv 1.7.0 does use the whole terminal width in Cygwin.

In Cygwin, the output of pv 1.7.18 is always 80 characters wide, even when the terminal is wider, for example 199 columns as here: ``` $ pv -S -s 100G < /dev/zero > /dev/null 100GiB 0:00:11 [8.73GiB/s] [================================>] 100% $ echo $COLUMNS 199 ``` pv 1.7.0 does use the whole terminal width in Cygwin.
a-j-wood commented 2023-07-30 15:59:16 +00:00 (Migrated from github.com)

Confirmed that I can reproduce this on my own Cygwin installation using the example you have provided.

The fault appears to be caused by the configure and autoheader changes. In src/pv/display.c there is a check for "HAVE_TERMIOS_H", but this is no longer defined in config.h.

As a short term workaround, after running "configure", edit src/include/config.h and add

#define HAVE_TERMIOS_H 1

to the end of it, then run "make".

I have committed a fix to the main branch. If you would like to confirm that it works for you, please download the latest code (e.g. "git clone https://github.com/a-j-wood/pv.git") and then run "./generate.sh && ./configure && make". Thanks.

Confirmed that I can reproduce this on my own Cygwin installation using the example you have provided. The fault appears to be caused by the configure and autoheader changes. In `src/pv/display.c` there is a check for "`HAVE_TERMIOS_H`", but this is no longer defined in `config.h`. As a short term workaround, after running "`configure`", edit `src/include/config.h` and add #define HAVE_TERMIOS_H 1 to the end of it, then run "`make`". I have committed a fix to the main branch. If you would like to confirm that it works for you, please download the latest code (e.g. "`git clone https://github.com/a-j-wood/pv.git`") and then run "`./generate.sh && ./configure && make`". Thanks.
andrew-schulman commented 2023-07-30 18:53:14 +00:00 (Migrated from github.com)

Confirmed that the problem is fixed in main. Thanks! Once you make a new release I'll push it out to Cygwin.

Confirmed that the problem is fixed in main. Thanks! Once you make a new release I'll push it out to Cygwin.
a-j-wood commented 2023-07-30 19:00:24 +00:00 (Migrated from github.com)

Thanks. A new release is imminent, since I expect that this fault was not confined only to the Cygwin platform.

Thanks. A new release is imminent, since I expect that this fault was not confined only to the Cygwin platform.
a-j-wood commented 2023-07-30 19:54:31 +00:00 (Migrated from github.com)

Version 1.7.24 now released.

Version 1.7.24 now released.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: a-j-wood/pv#72
There is no content yet.