Fixes from NetBSD via Thomas Klausner and Roland C. Dowdeswell

This commit is contained in:
Love Hornquist Astrand
2011-05-04 21:31:10 -07:00
parent 9a1a5e5da6
commit b1909b2daa
28 changed files with 337 additions and 782 deletions

View File

@@ -228,7 +228,6 @@ arg_printusage_i18n (struct getargs *args,
size_t i, max_len = 0;
char buf[128];
int col = 0, columns;
struct winsize ws;
if (progname == NULL)
progname = getprogname();
@@ -240,9 +239,7 @@ arg_printusage_i18n (struct getargs *args,
mandoc_template(args, num_args, progname, extra_string, i18n);
return;
}
if(get_window_size(2, &ws) == 0)
columns = ws.ws_col;
else
if(get_window_size(2, NULL, &columns) == -1)
columns = 80;
col = 0;
col += fprintf (stderr, "%s: %s", usage, progname);