pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] pspp po/de.po po/pspp.pot src/language/ChangeLo...


From: John Darrington
Subject: [Pspp-cvs] pspp po/de.po po/pspp.pot src/language/ChangeLo...
Date: Wed, 29 Nov 2006 11:50:32 +0000

CVSROOT:        /sources/pspp
Module name:    pspp
Changes by:     John Darrington <jmd>   06/11/29 11:50:32

Modified files:
        po             : de.po pspp.pot 
        src/language   : ChangeLog automake.mk command.c 
        src/language/control: repeat.c 
        src/language/data-io: data-reader.c file-handle.q 
        src/language/lexer: lexer.c 
        src/language/utilities: include.c set.q 
        src/libpspp    : ChangeLog automake.mk message.c message.h 
        src/ui         : flexifile.c 
        src/ui/gui     : message-dialog.c psppire.c 
        src/ui/terminal: command-line.c main.c msg-ui.c read-line.c 
                         read-line.h 
        tests/bugs     : get-no-file.sh 

Log message:
        Applying patch #5562

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/po/de.po?cvsroot=pspp&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/pspp/po/pspp.pot?cvsroot=pspp&r1=1.104&r2=1.105
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/ChangeLog?cvsroot=pspp&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/automake.mk?cvsroot=pspp&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/command.c?cvsroot=pspp&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/control/repeat.c?cvsroot=pspp&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/data-io/data-reader.c?cvsroot=pspp&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/data-io/file-handle.q?cvsroot=pspp&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/lexer/lexer.c?cvsroot=pspp&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/utilities/include.c?cvsroot=pspp&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/utilities/set.q?cvsroot=pspp&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/pspp/src/libpspp/ChangeLog?cvsroot=pspp&r1=1.40&r2=1.41
http://cvs.savannah.gnu.org/viewcvs/pspp/src/libpspp/automake.mk?cvsroot=pspp&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/pspp/src/libpspp/message.c?cvsroot=pspp&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/pspp/src/libpspp/message.h?cvsroot=pspp&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/flexifile.c?cvsroot=pspp&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/message-dialog.c?cvsroot=pspp&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/psppire.c?cvsroot=pspp&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/terminal/command-line.c?cvsroot=pspp&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/terminal/main.c?cvsroot=pspp&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/terminal/msg-ui.c?cvsroot=pspp&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/terminal/read-line.c?cvsroot=pspp&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/terminal/read-line.h?cvsroot=pspp&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pspp/tests/bugs/get-no-file.sh?cvsroot=pspp&r1=1.5&r2=1.6

Patches:
Index: po/de.po
===================================================================
RCS file: /sources/pspp/pspp/po/de.po,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- po/de.po    29 Nov 2006 02:15:00 -0000      1.19
+++ po/de.po    29 Nov 2006 11:50:31 -0000      1.20
@@ -10,7 +10,7 @@
 msgstr ""
 "Project-Id-Version: PSPP 0.4.2\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2006-11-29 09:30+0800\n"
+"POT-Creation-Date: 2006-11-29 18:57+0800\n"
 "PO-Revision-Date: 2006-05-26 17:49+0800\n"
 "Last-Translator: John Darrington <address@hidden>\n"
 "Language-Team: German <address@hidden>\n"
@@ -1012,33 +1012,33 @@
 msgid "This command may not follow ELSE in DO IF...END IF."
 msgstr ""
 
-#: src/language/control/repeat.c:144
+#: src/language/control/repeat.c:156
 #, c-format
 msgid "Dummy variable name \"%s\" hides dictionary variable \"%s\"."
 msgstr ""
 
-#: src/language/control/repeat.c:150
+#: src/language/control/repeat.c:162
 #, c-format
 msgid "Dummy variable name \"%s\" is given twice."
 msgstr ""
 
-#: src/language/control/repeat.c:196
+#: src/language/control/repeat.c:209
 #, c-format
 msgid ""
 "Dummy variable \"%s\" had %d substitutions, so \"%s\" must also, but %d were "
 "specified."
 msgstr ""
 
-#: src/language/control/repeat.c:401
+#: src/language/control/repeat.c:415
 #, c-format
 msgid "%ld TO %ld is an invalid range."
 msgstr ""
 
-#: src/language/control/repeat.c:437
+#: src/language/control/repeat.c:451
 msgid "String expected."
 msgstr ""
 
-#: src/language/control/repeat.c:456
+#: src/language/control/repeat.c:470
 msgid "No matching DO REPEAT."
 msgstr ""
 
@@ -1184,44 +1184,44 @@
 msgid "I/O error occurred writing data file \"%s\"."
 msgstr ""
 
-#: src/language/data-io/file-handle.q:69
+#: src/language/data-io/file-handle.q:68
 #, c-format
 msgid ""
 "File handle %s is already defined.  Use CLOSE FILE HANDLE before redefining "
 "a file handle."
 msgstr ""
 
-#: src/language/data-io/file-handle.q:101
+#: src/language/data-io/file-handle.q:100
 #, c-format
 msgid ""
 "Fixed-length records were specified on /RECFORM, but record length was not "
 "specified on /LRECL.  Assuming %d-character records."
 msgstr ""
 
-#: src/language/data-io/file-handle.q:106
+#: src/language/data-io/file-handle.q:105
 #, c-format
 msgid ""
 "Record length (%ld) must be at least one byte.  Assuming %d-character "
 "records."
 msgstr ""
 
-#: src/language/data-io/file-handle.q:152
+#: src/language/data-io/file-handle.q:151
 msgid "file"
 msgstr ""
 
-#: src/language/data-io/file-handle.q:154
+#: src/language/data-io/file-handle.q:153
 msgid "inline file"
 msgstr ""
 
-#: src/language/data-io/file-handle.q:156
+#: src/language/data-io/file-handle.q:155
 msgid "scratch file"
 msgstr ""
 
-#: src/language/data-io/file-handle.q:177
+#: src/language/data-io/file-handle.q:176
 msgid "expecting a file name or handle name"
 msgstr ""
 
-#: src/language/data-io/file-handle.q:204
+#: src/language/data-io/file-handle.q:203
 #, c-format
 msgid "Handle for %s not allowed here."
 msgstr ""
