From 3163087b04ca5c297a7c98c018ba5c30e850a11e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 28 Apr 2014 13:41:33 +0200 Subject: Fix missing ScreenWidth check in apt.cc --- cmdline/apt-get.cc | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'cmdline/apt-get.cc') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index caf69da2a..566103f8c 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1664,20 +1664,6 @@ static bool ShowHelp(CommandLine &) "pages for more information and options.\n" " This APT has Super Cow Powers.\n"); return true; -} - /*}}}*/ -// SigWinch - Window size change signal handler /*{{{*/ -// --------------------------------------------------------------------- -/* */ -static void SigWinch(int) -{ - // Riped from GNU ls -#ifdef TIOCGWINSZ - struct winsize ws; - - if (ioctl(1, TIOCGWINSZ, &ws) != -1 && ws.ws_col >= 5) - ScreenWidth = ws.ws_col - 1; -#endif } /*}}}*/ int main(int argc,const char *argv[]) /*{{{*/ @@ -1734,14 +1720,12 @@ int main(int argc,const char *argv[]) /*{{{*/ // see if we are in simulate mode CheckSimulateMode(CmdL); + // Init the signals + InitSignals(); + // Setup the output streams InitOutput(); - // Setup the signals - signal(SIGPIPE,SIG_IGN); - signal(SIGWINCH,SigWinch); - SigWinch(0); - // Match the operation CmdL.DispatchArg(Cmds); -- cgit v1.2.3