[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] pspp config/ChangeLog config/devices src/data/C...
From: |
Ben Pfaff |
Subject: |
[Pspp-cvs] pspp config/ChangeLog config/devices src/data/C... |
Date: |
Fri, 27 Jul 2007 22:58:03 +0000 |
CVSROOT: /cvsroot/pspp
Module name: pspp
Changes by: Ben Pfaff <blp> 07/07/27 22:58:03
Modified files:
config : ChangeLog devices
src/data : ChangeLog file-name.c settings.c
src/libpspp : ChangeLog automake.mk getl.c
src/output : ChangeLog ascii.c html.c manager.c manager.h
output.c output.h postscript.c
src/ui/terminal: ChangeLog command-line.c read-line.c
Log message:
Make interactive output go to the terminal (bug #17213), by
causing the UI to flush output to the user when it prompts for a
command.
Thanks to John Darrington for review.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/config/ChangeLog?cvsroot=pspp&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/pspp/config/devices?cvsroot=pspp&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/ChangeLog?cvsroot=pspp&r1=1.144&r2=1.145
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/file-name.c?cvsroot=pspp&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/settings.c?cvsroot=pspp&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/pspp/src/libpspp/ChangeLog?cvsroot=pspp&r1=1.75&r2=1.76
http://cvs.savannah.gnu.org/viewcvs/pspp/src/libpspp/automake.mk?cvsroot=pspp&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/pspp/src/libpspp/getl.c?cvsroot=pspp&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/ChangeLog?cvsroot=pspp&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/ascii.c?cvsroot=pspp&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/html.c?cvsroot=pspp&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/manager.c?cvsroot=pspp&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/manager.h?cvsroot=pspp&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/output.c?cvsroot=pspp&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/output.h?cvsroot=pspp&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/postscript.c?cvsroot=pspp&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/terminal/ChangeLog?cvsroot=pspp&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/terminal/command-line.c?cvsroot=pspp&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/terminal/read-line.c?cvsroot=pspp&r1=1.15&r2=1.16
Patches:
Index: config/ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/config/ChangeLog,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- config/ChangeLog 5 Apr 2006 03:21:07 -0000 1.5
+++ config/ChangeLog 27 Jul 2007 22:58:02 -0000 1.6
@@ -1,3 +1,8 @@
+2007-07-25 Ben Pfaff <address@hidden>
+
+ * devices: Add an "interactive" category that defaults to
+ tty-ascii. Make the tty-ascii device more user-friendly.
+
Tue Apr 4 20:20:49 2006 Ben Pfaff <address@hidden>
* automake.mk: Fix bugs in installation targets.
Index: config/devices
===================================================================
RCS file: /cvsroot/pspp/pspp/config/devices,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- config/devices 3 Apr 2006 20:07:54 -0000 1.6
+++ config/devices 27 Jul 2007 22:58:02 -0000 1.7
@@ -41,16 +41,17 @@
# referenced with $var or ${var} syntax; the latter is preferred.
# Preferred devices.
-default=tty list
-tty=#tty-ibmpc
-list=list-ascii
+default=list-ascii
+interactive=tty-ascii
# Output files.
-define tty-output-file "/dev/tty"
+define tty-output-file "|more"
define list-output-file "pspp.list"
# Generic ASCII devices
-tty-ascii:ascii:screen:output-file=${tty-output-file}
+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} \
emphasis=none headers=off paginate=off squeeze=on \
Index: src/data/ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/data/ChangeLog,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -b -r1.144 -r1.145
--- src/data/ChangeLog 26 Jul 2007 02:02:22 -0000 1.144
+++ src/data/ChangeLog 27 Jul 2007 22:58:02 -0000 1.145
@@ -1,3 +1,17 @@
+2007-07-25 Ben Pfaff <address@hidden>
+
+ Fix bugs related to bug #17213.
+
+ * settings.c: Use HAVE_LIBNCURSES instead of HAVE_LIBTERMCAP,
+ since the former is what config.h has. Include the needed ncurses
+ headers.
+ (static var echo) Rename to `do_echo' because the original name is
+ the same as an ncurses identifier.
+ (get_termcap_viewport) Use error instead of msg.
+
+ * file-name.c (fn_interp_vars): Fix interpolation of $VARS.
+ (fn_close): Don't close stdin, stdout, stderr.
+
2007-07-26 John Darrington <address@hidden>
* procedure.c procedure.h: Added callbacks which get invoked whenever
Index: src/data/file-name.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/data/file-name.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- src/data/file-name.c 7 Jul 2007 06:14:08 -0000 1.14
+++ src/data/file-name.c 27 Jul 2007 22:58:02 -0000 1.15
@@ -87,7 +87,7 @@
else if (ss_match_char (&src, '{'))
ss_get_until (&src, '}', &var_name);
else
- ss_get_chars (&src, MIN (1, ss_span (src, ss_cstr (CC_ALNUM))),
+ ss_get_chars (&src, MAX (1, ss_span (src, ss_cstr (CC_ALNUM))),
&var_name);
start = ds_length (&dst);
@@ -305,7 +305,9 @@
int
fn_close (const char *fn, FILE *f)
{
- if (!strcmp (fn, "-"))
+ if (fileno (f) == STDIN_FILENO
+ || fileno (f) == STDOUT_FILENO
+ || fileno (f) == STDERR_FILENO)
return 0;
#if HAVE_POPEN
else if (fn[0] == '|' || (*fn && fn[strlen (fn) - 1] == '|'))
Index: src/data/settings.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/data/settings.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- src/data/settings.c 7 Jul 2007 06:14:10 -0000 1.9
+++ src/data/settings.c 27 Jul 2007 22:58:02 -0000 1.10
@@ -1,5 +1,5 @@
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006, 2007 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,13 +24,23 @@
#include "xalloc.h"
#include <libpspp/i18n.h>
+#include "error.h"
+
+#ifdef HAVE_LIBNCURSES
+#include <curses.h>
+#include <term.h>
+#endif
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
static int viewlength = 24;
static int viewwidth = 79;
static bool long_view = false;
static bool safer_mode = false;
-static bool echo = false;
+static bool do_echo = false;
static bool include = true;
static int epoch = -1;
@@ -121,7 +131,7 @@
viewwidth = viewwidth_;
}
-#if HAVE_LIBTERMCAP
+#if HAVE_LIBNCURSES
static void
get_termcap_viewport (void)
{
@@ -130,7 +140,8 @@
return;
else if (tgetent (term_buffer, getenv ("TERM")) <= 0)
{
- msg (IE, _("Could not access definition for terminal `%s'."), termtype);
+ error (0,0, _("could not access definition for terminal `%s'"),
+ getenv ("TERM"));
return;
}
@@ -140,7 +151,7 @@
if (tgetnum ("co") > 1)
viewwidth = tgetnum ("co") - 1;
}
-#endif /* HAVE_LIBTERMCAP */
+#endif /* HAVE_LIBNCURSES */
static void
init_viewport (void)
@@ -150,9 +161,9 @@
viewwidth = viewlength = -1;
-#if HAVE_LIBTERMCAP
+#if HAVE_LIBNCURSES
get_termcap_viewport ();
-#endif /* HAVE_LIBTERMCAP */
+#endif /* HAVE_LIBNCURSES */
if (viewwidth < 0 && getenv ("COLUMNS") != NULL)
viewwidth = atoi (getenv ("COLUMNS"));
@@ -183,14 +194,14 @@
bool
get_echo (void)
{
- return echo;
+ return do_echo;
}
/* Set echo. */
void
set_echo (bool echo_)
{
- echo = echo_;
+ do_echo = echo_;
}
/* If echo is on, whether commands from include files are echoed. */
Index: src/libpspp/ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/libpspp/ChangeLog,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -b -r1.75 -r1.76
--- src/libpspp/ChangeLog 23 Jul 2007 04:48:10 -0000 1.75
+++ src/libpspp/ChangeLog 27 Jul 2007 22:58:02 -0000 1.76
@@ -1,3 +1,11 @@
+2007-07-25 Ben Pfaff <address@hidden>
+
+ * getl.c (getl_append_source): Add source to *end* of list.
+ Otherwise the list ends up in reverse order.
+
+ * automake.mk (src/libpspp/version.c): Use $HOME instead of ~ in
+ paths. We don't interpolate ~.
+
2007-07-22 Ben Pfaff <address@hidden>
* str.h: Include xstrndup.h also.
Index: src/libpspp/automake.mk
===================================================================
RCS file: /cvsroot/pspp/pspp/src/libpspp/automake.mk,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- src/libpspp/automake.mk 7 Jun 2007 05:19:10 -0000 1.29
+++ src/libpspp/automake.mk 27 Jul 2007 22:58:02 -0000 1.30
@@ -89,9 +89,9 @@
echo "const char host_system[] = \"$(host_triplet)\";" >> $@
echo "const char build_system[] = \"$(build_triplet)\";" >> $@
echo "const char default_config_path[] =\
-\"~/.pspp:$(pkgsysconfdir)\";" >> $@
+\"\$$HOME/.pspp:$(pkgsysconfdir)\";" >> $@
echo "const char include_path[] =\
-\"./:~/.pspp/include:$(pkgdatadir)\";" >> $@
+\"./:\$$HOME/.pspp/include:$(pkgdatadir)\";" >> $@
echo "const char locale_dir[] = \"$(datadir)/locale\";" >> $@
echo "const char *const authors[] = {" >> $@
sed -e 's/^/ \"/' -e 's/$$/\",/' $(top_srcdir)/AUTHORS >> $@
Index: src/libpspp/getl.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/libpspp/getl.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- src/libpspp/getl.c 12 Jul 2007 12:22:35 -0000 1.9
+++ src/libpspp/getl.c 27 Jul 2007 22:58:02 -0000 1.10
@@ -94,7 +94,7 @@
s->interface = i ;
- ll_push_head (&ss->sources, &s->ll);
+ ll_push_tail (&ss->sources, &s->ll);
}
/* Nests source S within the current source file. */
Index: src/output/ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/output/ChangeLog,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- src/output/ChangeLog 20 Feb 2007 15:04:47 -0000 1.21
+++ src/output/ChangeLog 27 Jul 2007 22:58:02 -0000 1.22
@@ -1,3 +1,22 @@
+2007-07-25 Ben Pfaff <address@hidden>
+
+ Make interactive output go to the terminal (bug #17213), by
+ causing the UI to flush output to the user when it prompts for a
+ command.
+
+ * ascii.c (ascii_open_driver): Move the file open into
+ ascii_open_page, so that we can re-open after a flush.
+ (ascii_close_driver): Close file using ascii_flush.
+ (ascii_open_page): Open the output file if it's not already open.
+ Use fn_open so that we can support pipes.
+ (ascii_close_page): Do nothing if output file not open.
+ (ascii_flush): New function.
+ (static var ascii_class): Add ascii_flush.
+
+ * manager.c (som_flush): New function.
+
+ * output.c (outp_flush): New function.
+
Tue Feb 20 07:03:48 2007 Ben Pfaff <address@hidden>
* html.c: Don't need to include "getlogin_r.h" anymore, because
Index: src/output/ascii.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/output/ascii.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- src/output/ascii.c 7 Jul 2007 06:14:24 -0000 1.14
+++ src/output/ascii.c 27 Jul 2007 22:58:02 -0000 1.15
@@ -1,5 +1,5 @@
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2007 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -115,6 +115,7 @@
int line_cap; /* Number of lines allocated. */
};
+static void ascii_flush (struct outp_driver *);
static int get_default_box_char (size_t idx);
static bool handle_option (struct outp_driver *this, const char *key,
const struct string *val);
@@ -152,13 +153,6 @@
if (!outp_parse_options (options, handle_option, this))
goto error;
- x->file = pool_fopen (x->pool, x->file_name, "w");
- if (x->file == NULL)
- {
- error (0, errno, _("ascii: opening output file \"%s\""), x->file_name);
- goto error;
- }
-
this->length = x->page_length - x->top_margin - x->bottom_margin - 1;
if (x->headers)
this->length -= 3;
@@ -226,8 +220,7 @@
{
struct ascii_driver_ext *x = this->ext;
- if (fn_close (x->file_name, x->file) != 0)
- error (0, errno, _("ascii: closing output file \"%s\""), x->file_name);
+ ascii_flush (this);
pool_detach_file (x->pool, x->file);
pool_destroy (x->pool);
@@ -410,6 +403,18 @@
struct ascii_driver_ext *x = this->ext;
int i;
+ if (x->file == NULL)
+ {
+ x->file = fn_open (x->file_name, "w");
+ if (x->file == NULL)
+ {
+ error (0, errno, _("ascii: opening output file \"%s\""),
+ x->file_name);
+ return;
+ }
+ pool_attach_file (x->pool, x->file);
+ }
+
x->page_number++;
if (this->length > x->line_cap)
@@ -670,6 +675,9 @@
struct string out;
int line_num;
+ if (x->file == NULL)
+ return;
+
ds_init_empty (&out);
ds_put_char_multiple (&out, '\n', x->top_margin);
@@ -718,6 +726,25 @@
ds_destroy (&out);
}
+/* Flushes all output to the user and lets the user deal with it.
+ This is applied only to output drivers that are designated as
+ "screen" drivers that the user is interacting with in real
+ time. */
+static void
+ascii_flush (struct outp_driver *this)
+{
+ struct ascii_driver_ext *x = this->ext;
+
+ if (x->file != NULL)
+ {
+ if (fn_close (x->file_name, x->file) != 0)
+ error (0, errno, _("ascii: closing output file \"%s\""),
+ x->file_name);
+ pool_detach_file (x->pool, x->file);
+ x->file = NULL;
+ }
+}
+
static void
ascii_chart_initialise (struct outp_driver *d UNUSED, struct chart *ch)
{
@@ -741,6 +768,7 @@
ascii_open_page,
ascii_close_page,
+ ascii_flush,
NULL,
Index: src/output/html.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/output/html.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- src/output/html.c 7 Jul 2007 06:14:25 -0000 1.21
+++ src/output/html.c 27 Jul 2007 22:58:03 -0000 1.22
@@ -407,6 +407,7 @@
NULL,
NULL,
+ NULL,
html_submit,
Index: src/output/manager.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/output/manager.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- src/output/manager.c 7 Jul 2007 06:14:25 -0000 1.13
+++ src/output/manager.c 27 Jul 2007 22:58:03 -0000 1.14
@@ -1,5 +1,5 @@
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2007 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -47,6 +47,16 @@
outp_eject_page (d);
}
+/* Flushes output on all active devices. */
+void
+som_flush (void)
+{
+ struct outp_driver *d;
+
+ for (d = outp_drivers (NULL); d; d = outp_drivers (d))
+ outp_flush (d);
+}
+
/* Skip down a single line on all active devices. */
void
som_blank_line (void)
Index: src/output/manager.h
===================================================================
RCS file: /cvsroot/pspp/pspp/src/output/manager.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- src/output/manager.h 7 Jul 2007 06:14:25 -0000 1.5
+++ src/output/manager.h 27 Jul 2007 22:58:03 -0000 1.6
@@ -114,5 +114,6 @@
/* Miscellaneous. */
void som_eject_page (void);
void som_blank_line (void);
+void som_flush (void);
#endif /* som_h */
Index: src/output/output.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/output/output.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- src/output/output.c 7 Jul 2007 06:14:25 -0000 1.21
+++ src/output/output.c 27 Jul 2007 22:58:03 -0000 1.22
@@ -1,5 +1,5 @@
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2007 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -150,8 +150,8 @@
outp_configure_vec = n;
}
-/* Checks that outp_configure_vec is empty, bitches & clears it if it
- isn't. */
+/* Checks that outp_configure_vec is empty, complains and clears
+ it if it isn't. */
static void
check_configure_vec (void)
{
@@ -701,7 +701,7 @@
d->class = c->class;
d->name = ss_xstrdup (driver_name);
d->page_open = false;
- d->device = OUTP_DEV_NONE;
+ d->device = device;
d->cp_x = d->cp_y = 0;
d->ext = NULL;
d->prc = NULL;
@@ -1143,6 +1143,18 @@
outp_open_page (d);
}
+/* Flushes output to screen devices, so that the user can see
+ output that doesn't fill up an entire page. */
+void
+outp_flush (struct outp_driver *d)
+{
+ if (d->device & OUTP_DEV_SCREEN && d->class->flush != NULL)
+ {
+ outp_close_page (d);
+ d->class->flush (d);
+ }
+}
+
/* Returns the width of string S, in device units, when output on
device D. */
int
Index: src/output/output.h
===================================================================
RCS file: /cvsroot/pspp/pspp/src/output/output.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- src/output/output.h 7 Jul 2007 06:14:25 -0000 1.10
+++ src/output/output.h 27 Jul 2007 22:58:03 -0000 1.11
@@ -1,5 +1,5 @@
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2007 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -73,6 +73,8 @@
void (*open_page) (struct outp_driver *);
void (*close_page) (struct outp_driver *);
+ void (*flush) (struct outp_driver *);
+
/* special != 0 only. */
void (*submit) (struct outp_driver *, struct som_entity *);
@@ -155,6 +157,7 @@
void outp_open_page (struct outp_driver *);
void outp_close_page (struct outp_driver *);
void outp_eject_page (struct outp_driver *);
+void outp_flush (struct outp_driver *);
int outp_string_width (struct outp_driver *, const char *, enum outp_font);
Index: src/output/postscript.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/output/postscript.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- src/output/postscript.c 7 Jul 2007 06:14:25 -0000 1.27
+++ src/output/postscript.c 27 Jul 2007 22:58:03 -0000 1.28
@@ -1433,6 +1433,7 @@
ps_open_page,
ps_close_page,
+ NULL,
ps_submit,
Index: src/ui/terminal/ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/ui/terminal/ChangeLog,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- src/ui/terminal/ChangeLog 7 Jun 2007 06:42:06 -0000 1.23
+++ src/ui/terminal/ChangeLog 27 Jul 2007 22:58:03 -0000 1.24
@@ -1,3 +1,15 @@
+2007-07-25 Ben Pfaff <address@hidden>
+
+ Make interactive output go to the terminal (bug #17213), by
+ causing the UI to flush output to the user when it prompts for a
+ command.
+
+ * command-line.c (parse_command_line): Configure interactive
+ output devices if appropriate.
+
+ * read-line.c (readln_read): Flush output if this is a prompt for
+ the first line of a command.
+
2007-06-06 Ben Pfaff <address@hidden>
Adapt case sources, sinks, and clients of procedure code to the
Index: src/ui/terminal/command-line.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/ui/terminal/command-line.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- src/ui/terminal/command-line.c 7 Jul 2007 06:14:31 -0000 1.14
+++ src/ui/terminal/command-line.c 27 Jul 2007 22:58:03 -0000 1.15
@@ -1,5 +1,5 @@
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2007 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -42,12 +42,8 @@
#define _(msgid) gettext (msgid)
#define N_(msgid) msgid
-void welcome (void);
static void usage (void);
-char *subst_vars (char *);
-
-
/* Parses the command line specified by ARGC and ARGV as received by
main(). Returns true if normal execution should proceed,
false if the command-line indicates that PSPP should exit. */
@@ -209,7 +205,11 @@
}
if (!syntax_files || interactive_mode)
+ {
getl_append_source (ss, create_readln_source () );
+ if (!cleared_device_defaults)
+ outp_configure_add ("interactive");
+ }
return true;
}
Index: src/ui/terminal/read-line.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/ui/terminal/read-line.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- src/ui/terminal/read-line.c 7 Jul 2007 06:14:31 -0000 1.15
+++ src/ui/terminal/read-line.c 27 Jul 2007 22:58:03 -0000 1.16
@@ -1,5 +1,5 @@
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2007 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -32,6 +32,7 @@
#include <libpspp/str.h>
#include <libpspp/version.h>
#include <language/prompt.h>
+#include <output/manager.h>
#include "xalloc.h"
@@ -148,6 +149,9 @@
welcome ();
+ if (style == PROMPT_FIRST)
+ som_flush ();
+
#if HAVE_READLINE
rl_attempted_completion_function = (style == PROMPT_FIRST
? complete_command_name
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] pspp config/ChangeLog config/devices src/data/C...,
Ben Pfaff <=