@@ -2159,8 +2159,8 @@
 msgid "%s is a PSPP extension."
 msgstr ""
 
-#: src/language/expressions/parse.c:1244 src/ui/terminal/command-line.c:131
-#: src/ui/terminal/command-line.c:150 src/ui/terminal/command-line.c:162
+#: src/language/expressions/parse.c:1244 src/ui/terminal/command-line.c:132
+#: src/ui/terminal/command-line.c:151 src/ui/terminal/command-line.c:163
 #, c-format
 msgid "%s is not yet implemented."
 msgstr ""
@@ -2356,31 +2356,6 @@
 msgid "Bad bounds in use of TO convention."
 msgstr ""
 
-#: src/language/line-buffer.c:251
-#, c-format
-msgid "Can't find `%s' in include file search path."
-msgstr ""
-
-#: src/language/line-buffer.c:335
-#, c-format
-msgid "Closing `%s': %s."
-msgstr ""
-
-#: src/language/line-buffer.c:446
-#, c-format
-msgid "opening \"%s\" as syntax file"
-msgstr ""
-
-#: src/language/line-buffer.c:451
-#, c-format
-msgid "Opening `%s': %s."
-msgstr ""
-
-#: src/language/line-buffer.c:464
-#, c-format
-msgid "Reading `%s': %s."
-msgstr ""
-
 #: src/language/stats/aggregate.c:218
 msgid "while expecting COLUMNWISE"
 msgstr ""
@@ -3472,6 +3447,26 @@
 msgid "%s & %s"
 msgstr ""
 
+#: src/language/syntax-file.c:88
+#, c-format
+msgid "opening \"%s\" as syntax file"
+msgstr ""
+
+#: src/language/syntax-file.c:93
+#, c-format
+msgid "Opening `%s': %s."
+msgstr ""
+
+#: src/language/syntax-file.c:106
+#, c-format
+msgid "Reading `%s': %s."
+msgstr ""
+
+#: src/language/syntax-file.c:126
+#, c-format
+msgid "Closing `%s': %s."
+msgstr ""
+
 #: src/language/tests/float-format.c:127
 #, c-format
 msgid "%d-byte string needed but %d-byte string supplied."
@@ -3500,10 +3495,15 @@
 msgid "Only USE ALL is currently implemented."
 msgstr ""
 
-#: src/language/utilities/include.c:43
+#: src/language/utilities/include.c:49
 msgid "expecting file name"
 msgstr ""
 
+#: src/language/utilities/include.c:65
+#, c-format
+msgid "Can't find `%s' in include file search path."
+msgstr ""
+
 #: src/language/utilities/permissions.c:77
 #, c-format
 msgid "Expecting %s or %s."
@@ -4213,15 +4213,15 @@
 msgid "Font Selection"
 msgstr "Schriftwahlung"
 
-#: src/ui/gui/message-dialog.c:136
+#: src/ui/gui/message-dialog.c:128
 msgid "Script Error"
 msgstr "Skript Fehler"
 
-#: src/ui/gui/message-dialog.c:140
+#: src/ui/gui/message-dialog.c:132
 msgid "Data File Error"
 msgstr "Datei Fehler"
 
-#: src/ui/gui/message-dialog.c:145
+#: src/ui/gui/message-dialog.c:137
 msgid "PSPP Error"
 msgstr "PSPP Fehler"
 
@@ -4233,7 +4233,7 @@
 msgid "Incorrect range specification"
 msgstr "Falshe Spannweitebeschreibung"
 
-#: src/ui/gui/psppire.c:70
+#: src/ui/gui/psppire.c:71
 msgid "Sorry. The help system hasn't yet been implemented."
 msgstr "Es gibt noch nicht kein Helpsysteme. Schade!"
 
@@ -4596,7 +4596,7 @@
 msgid "Scale"
 msgstr "Skalwert"
 
-#: src/ui/terminal/command-line.c:219
+#: src/ui/terminal/command-line.c:221
 #, c-format
 msgid ""
 "PSPP, a program for statistical analysis of sample data.\n"
@@ -4642,43 +4642,43 @@
 "\n"
 msgstr ""
 
-#: src/ui/terminal/command-line.c:254
+#: src/ui/terminal/command-line.c:256
 #, c-format
 msgid ""
 "\n"
 "Report bugs to <%s>.\n"
 msgstr ""
 
-#: src/ui/terminal/main.c:117
+#: src/ui/terminal/main.c:120
 msgid ""
 "Stopping syntax file processing here to avoid a cascade of dependent command "
 "failures."
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:62
+#: src/ui/terminal/msg-ui.c:66
 #, c-format
 msgid "Cannot open %s (%s). Writing errors to stdout instead.\n"
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:89
+#: src/ui/terminal/msg-ui.c:93
 msgid "Terminating execution of syntax file due to error."
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:91
+#: src/ui/terminal/msg-ui.c:95
 #, c-format
 msgid "Errors (%d) exceeds limit (%d)."
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:94
+#: src/ui/terminal/msg-ui.c:98
 #, c-format
 msgid "Warnings (%d) exceed limit (%d)."
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:143
+#: src/ui/terminal/msg-ui.c:147
 msgid "error"
 msgstr "Fehler"
 
-#: src/ui/terminal/msg-ui.c:144
+#: src/ui/terminal/msg-ui.c:148
 msgid "warning"
 msgstr "Warnung"
 

Index: po/pspp.pot
===================================================================
RCS file: /sources/pspp/pspp/po/pspp.pot,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -b -r1.104 -r1.105
--- po/pspp.pot 29 Nov 2006 02:15:00 -0000      1.104
+++ po/pspp.pot 29 Nov 2006 11:50:31 -0000      1.105
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2006-11-29 09:30+0800\n"
+"POT-Creation-Date: 2006-11-29 18:57+0800\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <address@hidden>\n"
 "Language-Team: LANGUAGE <address@hidden>\n"
@@ -1011,33 +1011,33 @@
 msgid "This command may not follow ELSE in DO IF...END IF."
 msgstr ""
 
