+2007-09-24 Ben Pfaff <blp@gnu.org>
+
+ Patch #6210. Reviewed by John Darrington.
+ * settings.c: Drop "long view", which is not needed any longer.
+ (static var long_view): Removed.
+ (force_long_view): Removed.
+ (get_viewwidth): Removed.
+ (init_viewport): Removed long_view reference.
+
2007-09-19 John Darrington <john@darrington.wattle.id.au>
* settings.c settings.h: Changed viewport's length and width to be
static int *viewlength = NULL;
static int *viewwidth = NULL;
-static bool long_view = false;
static bool safer_mode = false;
*viewlength = viewlength_;
}
-/* Set view width to a very long value, and prevent it from ever
- changing. */
-void
-force_long_view (void)
-{
- long_view = true;
-}
-
/* Screen width. */
int
get_viewwidth(void)
{
- if (long_view)
- return 9999;
-
return *viewwidth;
}
{
viewwidth = width;
viewlength = length;
-
- if (long_view)
- return;
-
}
/* Whether PSPP can erase and overwrite files. */
void settings_init (int *, int *);
void settings_done (void);
-void force_long_view (void);
int get_viewlength (void);
void set_viewlength (int);
2007-09-24 Ben Pfaff <blp@gnu.org>
+ Patch #6210. Reviewed by John Darrington.
* main.c (set_fallback_viewport): Make code easier to understand.
(get_termcap_viewport): Ditto.
- Reviewed by John Darrington.
+
+ * command-line.c (parse_command_line): Don't call force_long_view,
+ as that function is no longer necessary.
+
+ * msg-ui.c (handle_msg): Only wrap message output to the message
+ file to the width of the terminal if the message file is a tty.
2007-09-19 John Darrington <john@darrington.wattle.id.au>
puts (legal);
return false;
case 'T':
- force_long_view ();
set_testing_mode (true);
break;
case '?':
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
ds_put_cstr (&string, m->text);
if (msg_file != stdout || get_error_routing_to_terminal ())
- dump_message (ds_cstr (&string), get_viewwidth (), 8,
+ dump_message (ds_cstr (&string),
+ isatty (fileno (msg_file)) ? get_viewwidth () : INT_MAX, 8,
write_stream, msg_file);
dump_message (ds_cstr (&string), 78, 0, write_journal, NULL);