Mercurial > hg > toybox
diff lib/lib.h @ 1108:fb8467436e6a draft
Tweak terminal_size to never set either to 0, and return true/false whether it could determine at least one coordinate.
(If you set $COLUMNS but not $ROWS, we assume you're happy with the 80x25 default for the other.)
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 07 Nov 2013 09:04:50 -0600 |
parents | 77235d224b1d |
children | 349424387e22 |
line wrap: on
line diff
--- a/lib/lib.h Sun Nov 03 17:09:33 2013 -0600 +++ b/lib/lib.h Thu Nov 07 09:04:50 2013 -0600 @@ -156,7 +156,7 @@ void delete_tempfile(int fdin, int fdout, char **tempname); void replace_tempfile(int fdin, int fdout, char **tempname); void crc_init(unsigned int *crc_table, int little_endian); -void terminal_size(unsigned *x, unsigned *y); +int terminal_size(unsigned *x, unsigned *y); int yesno(char *prompt, int def); void names_to_pid(char **names, int (*callback)(pid_t pid, char *name));