-#: src/language/control/repeat.c:144
+#: src/language/control/repeat.c:156
 #, c-format
 msgid "Dummy variable name \"%s\" hides dictionary variable \"%s\"."
 msgstr ""
 
-#: src/language/control/repeat.c:150
+#: src/language/control/repeat.c:162
 #, c-format
 msgid "Dummy variable name \"%s\" is given twice."
 msgstr ""
 
-#: src/language/control/repeat.c:196
+#: src/language/control/repeat.c:209
 #, c-format
 msgid ""
 "Dummy variable \"%s\" had %d substitutions, so \"%s\" must also, but %d were "
 "specified."
 msgstr ""
 
-#: src/language/control/repeat.c:401
+#: src/language/control/repeat.c:415
 #, c-format
 msgid "%ld TO %ld is an invalid range."
 msgstr ""
 
-#: src/language/control/repeat.c:437
+#: src/language/control/repeat.c:451
 msgid "String expected."
 msgstr ""
 
-#: src/language/control/repeat.c:456
+#: src/language/control/repeat.c:470
 msgid "No matching DO REPEAT."
 msgstr ""
 
@@ -1183,44 +1183,44 @@
 msgid "I/O error occurred writing data file \"%s\"."
 msgstr ""
 
-#: src/language/data-io/file-handle.q:69
+#: src/language/data-io/file-handle.q:68
 #, c-format
 msgid ""
 "File handle %s is already defined.  Use CLOSE FILE HANDLE before redefining "
 "a file handle."
 msgstr ""
 
-#: src/language/data-io/file-handle.q:101
+#: src/language/data-io/file-handle.q:100
 #, c-format
 msgid ""
 "Fixed-length records were specified on /RECFORM, but record length was not "
 "specified on /LRECL.  Assuming %d-character records."
 msgstr ""
 
-#: src/language/data-io/file-handle.q:106
+#: src/language/data-io/file-handle.q:105
 #, c-format
 msgid ""
 "Record length (%ld) must be at least one byte.  Assuming %d-character "
 "records."
 msgstr ""
 
-#: src/language/data-io/file-handle.q:152
+#: src/language/data-io/file-handle.q:151
 msgid "file"
 msgstr ""
 
-#: src/language/data-io/file-handle.q:154
+#: src/language/data-io/file-handle.q:153
 msgid "inline file"
 msgstr ""
 
-#: src/language/data-io/file-handle.q:156
+#: src/language/data-io/file-handle.q:155
 msgid "scratch file"
 msgstr ""
 
-#: src/language/data-io/file-handle.q:177
+#: src/language/data-io/file-handle.q:176
 msgid "expecting a file name or handle name"
 msgstr ""
 
-#: src/language/data-io/file-handle.q:204
+#: src/language/data-io/file-handle.q:203
 #, c-format
 msgid "Handle for %s not allowed here."
 msgstr ""
@@ -2158,8 +2158,8 @@
 msgid "%s is a PSPP extension."
 msgstr ""
 
-#: src/language/expressions/parse.c:1244 src/ui/terminal/command-line.c:131
-#: src/ui/terminal/command-line.c:150 src/ui/terminal/command-line.c:162
+#: src/language/expressions/parse.c:1244 src/ui/terminal/command-line.c:132
+#: src/ui/terminal/command-line.c:151 src/ui/terminal/command-line.c:163
 #, c-format
 msgid "%s is not yet implemented."
 msgstr ""
@@ -2355,31 +2355,6 @@
 msgid "Bad bounds in use of TO convention."
 msgstr ""
 
-#: src/language/line-buffer.c:251
-#, c-format
-msgid "Can't find `%s' in include file search path."
-msgstr ""
-
-#: src/language/line-buffer.c:335
-#, c-format
-msgid "Closing `%s': %s."
-msgstr ""
-
-#: src/language/line-buffer.c:446
-#, c-format
-msgid "opening \"%s\" as syntax file"
-msgstr ""
-
-#: src/language/line-buffer.c:451
-#, c-format
-msgid "Opening `%s': %s."
-msgstr ""
-
-#: src/language/line-buffer.c:464
-#, c-format
-msgid "Reading `%s': %s."
-msgstr ""
-
 #: src/language/stats/aggregate.c:218
 msgid "while expecting COLUMNWISE"
 msgstr ""
@@ -3471,6 +3446,26 @@
 msgid "%s & %s"
 msgstr ""
 
+#: src/language/syntax-file.c:88
+#, c-format
+msgid "opening \"%s\" as syntax file"
+msgstr ""
+
+#: src/language/syntax-file.c:93
+#, c-format
+msgid "Opening `%s': %s."
+msgstr ""
+
+#: src/language/syntax-file.c:106
+#, c-format
+msgid "Reading `%s': %s."
+msgstr ""
+
+#: src/language/syntax-file.c:126
+#, c-format
+msgid "Closing `%s': %s."
+msgstr ""
+
 #: src/language/tests/float-format.c:127
 #, c-format
 msgid "%d-byte string needed but %d-byte string supplied."
@@ -3499,10 +3494,15 @@
 msgid "Only USE ALL is currently implemented."
 msgstr ""
 
-#: src/language/utilities/include.c:43
+#: src/language/utilities/include.c:49
 msgid "expecting file name"
 msgstr ""
 
+#: src/language/utilities/include.c:65
+#, c-format
+msgid "Can't find `%s' in include file search path."
+msgstr ""
+
 #: src/language/utilities/permissions.c:77
 #, c-format
 msgid "Expecting %s or %s."
@@ -4212,15 +4212,15 @@
 msgid "Font Selection"
 msgstr ""
 
-#: src/ui/gui/message-dialog.c:136
+#: src/ui/gui/message-dialog.c:128
 msgid "Script Error"
 msgstr ""
 
-#: src/ui/gui/message-dialog.c:140
+#: src/ui/gui/message-dialog.c:132
 msgid "Data File Error"
 msgstr ""
 
-#: src/ui/gui/message-dialog.c:145
+#: src/ui/gui/message-dialog.c:137
 msgid "PSPP Error"
 msgstr ""
 
@@ -4232,7 +4232,7 @@
 msgid "Incorrect range specification"
 msgstr ""
 
