X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=help.c;h=14eefc91ced3890975d0833ffc83971c7986858b;hb=a12c6b0149e3dadd0701dac4fd0ba2463d251650;hp=cbbe966f685b276cac702bb0fd9a44bfbf5f0e79;hpb=4daf6fc837f7cc84335958b9d9e8a29e41b4ee8e;p=git.git diff --git a/help.c b/help.c index cbbe966f6..14eefc91c 100644 --- a/help.c +++ b/help.c @@ -5,28 +5,6 @@ #include "help.h" #include "common-cmds.h" -/* most GUI terminals set COLUMNS (although some don't export it) */ -static int term_columns(void) -{ - char *col_string = getenv("COLUMNS"); - int n_cols; - - if (col_string && (n_cols = atoi(col_string)) > 0) - return n_cols; - -#ifdef TIOCGWINSZ - { - struct winsize ws; - if (!ioctl(1, TIOCGWINSZ, &ws)) { - if (ws.ws_col) - return ws.ws_col; - } - } -#endif - - return 80; -} - void add_cmdname(struct cmdnames *cmds, const char *name, int len) { struct cmdname *ent = xmalloc(sizeof(*ent) + len + 1);