From: Ben Pfaff Date: Sun, 26 Aug 2007 18:26:29 +0000 (+0000) Subject: Send error message to non-screen output devices also, if routing to X-Git-Tag: v0.6.0~295 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2ccb1b5f0ad814c1e6fcbc8f1ecaa62913b7e53;p=pspp-builds.git Send error message to non-screen output devices also, if routing to listing files is enabled. Bug #17238. Thanks to John Darrington for review. * command/aggregate.sh: Update output to include error messages, which are now sent to output files also. * devices: Change raw-ascii from screen to listing device (because that's how it's used). --- diff --git a/config/ChangeLog b/config/ChangeLog index b865ad2d..93c9e809 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,8 @@ +2007-08-26 Ben Pfaff + + * devices: Change raw-ascii from screen to listing device (because + that's how it's used). + 2007-07-25 Ben Pfaff * devices: Add tty and listing devices that use VT100 (and xterm) diff --git a/config/devices b/config/devices index 32d51bef..7da8eac8 100644 --- a/config/devices +++ b/config/devices @@ -53,7 +53,7 @@ tty-ascii:ascii:screen:squeeze=on headers=off top-margin=0 bottom-margin=0 \ paginate=off length=${viewlength} width=${viewwidth} \ output-file=${tty-output-file} list-ascii:ascii:listing:length=66 width=79 output-file=${list-output-file} -raw-ascii:ascii:screen:width=9999 length=9999 output-file=${list-output-file} \ +raw-ascii:ascii:listing:width=9999 length=9999 output-file=${list-output-file} \ emphasis=none headers=off paginate=off squeeze=on \ top-margin=0 bottom-margin=0 diff --git a/src/ui/terminal/ChangeLog b/src/ui/terminal/ChangeLog index 079aee78..b3063bd2 100644 --- a/src/ui/terminal/ChangeLog +++ b/src/ui/terminal/ChangeLog @@ -1,3 +1,9 @@ +2007-08-26 Ben Pfaff + + * msg-ui.c (handle_msg): Send error message to non-screen output + devices also, if routing to listing files is enabled. Bug + #17238. Thanks to John Darrington for review. + 2007-08-23 Ben Pfaff Implement journaling. Bug #17240. diff --git a/src/ui/terminal/msg-ui.c b/src/ui/terminal/msg-ui.c index b51a3e55..93c3683f 100644 --- a/src/ui/terminal/msg-ui.c +++ b/src/ui/terminal/msg-ui.c @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include #include #include @@ -177,6 +179,16 @@ handle_msg (const struct msg *m) dump_message (ds_cstr (&string), 78, 0, write_journal, NULL); + if (get_error_routing_to_listing ()) + { + /* Disable screen output devices, because the error should + already have been reported to the screen with the + dump_message call above. */ + outp_enable_device (false, OUTP_DEV_SCREEN); + tab_output_text (TAB_LEFT, ds_cstr (&string)); + outp_enable_device (true, OUTP_DEV_SCREEN); + } + ds_destroy (&string); } diff --git a/tests/ChangeLog b/tests/ChangeLog index dc2c7f98..6c378de6 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,10 @@ +2007-08-26 Ben Pfaff + + * command/aggregate.sh: Update output to include error messages, + which are now sent to output files also. + + * command/ranks.h: Ditto. + 2007-08-12 Ben Pfaff * command/no_case_size.sh: Update to match update DISPLAY and diff --git a/tests/command/aggregate.sh b/tests/command/aggregate.sh index 3cdd84db..b9540181 100755 --- a/tests/command/aggregate.sh +++ b/tests/command/aggregate.sh @@ -150,6 +150,10 @@ EOF activity="expected output (itemwise missing) create" cat > agg-itemwise.out < agg-columnwise.out <