-#: src/ui/gui/psppire.c:70
+#: src/ui/gui/psppire.c:71
 msgid "Sorry. The help system hasn't yet been implemented."
 msgstr ""
 
@@ -4587,7 +4587,7 @@
 msgid "Scale"
 msgstr ""
 
-#: src/ui/terminal/command-line.c:219
+#: src/ui/terminal/command-line.c:221
 #, c-format
 msgid ""
 "PSPP, a program for statistical analysis of sample data.\n"
@@ -4633,42 +4633,42 @@
 "\n"
 msgstr ""
 
-#: src/ui/terminal/command-line.c:254
+#: src/ui/terminal/command-line.c:256
 #, c-format
 msgid ""
 "\n"
 "Report bugs to <%s>.\n"
 msgstr ""
 
-#: src/ui/terminal/main.c:117
+#: src/ui/terminal/main.c:120
 msgid ""
 "Stopping syntax file processing here to avoid a cascade of dependent command "
 "failures."
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:62
+#: src/ui/terminal/msg-ui.c:66
 #, c-format
 msgid "Cannot open %s (%s). Writing errors to stdout instead.\n"
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:89
+#: src/ui/terminal/msg-ui.c:93
 msgid "Terminating execution of syntax file due to error."
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:91
+#: src/ui/terminal/msg-ui.c:95
 #, c-format
 msgid "Errors (%d) exceeds limit (%d)."
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:94
+#: src/ui/terminal/msg-ui.c:98
 #, c-format
 msgid "Warnings (%d) exceed limit (%d)."
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:143
+#: src/ui/terminal/msg-ui.c:147
 msgid "error"
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:144
+#: src/ui/terminal/msg-ui.c:148
 msgid "warning"
 msgstr ""

Index: src/language/ChangeLog
===================================================================
RCS file: /sources/pspp/pspp/src/language/ChangeLog,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- src/language/ChangeLog      22 Nov 2006 14:27:16 -0000      1.14
+++ src/language/ChangeLog      29 Nov 2006 11:50:31 -0000      1.15
@@ -1,3 +1,12 @@
+Wed Nov 29 19:35:44 WST 2006 John Darrington <address@hidden>
+
+       * command.c: Updated to reflect changed function names.
+
+       * line-buffer.c line-buffer.h: Removed.  Guts of it moved to
+       libpspp/getl.[ch] The rest moved to files listed below.
+
+       * syntax-file.c syntax-file.h prompt.c prompt.h: New files.
+
 Wed Nov 22 06:26:42 2006  Ben Pfaff  <address@hidden>
 
        * command.def: HOST command needs F_KEEP_FINAL_TOKEN.

Index: src/language/automake.mk
===================================================================
RCS file: /sources/pspp/pspp/src/language/automake.mk,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/language/automake.mk    17 Mar 2006 00:41:57 -0000      1.3
+++ src/language/automake.mk    29 Nov 2006 11:50:31 -0000      1.4
@@ -13,8 +13,10 @@
 noinst_LIBRARIES += src/language/liblanguage.a 
 
 src_language_liblanguage_a_SOURCES = \
-       src/language/line-buffer.c \
-       src/language/line-buffer.h \
+       src/language/syntax-file.c \
+       src/language/syntax-file.h \
+       src/language/prompt.c \
+       src/language/prompt.h \
        src/language/command.c \
        src/language/command.h \
        src/language/command.def 

Index: src/language/command.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/command.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- src/language/command.c      11 Nov 2006 23:10:00 -0000      1.19
+++ src/language/command.c      29 Nov 2006 11:50:31 -0000      1.20
@@ -32,7 +32,7 @@
 #include <data/settings.h>
 #include <data/variable.h>
 #include <language/lexer/lexer.h>
-#include <language/line-buffer.h>
+#include <language/prompt.h>
 #include <libpspp/alloc.h>
 #include <libpspp/assertion.h>
 #include <libpspp/compiler.h>
@@ -162,7 +162,7 @@
   enum cmd_result result;
 
   /* Read the command's first token. */
-  getl_set_prompt_style (GETL_PROMPT_FIRST);
+  prompt_set_style (PROMPT_FIRST);
   set_completion_state (state);
   lex_get (lexer);
   if (lex_token (lexer) == T_STOP)
@@ -172,7 +172,7 @@
       /* Null commands can result from extra empty lines. */
       return CMD_SUCCESS; 
     }
-  getl_set_prompt_style (GETL_PROMPT_LATER);
+  prompt_set_style (PROMPT_LATER);
 
   /* Parse the command name. */
   command = parse_command_name (lexer);

Index: src/language/control/repeat.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/control/repeat.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- src/language/control/repeat.c       11 Nov 2006 23:10:00 -0000      1.15
+++ src/language/control/repeat.c       29 Nov 2006 11:50:31 -0000      1.16
@@ -28,13 +28,12 @@
 #include <data/dictionary.h>
 #include <data/procedure.h>
 #include <data/settings.h>
+#include <libpspp/getl.h>
 #include <language/command.h>
 #include <language/lexer/lexer.h>
 #include <language/lexer/variable-parser.h>
-#include <language/line-buffer.h>
 #include <libpspp/alloc.h>
 #include <libpspp/message.h>
-#include <libpspp/message.h>
 #include <libpspp/misc.h>
 #include <libpspp/pool.h>
 #include <libpspp/str.h>
