mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 06:13:02 +00:00
diagnostics: get the screen width from the terminal
* bootstrap.conf: We need winsz-ioctl and winsz-termios. * src/location.c (columns): Use winsize to get the number of columns. Code taken from the GNU Coreutils. * src/location.h, src/location.c (caret_init): New. * src/complain.c (complain_init): Call it. * tests/bison.in: Export COLUMNS so that users of tests/bison can enjoy proper line truncation.
This commit is contained in:
@@ -114,6 +114,9 @@ void location_compute (location *loc,
|
||||
Warning: uses quotearg's slot 3. */
|
||||
unsigned location_print (location loc, FILE *out);
|
||||
|
||||
/* Prepare the use of location_caret. */
|
||||
void caret_init (void);
|
||||
|
||||
/* Free any allocated resources and close any open file handles that are
|
||||
left-over by the usage of location_caret. */
|
||||
void caret_free (void);
|
||||
|
||||
Reference in New Issue
Block a user