From: John Darrington Date: Sat, 25 Feb 2012 11:22:32 +0000 (+0100) Subject: ascii.c: Move auto out of the #if HAVE_DECL_SIGWINCH condtional X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c70826f9e59d2008305ed8305554a532851f6d9;p=pspp ascii.c: Move auto out of the #if HAVE_DECL_SIGWINCH condtional Whether or not the width/length should be automatic should depend only on whether the output is a terminal, and not upon the existance of SIGWINCH --- diff --git a/src/output/ascii.c b/src/output/ascii.c index 7804ade3f4..d121987a20 100644 --- a/src/output/ascii.c +++ b/src/output/ascii.c @@ -1085,19 +1085,19 @@ ascii_open_page (struct ascii_driver *a) a->file = fn_open (a->file_name, a->append ? "a" : "w"); if (a->file != NULL) { -#if HAVE_DECL_SIGWINCH if ( isatty (fileno (a->file))) { +#if HAVE_DECL_SIGWINCH struct sigaction action; sigemptyset (&action.sa_mask); action.sa_flags = 0; action.sa_handler = winch_handler; the_driver = a; + sigaction (SIGWINCH, &action, NULL); +#endif a->auto_width = true; a->auto_length = true; - sigaction (SIGWINCH, &action, NULL); } -#endif } else {