@@ -73,6 +72,8 @@
 /* A DO REPEAT...END REPEAT block. */
 struct repeat_block 
   {
+    struct getl_interface parent ;
+
     struct pool *pool;                  /* Pool used for storage. */
     struct dataset *ds;                 /* The dataset for this block */
     struct line_list *first_line;       /* First line in line buffer. */
@@ -87,14 +88,20 @@
 static bool parse_lines (struct lexer *, struct repeat_block *);
 static void create_vars (struct repeat_block *);
 
-static int parse_ids (struct lexer *, const struct dictionary *dict, struct 
repeat_entry *, struct pool *);
-static int parse_numbers (struct lexer *, struct repeat_entry *, struct pool 
*);
-static int parse_strings (struct lexer *, struct repeat_entry *, struct pool 
*);
-
-static void do_repeat_filter (struct string *line, void *block);
-static bool do_repeat_read (struct string *line, char **file_name,
-                            int *line_number, void *block);
-static void do_repeat_close (void *block);
+static int parse_ids (struct lexer *, const struct dictionary *dict, 
+                     struct repeat_entry *, struct pool *);
+
+static int parse_numbers (struct lexer *, struct repeat_entry *, 
+                         struct pool *);
+
+static int parse_strings (struct lexer *, struct repeat_entry *, 
+                         struct pool *);
+
+static void do_repeat_filter (struct getl_interface *, struct string *);
+static bool do_repeat_read (struct getl_interface *, struct string *);
+static void do_repeat_close (struct getl_interface *);
+static bool always_false (const struct getl_interface *i UNUSED);
+
 
 int
 cmd_do_repeat (struct lexer *lexer, struct dataset *ds)
@@ -111,8 +118,13 @@
   
   block->cur_line = NULL;
   block->loop_idx = -1;
-  getl_include_filter (do_repeat_filter, do_repeat_close, block);
-  getl_include_function (do_repeat_read, NULL, block);
+
+  block->parent.read = do_repeat_read;
+  block->parent.close = do_repeat_close;
+  block->parent.filter = do_repeat_filter;
+  block->parent.interactive = always_false;
+
+  getl_include_source ( (struct getl_interface *) block);
 
   return CMD_SUCCESS;
 
@@ -147,7 +159,8 @@
       for (iter = block->macros; iter != NULL; iter = iter->next)
        if (!strcasecmp (iter->id, lex_tokid (lexer)))
          {
-           msg (SE, _("Dummy variable name \"%s\" is given twice."), lex_tokid 
(lexer));
+           msg (SE, _("Dummy variable name \"%s\" is given twice."), 
+                lex_tokid (lexer));
            return false;
          }
 
@@ -278,8 +291,8 @@
 
   for (;;)
     {
-      const char *cur_file_name;
-      int cur_line_number;
+      const char *cur_file_name = getl_source_name ();
+      int cur_line_number = getl_source_location ();
       struct line_list *line;
       struct string cur_line_copy;
       bool dot;
@@ -288,9 +301,10 @@
         return false;
 
       /* If the current file has changed then record the fact. */
-      getl_location (&cur_file_name, &cur_line_number);
-      if (previous_file_name == NULL 
+      if (cur_file_name && 
+         (previous_file_name == NULL 
           || !strcmp (cur_file_name, previous_file_name))
+         )
         previous_file_name = pool_strdup (block->pool, cur_file_name);
 
       ds_init_string (&cur_line_copy, lex_entire_line_ds (lexer) );
@@ -474,9 +488,9 @@
 /* Makes appropriate DO REPEAT macro substitutions within the 
    repeated lines. */
 static void
-do_repeat_filter (struct string *line, void *block_)
+do_repeat_filter (struct getl_interface *block_, struct string *line)
 {
-  struct repeat_block *block = block_;
+  struct repeat_block *block = (struct repeat_block *) block_;
   bool in_apos, in_quote;
   char *cp;
   struct string output;
@@ -523,11 +537,15 @@
    Puts the line in OUTPUT, sets the file name in *FILE_NAME and
    line number in *LINE_NUMBER.  Returns true if a line was
    obtained, false if the source is exhausted. */
+#if 0
 static bool
 do_repeat_read (struct string *output, char **file_name, int *line_number,
                 void *block_) 
+#endif
+static bool  
+do_repeat_read  (struct getl_interface *b, struct string *output)
 {
-  struct repeat_block *block = block_;
+  struct repeat_block *block = (struct repeat_block *) b;
   struct line_list *line;
 
   if (block->cur_line == NULL) 
@@ -540,8 +558,10 @@
   line = block->cur_line;
 
   ds_assign_cstr (output, line->line);
+#if 0
   *file_name = line->file_name;
   *line_number = -line->line_number;
+#endif
   block->cur_line = line->next;
   return true;
 }
@@ -549,8 +569,15 @@
 /* Frees a DO REPEAT block.
    Called by getl to close out the DO REPEAT block. */
 static void
-do_repeat_close (void *block_)
+do_repeat_close (struct getl_interface *block_)
 {
-  struct repeat_block *block = block_;
+  struct repeat_block *block = (struct repeat_block *) block_;
   pool_destroy (block->pool);
 }
+
+
+static bool 
+always_false (const struct getl_interface *i UNUSED)
+{
+  return false;
+}

Index: src/language/data-io/data-reader.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/data-io/data-reader.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- src/language/data-io/data-reader.c  22 Nov 2006 04:24:02 -0000      1.17
+++ src/language/data-io/data-reader.c  29 Nov 2006 11:50:31 -0000      1.18
@@ -32,7 +32,7 @@
 #include <language/command.h>
 #include <language/data-io/file-handle.h>
 #include <language/lexer/lexer.h>
-#include <language/line-buffer.h>
+#include <language/prompt.h>
 #include <libpspp/alloc.h>
 #include <libpspp/assertion.h>
 #include <libpspp/message.h>
@@ -169,7 +169,7 @@
         lex_get (r->lexer);
       if (!lex_force_match_id (r->lexer, "BEGIN") || !lex_force_match_id 
(r->lexer, "DATA"))
         return false;
-      getl_set_prompt_style (GETL_PROMPT_DATA);
+      prompt_set_style (PROMPT_DATA);
     }
       
   if (!lex_get_line_raw (r->lexer))
@@ -444,7 +444,7 @@
   r->flags |= DFM_SAW_BEGIN_DATA;
 
   /* Input procedure reads from inline file. */
-  getl_set_prompt_style (GETL_PROMPT_DATA);
+  prompt_set_style (PROMPT_DATA);
   ok = procedure (ds, NULL, NULL);
 
   dfm_close_reader (r);

Index: src/language/data-io/file-handle.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/data-io/file-handle.q,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- src/language/data-io/file-handle.q  11 Nov 2006 23:10:00 -0000      1.9
+++ src/language/data-io/file-handle.q  29 Nov 2006 11:50:31 -0000      1.10
@@ -26,7 +26,6 @@
 #include <data/file-name.h>
 #include <language/command.h>
 #include <language/lexer/lexer.h>
-#include <language/line-buffer.h>
 #include <libpspp/assertion.h>
 #include <libpspp/message.h>
 #include <libpspp/magic.h>

Index: src/language/lexer/lexer.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/lexer/lexer.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- src/language/lexer/lexer.c  14 Nov 2006 12:29:25 -0000      1.13
+++ src/language/lexer/lexer.c  29 Nov 2006 11:50:31 -0000      1.14
@@ -30,9 +30,9 @@
 #include <libpspp/assertion.h>
 #include <language/command.h>
 #include <libpspp/message.h>
-#include <language/line-buffer.h>
 #include <libpspp/magic.h>
 #include <data/settings.h>
+#include <libpspp/getl.h>
 #include <libpspp/str.h>
 
 #include "size_max.h"

Index: src/language/utilities/include.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/utilities/include.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- src/language/utilities/include.c    11 Nov 2006 23:10:00 -0000      1.6
+++ src/language/utilities/include.c    29 Nov 2006 11:50:31 -0000      1.7
@@ -23,9 +23,12 @@
 #include <libpspp/alloc.h>
 #include <language/command.h>
 #include <libpspp/message.h>
-#include <language/line-buffer.h>
+#include <libpspp/getl.h>
+#include <language/syntax-file.h>
 #include <language/lexer/lexer.h>
 #include <libpspp/str.h>
+#include <data/file-name.h>
+
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -33,6 +36,9 @@
 int
 cmd_include (struct lexer *lexer, struct dataset *ds UNUSED)
 {
+  char *found_fn;
+  char *target_fn;
+
   /* Skip optional FILE=. */
   if (lex_match_id (lexer, "FILE"))
     lex_match (lexer, '=');
@@ -43,7 +49,21 @@
       lex_error (lexer, _("expecting file name")); 
       return CMD_CASCADING_FAILURE;
     }
-  getl_include_syntax_file (ds_cstr (lex_tokstr (lexer)));
+
+  target_fn = ds_cstr (lex_tokstr (lexer));
+
+  found_fn = fn_search_path (target_fn,
+                            getl_include_path (),
+                            NULL);
+
+  if (found_fn != NULL) 
+    {
+      getl_include_source (create_syntax_file_source (found_fn));
+      free (found_fn); 
+    }
+  else
+    msg (SE, _("Can't find `%s' in include file search path."), 
+        target_fn);
 
   lex_get (lexer);
   return lex_end_of_command (lexer);

Index: src/language/utilities/set.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/utilities/set.q,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- src/language/utilities/set.q        22 Nov 2006 04:24:03 -0000      1.20
+++ src/language/utilities/set.q        29 Nov 2006 11:50:31 -0000      1.21
@@ -34,7 +34,7 @@
 #include <language/command.h>
 #include <language/lexer/format-parser.h>
 #include <language/lexer/lexer.h>
-#include <language/line-buffer.h>
+#include <language/prompt.h>
 #include <libpspp/alloc.h>
 #include <libpspp/compiler.h>
 #include <libpspp/copyleft.h>
@@ -152,11 +152,11 @@
     do_cc (cmd.s_cce, FMT_CCE);
 
   if (cmd.sbc_prompt)
-    getl_set_prompt (GETL_PROMPT_FIRST, cmd.s_prompt);
+    prompt_set (PROMPT_FIRST, cmd.s_prompt);
   if (cmd.sbc_cprompt)
-    getl_set_prompt (GETL_PROMPT_LATER, cmd.s_cprompt);
+    prompt_set (PROMPT_LATER, cmd.s_cprompt);
   if (cmd.sbc_dprompt)
-    getl_set_prompt (GETL_PROMPT_DATA, cmd.s_dprompt);
+    prompt_set (PROMPT_DATA, cmd.s_dprompt);
 
   if (cmd.sbc_decimal)
     fmt_set_decimal (cmd.dec == STC_DOT ? '.' : ',');

Index: src/libpspp/ChangeLog
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/ChangeLog,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- src/libpspp/ChangeLog       25 Nov 2006 02:15:01 -0000      1.40
+++ src/libpspp/ChangeLog       29 Nov 2006 11:50:31 -0000      1.41
@@ -1,3 +1,11 @@
+Wed Nov 29 19:35:44 WST 2006 John Darrington <address@hidden>
+
+       * getl.c getl.h: New files. Created interface from base of 
+       language/line-buffer.[ch]
+
+       * msg-locator.c msg-locator.h: New files. Moved from
+       language/line-buffer.[ch]
+
 Fri Nov 24 17:27:00 2006  Ben Pfaff  <address@hidden>
 
        * misc.h: (min) Removed.  All references updated to use MIN, from

Index: src/libpspp/automake.mk
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/automake.mk,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- src/libpspp/automake.mk     28 Oct 2006 04:01:55 -0000      1.15
+++ src/libpspp/automake.mk     29 Nov 2006 11:50:31 -0000      1.16
@@ -19,12 +19,16 @@
        src/libpspp/float-format.h \
        src/libpspp/freaderror.c \
        src/libpspp/freaderror.h \
+       src/libpspp/getl.h \
+       src/libpspp/getl.c \
        src/libpspp/hash.c \
        src/libpspp/hash.h \
        src/libpspp/i18n.c \
        src/libpspp/i18n.h \
        src/libpspp/integer-format.c \
        src/libpspp/integer-format.h \
+       src/libpspp/msg-locator.c \
+       src/libpspp/msg-locator.h \
        src/libpspp/ll.c \
        src/libpspp/ll.h \
        src/libpspp/llx.c \

Index: src/libpspp/message.c
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/message.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- src/libpspp/message.c       18 Jul 2006 04:57:01 -0000      1.6
+++ src/libpspp/message.c       29 Nov 2006 11:50:31 -0000      1.7
@@ -19,7 +19,8 @@
 
 #include <config.h>
 
-#include <libpspp/message.h>
+#include "message.h"
+#include "msg-locator.h"
 
 #include <assert.h>
 #include <stdarg.h>
@@ -39,8 +40,6 @@
 
 /* Message handler as set by msg_init(). */
 static void (*msg_handler)  (const struct msg *);
-static void (*msg_location) (struct msg_locator *);
-
 
 /* Disables emitting messages if positive. */
 static int messages_disabled;
@@ -65,11 +64,9 @@
 }
 
 void
-msg_init ( void (*handler) (const struct msg *), 
-          void (*location) (struct msg_locator *) ) 
+msg_init ( void (*handler) (const struct msg *) )
 {
   msg_handler = handler;
-  msg_location = location;
 }
 
 void
@@ -102,7 +99,7 @@
 void
 msg_emit (struct msg *m) 
 {
-  msg_location (&m->where);
+  get_msg_location (&m->where);
   if (!messages_disabled)
     msg_handler (m);
   free (m->text);

Index: src/libpspp/message.h
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/message.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- src/libpspp/message.h       18 Jul 2006 04:57:01 -0000      1.13
+++ src/libpspp/message.h       29 Nov 2006 11:50:31 -0000      1.14
@@ -86,8 +86,7 @@
   };
 
 /* Initialization. */
-void msg_init ( void (*handler) (const struct msg *), 
-               void (*location) (struct msg_locator *) ) ;
+void msg_init ( void (*handler) (const struct msg *) );
 
 void msg_done (void);
 

Index: src/ui/flexifile.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/flexifile.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/ui/flexifile.c  14 Nov 2006 11:47:17 -0000      1.3
+++ src/ui/flexifile.c  29 Nov 2006 11:50:31 -0000      1.4
@@ -22,6 +22,7 @@
 #include <xalloc.h>
 #include <assert.h>
 #include "flexifile.h"
+#include <string.h>
 #include <data/casefile.h>
 #include <data/casefile-private.h>
 #include <data/case.h>

Index: src/ui/gui/message-dialog.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/message-dialog.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- src/ui/gui/message-dialog.c 4 Jul 2006 04:39:05 -0000       1.14
+++ src/ui/gui/message-dialog.c 29 Nov 2006 11:50:31 -0000      1.15
@@ -29,6 +29,7 @@
 #define N_(msgid) msgid
 
 #include <libpspp/message.h>
+#include <libpspp/msg-locator.h>
 #include "message-dialog.h"
 #include "progname.h"
 
@@ -49,22 +50,13 @@
 static GQueue *message_queue;
 
 
-static void 
-msg_location (struct msg_locator *loc)
-{
-  loc->file_name = NULL; 
-  loc->line_number = -1;
-}
-
-
 void
 message_dialog_init (void) 
 {
   message_queue = g_queue_new();
-  msg_init (enqueue_msg, msg_location);
+  msg_init (enqueue_msg);
 }
 
-
 void
 message_dialog_done (void)
 {

Index: src/ui/gui/psppire.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- src/ui/gui/psppire.c        3 Nov 2006 04:53:52 -0000       1.19
+++ src/ui/gui/psppire.c        29 Nov 2006 11:50:31 -0000      1.20
@@ -27,6 +27,7 @@
 #include <libpspp/copyleft.h>
 #include <data/format.h>
 #include <data/settings.h>
+#include <libpspp/getl.h>
 
 #include <getopt.h>
 #include <gtk/gtk.h>
@@ -113,11 +114,9 @@
 
   glade_init();
 
-
-
   fmt_init();
   settings_init();
-
+  getl_initialize ();
   message_dialog_init();
 
   the_dictionary = psppire_dict_new();
@@ -169,6 +168,7 @@
   /* start the event loop */
   gtk_main();
 
+  getl_uninitialize ();
   message_dialog_done();
 
   settings_done();

Index: src/ui/terminal/command-line.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/terminal/command-line.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- src/ui/terminal/command-line.c      7 Nov 2006 12:59:59 -0000       1.7
+++ src/ui/terminal/command-line.c      29 Nov 2006 11:50:32 -0000      1.8
@@ -30,15 +30,16 @@
 #include <libpspp/assertion.h>
 #include <libpspp/copyleft.h>
 #include <libpspp/message.h>
-#include <language/line-buffer.h>
+#include <language/syntax-file.h>
 #include "progname.h"
 #include <data/settings.h>
-#include "read-line.h"
 #include <output/output.h>
 #include <data/file-name.h>
+#include <libpspp/getl.h>
 #include <libpspp/str.h>
 #include <libpspp/version.h>
 #include <libpspp/verbose-msg.h>
+#include "read-line.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -194,7 +195,8 @@
       char *pspprc_fn = fn_search_path ("rc", config_path, NULL);
       if (pspprc_fn != NULL) 
         {
-          getl_append_syntax_file (pspprc_fn);
+         getl_append_source (create_syntax_file_source (pspprc_fn));
+
           free (pspprc_fn); 
         }
     }
@@ -204,12 +206,12 @@
       outp_configure_macro (argv[i]);
     else 
       {
-        getl_append_syntax_file (argv[i]);
+       getl_append_source (create_syntax_file_source (argv[i]));
         syntax_files++;
       }
 
   if (!syntax_files || interactive_mode)
-    getl_append_interactive (readln_read);
+    getl_append_source (create_readln_source () );
 
   return true;
 }

Index: src/ui/terminal/main.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/terminal/main.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- src/ui/terminal/main.c      16 Nov 2006 12:47:22 -0000      1.22
+++ src/ui/terminal/main.c      29 Nov 2006 11:50:32 -0000      1.23
@@ -28,8 +28,10 @@
 #include "progname.h"
 #include "read-line.h"
 
+
 #include <data/dictionary.h>
 #include <data/file-handle-def.h>
+#include <libpspp/getl.h>
 #include <data/file-name.h>
 #include <data/format.h>
 #include <data/procedure.h>
@@ -38,7 +40,7 @@
 #include <gsl/gsl_errno.h>
 #include <language/command.h>
 #include <language/lexer/lexer.h>
-#include <language/line-buffer.h>
+#include <language/prompt.h>
 #include <libpspp/compiler.h>
 #include <libpspp/message.h>
 #include <libpspp/version.h>
@@ -94,6 +96,7 @@
   fn_init ();
   fh_init ();
   getl_initialize ();
+  prompt_init ();
   readln_initialize ();
   settings_init ();
   random_init ();
@@ -194,6 +197,7 @@
       fh_done ();
       lex_destroy (the_lexer);
       getl_uninitialize ();
+      prompt_done ();
       readln_uninitialize ();
 
       outp_done ();

Index: src/ui/terminal/msg-ui.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/terminal/msg-ui.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- src/ui/terminal/msg-ui.c    29 Nov 2006 02:15:01 -0000      1.6
+++ src/ui/terminal/msg-ui.c    29 Nov 2006 11:50:32 -0000      1.7
@@ -24,10 +24,14 @@
 #include "exit.h"
 #include "linebreak.h"
 
-#include <language/line-buffer.h>
+#include <libpspp/msg-locator.h>
+#include <libpspp/getl.h>
 #include <data/settings.h>
 #include <libpspp/message.h>
+#include <libpspp/str.h>
 #include <errno.h>
+#include <stdio.h>
+
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -65,7 +69,7 @@
          msg_file = stdout;
        }
     }
