diff options
author | Tar Committer <tar@ocjtech.us> | 2006-08-12 02:59:43 +0000 |
---|---|---|
committer | Tar Committer <tar@ocjtech.us> | 2006-08-12 02:59:43 +0000 |
commit | a0be206eb419f63eeb436631cc91b3456dff006f (patch) | |
tree | c6881dc33ba7c94bb44193930402067bbe4350f5 /bin/hpuifilter.c | |
parent | 1cc9f22072de1d314a67387aac57740fb25c5258 (diff) | |
download | rancid-a0be206eb419f63eeb436631cc91b3456dff006f.tar.gz rancid-a0be206eb419f63eeb436631cc91b3456dff006f.tar.xz rancid-a0be206eb419f63eeb436631cc91b3456dff006f.zip |
Imported from rancid-2.3.2a5.tar.gz.rancid-2.3.2a5
Diffstat (limited to 'bin/hpuifilter.c')
-rw-r--r-- | bin/hpuifilter.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/bin/hpuifilter.c b/bin/hpuifilter.c index a13c223..00a8833 100644 --- a/bin/hpuifilter.c +++ b/bin/hpuifilter.c @@ -1,7 +1,7 @@ /* - * $Id: hpuifilter.c,v 1.30 2005/09/29 16:58:16 heas Exp $ + * $Id: hpuifilter.c,v 1.33 2006/05/28 16:38:51 heas Exp $ * - * Copyright (C) 1997-2004 by Terrapin Communications, Inc. + * Copyright (C) 1997-2006 by Terrapin Communications, Inc. * All rights reserved. * * This software may be freely copied, modified and redistributed @@ -228,6 +228,17 @@ main(int argc, char **argv, char **ev) } if (child == 0) { + struct winsize ws; + + /* + * Make sure our terminal length and width are something greater + * than 1, for pagers on stupid boxes. + */ + ioctl(ptys, TIOCGWINSZ, &ws); + ws.ws_row = 24; + ws.ws_col = 132; + ioctl(ptys, TIOCSWINSZ, &ws); + signal(SIGCHLD, SIG_DFL); /* close the master pty & std* inherited from the parent */ close(ptym); @@ -454,9 +465,7 @@ main(int argc, char **argv, char **ev) } int -filter(buf, len) - char *buf; - int len; +filter(char *buf, int len) { static regmatch_t pmatch[1]; #define N_REG 13 /* number of regexes in reg[][] */ |