-  msg_init (handle_msg, get_msg_location);
+  msg_init (handle_msg);
 }
 
 void

Index: src/ui/terminal/read-line.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/terminal/read-line.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- src/ui/terminal/read-line.c 14 Nov 2006 11:47:17 -0000      1.9
+++ src/ui/terminal/read-line.c 29 Nov 2006 11:50:32 -0000      1.10
@@ -29,13 +29,12 @@
 #include "msg-ui.h"
 
 #include <data/file-name.h>
-#include <data/file-name.h>
 #include <data/settings.h>
 #include <language/command.h>
 #include <libpspp/message.h>
 #include <libpspp/str.h>
 #include <libpspp/version.h>
-#include <output/table.h>
+#include <language/prompt.h>
 
 #include "xalloc.h"
 
@@ -52,6 +51,16 @@
 static char **dont_complete (const char *, int, int);
 #endif /* HAVE_READLINE */
 
+
+struct readln_source 
+{
+  struct getl_interface parent ;
+
+  bool (*interactive_func) (struct string *line,
+                           enum prompt_style) ;
+};
+
+
 static bool initialised = false;
 
 /* Initialize getl. */
@@ -81,13 +90,29 @@
   initialised = false;
 
 #if HAVE_READLINE && unix
-  if (history_file != NULL)
+  if (history_file != NULL && false == get_testing_mode() )
     write_history (history_file);
   clear_history ();
   free (history_file);
 #endif
 }
 
+
+static bool
+read_interactive (struct getl_interface *s, struct string *line)
+{
+  struct readln_source *is  =
+    (struct readln_source *) s ;
+
+  return is->interactive_func (line, prompt_get_style ());
+}
+
+static bool
+always_true (const struct getl_interface *s UNUSED)
+{
+  return true;
+}
+
 /* Display a welcoming message. */
 static void
 welcome (void)
@@ -113,14 +138,19 @@
 #endif
 }
 
+
+
+
+
+
 /* Gets a line from the user and stores it into LINE.
    Prompts the user with PROMPT.
    Returns true if successful, false at end of file.
-   Suitable for passing to getl_append_interactive(). */
-bool
-readln_read (struct string *line, enum getl_prompt_style style)
+   */
+static bool
+readln_read (struct string *line, enum prompt_style style)
 {
-  const char *prompt = getl_get_prompt (style);
+  const char *prompt = prompt_get (style);
 #if HAVE_READLINE
   char *string;
 #endif
@@ -132,7 +162,7 @@
   welcome ();
 
 #if HAVE_READLINE
-  rl_attempted_completion_function = (style == GETL_PROMPT_FIRST
+  rl_attempted_completion_function = (style == PROMPT_FIRST
                                       ? complete_command_name
                                       : dont_complete);
   string = readline (prompt);
@@ -159,6 +189,29 @@
 #endif
 }
 
+
+static void
+readln_close (struct getl_interface *i)
+{
+  free (i);
+}
+
+/* Creates a source which uses readln to get its line */
+struct getl_interface *
+create_readln_source (void)
+{
+  struct readln_source *rlns  = xzalloc (sizeof (*rlns));
+
+  rlns->interactive_func = readln_read;
+
+  rlns->parent.interactive = always_true;
+  rlns->parent.read = read_interactive;
+  rlns->parent.close = readln_close;
+
+  return (struct getl_interface *) rlns;
+}
+
+
 #if HAVE_READLINE
 static char *command_generator (const char *text, int state);
 

Index: src/ui/terminal/read-line.h
===================================================================
RCS file: /sources/pspp/pspp/src/ui/terminal/read-line.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/ui/terminal/read-line.h 28 Jun 2006 05:49:03 -0000      1.3
+++ src/ui/terminal/read-line.h 29 Nov 2006 11:50:32 -0000      1.4
@@ -21,11 +21,14 @@
 #define READLN_H
 
 #include <libpspp/str.h>
-#include <language/line-buffer.h>
+#include <libpspp/getl.h>
 
 void readln_initialize (void);
 void readln_uninitialize (void);
-bool readln_read (struct string *line, enum getl_prompt_style);
+
+struct getl_interface *create_readln_source (void);
+
+
 
 #endif /* READLN_H */
 

Index: tests/bugs/get-no-file.sh
===================================================================
RCS file: /sources/pspp/pspp/tests/bugs/get-no-file.sh,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- tests/bugs/get-no-file.sh   11 Mar 2006 07:16:40 -0000      1.5
+++ tests/bugs/get-no-file.sh   29 Nov 2006 11:50:32 -0000      1.6
@@ -64,7 +64,7 @@
 # We use the stdinput here, because the bug seems to manifest itself only in 
 # interactive mode.
 activity="run program"
-cat $TESTFILE | $SUPERVISOR $PSPP -o raw-ascii  > /dev/null
+cat $TESTFILE | $SUPERVISOR $PSPP --testing-mode -o raw-ascii  > /dev/null
 if [ $? -ne 0 ] ; then fail ; fi
 
 pass




reply via email to

[Prev in Thread] Current Thread [Next in Thread]