Applying patch #5562
authorJohn Darrington <john@darrington.wattle.id.au>
Wed, 29 Nov 2006 11:50:31 +0000 (11:50 +0000)
committerJohn Darrington <john@darrington.wattle.id.au>
Wed, 29 Nov 2006 11:50:31 +0000 (11:50 +0000)
24 files changed:
po/de.po
po/pspp.pot
src/language/ChangeLog
src/language/automake.mk
src/language/command.c
src/language/control/repeat.c
src/language/data-io/data-reader.c
src/language/data-io/file-handle.q
src/language/lexer/lexer.c
src/language/utilities/include.c
src/language/utilities/set.q
src/libpspp/ChangeLog
src/libpspp/automake.mk
src/libpspp/message.c
src/libpspp/message.h
src/ui/flexifile.c
src/ui/gui/message-dialog.c
src/ui/gui/psppire.c
src/ui/terminal/command-line.c
src/ui/terminal/main.c
src/ui/terminal/msg-ui.c
src/ui/terminal/read-line.c
src/ui/terminal/read-line.h
tests/bugs/get-no-file.sh

index db558a79862c84da928c9543c876289e0323fc70..bd5717df2eacc1d63385b9d4be2b8f9a3653e3c5 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -10,7 +10,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PSPP 0.4.2\n"
 "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
 msgstr ""
 "Project-Id-Version: PSPP 0.4.2\n"
 "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"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 <john@darrington.wattle.id.au>\n"
 "Language-Team: German <pspp-dev@gnu.org>\n"
 "PO-Revision-Date: 2006-05-26 17:49+0800\n"
 "Last-Translator: John Darrington <john@darrington.wattle.id.au>\n"
 "Language-Team: German <pspp-dev@gnu.org>\n"
@@ -1012,33 +1012,33 @@ msgstr ""
 msgid "This command may not follow ELSE in DO IF...END IF."
 msgstr ""
 
 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 ""
 
 #, 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 ""
 
 #, 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 ""
 
 #, 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 ""
 
 #, 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 ""
 
 msgid "String expected."
 msgstr ""
 
-#: src/language/control/repeat.c:456
+#: src/language/control/repeat.c:470
 msgid "No matching DO REPEAT."
 msgstr ""
 
 msgid "No matching DO REPEAT."
 msgstr ""
 
@@ -1184,44 +1184,44 @@ msgstr ""
 msgid "I/O error occurred writing data file \"%s\"."
 msgstr ""
 
 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 ""
 
 #, 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 ""
 
 #, 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 ""
 
 #, 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 ""
 
 msgid "file"
 msgstr ""
 
-#: src/language/data-io/file-handle.q:154
+#: src/language/data-io/file-handle.q:153
 msgid "inline file"
 msgstr ""
 
 msgid "inline file"
 msgstr ""
 
-#: src/language/data-io/file-handle.q:156
+#: src/language/data-io/file-handle.q:155
 msgid "scratch file"
 msgstr ""
 
 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 ""
 
 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 ""
 #, c-format
 msgid "Handle for %s not allowed here."
 msgstr ""
@@ -2159,8 +2159,8 @@ msgstr ""
 msgid "%s is a PSPP extension."
 msgstr ""
 
 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 ""
 #, c-format
 msgid "%s is not yet implemented."
 msgstr ""
@@ -2356,31 +2356,6 @@ msgstr ""
 msgid "Bad bounds in use of TO convention."
 msgstr ""
 
 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 ""
 #: src/language/stats/aggregate.c:218
 msgid "while expecting COLUMNWISE"
 msgstr ""
@@ -3472,6 +3447,26 @@ msgstr ""
 msgid "%s & %s"
 msgstr ""
 
 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."
 #: src/language/tests/float-format.c:127
 #, c-format
 msgid "%d-byte string needed but %d-byte string supplied."
@@ -3500,10 +3495,15 @@ msgstr ""
 msgid "Only USE ALL is currently implemented."
 msgstr ""
 
 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 ""
 
 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."
 #: src/language/utilities/permissions.c:77
 #, c-format
 msgid "Expecting %s or %s."
@@ -4213,15 +4213,15 @@ msgstr "Speichern unter"
 msgid "Font Selection"
 msgstr "Schriftwahlung"
 
 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"
 
 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"
 
 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"
 
 msgid "PSPP Error"
 msgstr "PSPP Fehler"
 
@@ -4233,7 +4233,7 @@ msgstr "Unpassend Wert für Variable"
 msgid "Incorrect range specification"
 msgstr "Falshe Spannweitebeschreibung"
 
 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!"
 
 msgid "Sorry. The help system hasn't yet been implemented."
 msgstr "Es gibt noch nicht kein Helpsysteme. Schade!"
 
@@ -4596,7 +4596,7 @@ msgstr "Ordinalwert"
 msgid "Scale"
 msgstr "Skalwert"
 
 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"
 #, c-format
 msgid ""
 "PSPP, a program for statistical analysis of sample data.\n"
@@ -4642,43 +4642,43 @@ msgid ""
 "\n"
 msgstr ""
 
 "\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 ""
 
 #, 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 ""
 
 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 ""
 
 #, 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 ""
 
 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 ""
 
 #, 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 ""
 
 #, 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"
 
 msgid "error"
 msgstr "Fehler"
 
-#: src/ui/terminal/msg-ui.c:144
+#: src/ui/terminal/msg-ui.c:148
 msgid "warning"
 msgstr "Warnung"
 
 msgid "warning"
 msgstr "Warnung"
 
index 46e9bc1a43e24b69eaf04873e47715587c83f098..fe72d407cdd8d3e64d50a7fe2bf39c3fed237dbd 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"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 <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1011,33 +1011,33 @@ msgstr ""
 msgid "This command may not follow ELSE in DO IF...END IF."
 msgstr ""
 
 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 ""
 
 #, 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 ""
 
 #, 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 ""
 
 #, 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 ""
 
 #, 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 ""
 
 msgid "String expected."
 msgstr ""
 
-#: src/language/control/repeat.c:456
+#: src/language/control/repeat.c:470
 msgid "No matching DO REPEAT."
 msgstr ""
 
 msgid "No matching DO REPEAT."
 msgstr ""
 
@@ -1183,44 +1183,44 @@ msgstr ""
 msgid "I/O error occurred writing data file \"%s\"."
 msgstr ""
 
 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 ""
 
 #, 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 ""
 
 #, 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 ""
 
 #, 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 ""
 
 msgid "file"
 msgstr ""
 
-#: src/language/data-io/file-handle.q:154
+#: src/language/data-io/file-handle.q:153
 msgid "inline file"
 msgstr ""
 
 msgid "inline file"
 msgstr ""
 
-#: src/language/data-io/file-handle.q:156
+#: src/language/data-io/file-handle.q:155
 msgid "scratch file"
 msgstr ""
 
 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 ""
 
 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 ""
 #, c-format
 msgid "Handle for %s not allowed here."
 msgstr ""
@@ -2158,8 +2158,8 @@ msgstr ""
 msgid "%s is a PSPP extension."
 msgstr ""
 
 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 ""
 #, c-format
 msgid "%s is not yet implemented."
 msgstr ""
@@ -2355,31 +2355,6 @@ msgstr ""
 msgid "Bad bounds in use of TO convention."
 msgstr ""
 
 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 ""
 #: src/language/stats/aggregate.c:218
 msgid "while expecting COLUMNWISE"
 msgstr ""
@@ -3471,6 +3446,26 @@ msgstr ""
 msgid "%s & %s"
 msgstr ""
 
 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."
 #: src/language/tests/float-format.c:127
 #, c-format
 msgid "%d-byte string needed but %d-byte string supplied."
@@ -3499,10 +3494,15 @@ msgstr ""
 msgid "Only USE ALL is currently implemented."
 msgstr ""
 
 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 ""
 
 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."
 #: src/language/utilities/permissions.c:77
 #, c-format
 msgid "Expecting %s or %s."
@@ -4212,15 +4212,15 @@ msgstr ""
 msgid "Font Selection"
 msgstr ""
 
 msgid "Font Selection"
 msgstr ""
 
-#: src/ui/gui/message-dialog.c:136
+#: src/ui/gui/message-dialog.c:128
 msgid "Script Error"
 msgstr ""
 
 msgid "Script Error"
 msgstr ""
 
-#: src/ui/gui/message-dialog.c:140
+#: src/ui/gui/message-dialog.c:132
 msgid "Data File Error"
 msgstr ""
 
 msgid "Data File Error"
 msgstr ""
 
-#: src/ui/gui/message-dialog.c:145
+#: src/ui/gui/message-dialog.c:137
 msgid "PSPP Error"
 msgstr ""
 
 msgid "PSPP Error"
 msgstr ""
 
@@ -4232,7 +4232,7 @@ msgstr ""
 msgid "Incorrect range specification"
 msgstr ""
 
 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 ""
 
 msgid "Sorry. The help system hasn't yet been implemented."
 msgstr ""
 
@@ -4587,7 +4587,7 @@ msgstr ""
 msgid "Scale"
 msgstr ""
 
 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"
 #, c-format
 msgid ""
 "PSPP, a program for statistical analysis of sample data.\n"
@@ -4633,42 +4633,42 @@ msgid ""
 "\n"
 msgstr ""
 
 "\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 ""
 
 #, 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 ""
 
 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 ""
 
 #, 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 ""
 
 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 ""
 
 #, 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 ""
 
 #, 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 ""
 
 msgid "error"
 msgstr ""
 
-#: src/ui/terminal/msg-ui.c:144
+#: src/ui/terminal/msg-ui.c:148
 msgid "warning"
 msgstr ""
 msgid "warning"
 msgstr ""
index d645127fcfcd259fcbe1fc158a1c20e73f8af0b9..45df782c4805f586aad15a67cf0595dbdc3bdb76 100644 (file)
@@ -1,3 +1,12 @@
+Wed Nov 29 19:35:44 WST 2006 John Darrington <john@darrington.wattle.id.au>
+
+       * 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  <blp@gnu.org>
 
        * command.def: HOST command needs F_KEEP_FINAL_TOKEN.
 Wed Nov 22 06:26:42 2006  Ben Pfaff  <blp@gnu.org>
 
        * command.def: HOST command needs F_KEEP_FINAL_TOKEN.
index e1aed86a858f57afae8e31f4e64ba87a21ad0399..6e53fbf35777e19e1014e8b0ac993ca8126e597c 100644 (file)
@@ -13,8 +13,10 @@ include $(top_srcdir)/src/language/expressions/automake.mk
 noinst_LIBRARIES += src/language/liblanguage.a 
 
 src_language_liblanguage_a_SOURCES = \
 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 
        src/language/command.c \
        src/language/command.h \
        src/language/command.def 
index cfae2ba03e5ec4b2b5c1f56e90f2c5993ed9d7c0..032e4d7f1c4613410f8e318053264481b0a46683 100644 (file)
@@ -32,7 +32,7 @@
 #include <data/settings.h>
 #include <data/variable.h>
 #include <language/lexer/lexer.h>
 #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>
 #include <libpspp/alloc.h>
 #include <libpspp/assertion.h>
 #include <libpspp/compiler.h>
@@ -162,7 +162,7 @@ do_parse_command (struct lexer *lexer, struct dataset *ds, enum cmd_state state)
   enum cmd_result result;
 
   /* Read the command's first token. */
   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)
   set_completion_state (state);
   lex_get (lexer);
   if (lex_token (lexer) == T_STOP)
@@ -172,7 +172,7 @@ do_parse_command (struct lexer *lexer, struct dataset *ds, enum cmd_state state)
       /* Null commands can result from extra empty lines. */
       return CMD_SUCCESS; 
     }
       /* 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);
 
   /* Parse the command name. */
   command = parse_command_name (lexer);
index 384ac775faf49e4185eec0b72c1a0430e0faf07c..45e95829b559bd53277a216221c353410f230fc0 100644 (file)
 #include <data/dictionary.h>
 #include <data/procedure.h>
 #include <data/settings.h>
 #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/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/alloc.h>
 #include <libpspp/message.h>
-#include <libpspp/message.h>
 #include <libpspp/misc.h>
 #include <libpspp/pool.h>
 #include <libpspp/str.h>
 #include <libpspp/misc.h>
 #include <libpspp/pool.h>
 #include <libpspp/str.h>
@@ -73,6 +72,8 @@ struct repeat_entry
 /* A DO REPEAT...END REPEAT block. */
 struct repeat_block 
   {
 /* 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. */
     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_specification (struct lexer *, struct repeat_block *);
 static bool parse_lines (struct lexer *, struct repeat_block *);
 static void create_vars (struct repeat_block *);
 
 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 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);
 
 
-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);
 
 int
 cmd_do_repeat (struct lexer *lexer, struct dataset *ds)
 
 int
 cmd_do_repeat (struct lexer *lexer, struct dataset *ds)
@@ -111,8 +118,13 @@ cmd_do_repeat (struct lexer *lexer, struct dataset *ds)
   
   block->cur_line = NULL;
   block->loop_idx = -1;
   
   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;
 
 
   return CMD_SUCCESS;
 
@@ -147,7 +159,8 @@ parse_specification (struct lexer *lexer, struct repeat_block *block)
       for (iter = block->macros; iter != NULL; iter = iter->next)
        if (!strcasecmp (iter->id, lex_tokid (lexer)))
          {
       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;
          }
 
            return false;
          }
 
@@ -278,8 +291,8 @@ parse_lines (struct lexer *lexer, struct repeat_block *block)
 
   for (;;)
     {
 
   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;
       struct line_list *line;
       struct string cur_line_copy;
       bool dot;
@@ -288,9 +301,10 @@ parse_lines (struct lexer *lexer, struct repeat_block *block)
         return false;
 
       /* If the current file has changed then record the fact. */
         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))
           || !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) );
         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 @@ find_substitution (struct repeat_block *block, const char *name, size_t length)
 /* Makes appropriate DO REPEAT macro substitutions within the 
    repeated lines. */
 static void
 /* 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;
   bool in_apos, in_quote;
   char *cp;
   struct string output;
@@ -523,11 +537,15 @@ do_repeat_filter (struct string *line, void *block_)
    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. */
    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_) 
 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) 
   struct line_list *line;
 
   if (block->cur_line == NULL) 
@@ -540,8 +558,10 @@ do_repeat_read (struct string *output, char **file_name, int *line_number,
   line = block->cur_line;
 
   ds_assign_cstr (output, line->line);
   line = block->cur_line;
 
   ds_assign_cstr (output, line->line);
+#if 0
   *file_name = line->file_name;
   *line_number = -line->line_number;
   *file_name = line->file_name;
   *line_number = -line->line_number;
+#endif
   block->cur_line = line->next;
   return true;
 }
   block->cur_line = line->next;
   return true;
 }
@@ -549,8 +569,15 @@ do_repeat_read (struct string *output, char **file_name, int *line_number,
 /* Frees a DO REPEAT block.
    Called by getl to close out the DO REPEAT block. */
 static void
 /* 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);
 }
   pool_destroy (block->pool);
 }
+
+
+static bool 
+always_false (const struct getl_interface *i UNUSED)
+{
+  return false;
+}
index cd065ddb5bddc94ef062dbbc348e5fda5e3cc706..49ec778918349827d3ab3502bf7719767c844829 100644 (file)
@@ -32,7 +32,7 @@
 #include <language/command.h>
 #include <language/data-io/file-handle.h>
 #include <language/lexer/lexer.h>
 #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>
 #include <libpspp/alloc.h>
 #include <libpspp/assertion.h>
 #include <libpspp/message.h>
@@ -169,7 +169,7 @@ read_inline_record (struct dfm_reader *r)
         lex_get (r->lexer);
       if (!lex_force_match_id (r->lexer, "BEGIN") || !lex_force_match_id (r->lexer, "DATA"))
         return false;
         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))
     }
       
   if (!lex_get_line_raw (r->lexer))
@@ -444,7 +444,7 @@ cmd_begin_data (struct lexer *lexer, struct dataset *ds)
   r->flags |= DFM_SAW_BEGIN_DATA;
 
   /* Input procedure reads from inline file. */
   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);
   ok = procedure (ds, NULL, NULL);
 
   dfm_close_reader (r);
index 31039a3541328911191c3b56c437fc97fee6b5fe..ada87f9517bae46908919010437bad86ea762cc8 100644 (file)
@@ -26,7 +26,6 @@
 #include <data/file-name.h>
 #include <language/command.h>
 #include <language/lexer/lexer.h>
 #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>
 #include <libpspp/assertion.h>
 #include <libpspp/message.h>
 #include <libpspp/magic.h>
index b6e5fc4e39683ef3296b7e21753af463d6aaec78..9c6063fd066b04f018e34e4a7f545058f56df3ef 100644 (file)
@@ -30,9 +30,9 @@
 #include <libpspp/assertion.h>
 #include <language/command.h>
 #include <libpspp/message.h>
 #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/magic.h>
 #include <data/settings.h>
+#include <libpspp/getl.h>
 #include <libpspp/str.h>
 
 #include "size_max.h"
 #include <libpspp/str.h>
 
 #include "size_max.h"
index 3e9a5b7bfc7230d28e1997d452012bfd3473d19d..c812c97238a9588fddf3586ed366766248372f92 100644 (file)
 #include <libpspp/alloc.h>
 #include <language/command.h>
 #include <libpspp/message.h>
 #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 <language/lexer/lexer.h>
 #include <libpspp/str.h>
+#include <data/file-name.h>
+
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -33,6 +36,9 @@
 int
 cmd_include (struct lexer *lexer, struct dataset *ds UNUSED)
 {
 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, '=');
   /* Skip optional FILE=. */
   if (lex_match_id (lexer, "FILE"))
     lex_match (lexer, '=');
@@ -43,7 +49,21 @@ cmd_include (struct lexer *lexer, struct dataset *ds UNUSED)
       lex_error (lexer, _("expecting file name")); 
       return CMD_CASCADING_FAILURE;
     }
       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);
 
   lex_get (lexer);
   return lex_end_of_command (lexer);
index 8a79b1947e3f1491874492d79a570b42d6c16f46..d6252cf4e687c26cb5538b76fe7c56a531346ece 100644 (file)
@@ -34,7 +34,7 @@
 #include <language/command.h>
 #include <language/lexer/format-parser.h>
 #include <language/lexer/lexer.h>
 #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>
 #include <libpspp/alloc.h>
 #include <libpspp/compiler.h>
 #include <libpspp/copyleft.h>
@@ -152,11 +152,11 @@ cmd_set (struct lexer *lexer, struct dataset *ds)
     do_cc (cmd.s_cce, FMT_CCE);
 
   if (cmd.sbc_prompt)
     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)
   if (cmd.sbc_cprompt)
-    getl_set_prompt (GETL_PROMPT_LATER, cmd.s_cprompt);
+    prompt_set (PROMPT_LATER, cmd.s_cprompt);
   if (cmd.sbc_dprompt)
   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 ? '.' : ',');
 
   if (cmd.sbc_decimal)
     fmt_set_decimal (cmd.dec == STC_DOT ? '.' : ',');
index 85ab3204ddf178ab685a2fc51d72485b9ff291fc..6e09dfb201a951a3afed56801062c818d4dbfae0 100644 (file)
@@ -1,3 +1,11 @@
+Wed Nov 29 19:35:44 WST 2006 John Darrington <john@darrington.wattle.id.au>
+
+       * 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  <blp@gnu.org>
 
        * misc.h: (min) Removed.  All references updated to use MIN, from
 Fri Nov 24 17:27:00 2006  Ben Pfaff  <blp@gnu.org>
 
        * misc.h: (min) Removed.  All references updated to use MIN, from
index da01e2d5f30dddac99bf12437c57d3abe34183d6..305a7c214f1c60a14b1669ff4e98d462cdc83de6 100644 (file)
@@ -19,12 +19,16 @@ src_libpspp_libpspp_a_SOURCES = \
        src/libpspp/float-format.h \
        src/libpspp/freaderror.c \
        src/libpspp/freaderror.h \
        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/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 \
        src/libpspp/ll.c \
        src/libpspp/ll.h \
        src/libpspp/llx.c \
index 1a4601fc18981b55bf3ed9f1422b1478d872e8ac..24bb8e874ba10d77dd29cf76e168af795cfaee8a 100644 (file)
@@ -19,7 +19,8 @@
 
 #include <config.h>
 
 
 #include <config.h>
 
-#include <libpspp/message.h>
+#include "message.h"
+#include "msg-locator.h"
 
 #include <assert.h>
 #include <stdarg.h>
 
 #include <assert.h>
 #include <stdarg.h>
@@ -39,8 +40,6 @@ static char *command_name;
 
 /* Message handler as set by msg_init(). */
 static void (*msg_handler)  (const struct msg *);
 
 /* 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;
 
 /* Disables emitting messages if positive. */
 static int messages_disabled;
@@ -65,11 +64,9 @@ msg (enum msg_class class, const char *format, ...)
 }
 
 void
 }
 
 void
-msg_init ( void (*handler) (const struct msg *), 
-          void (*location) (struct msg_locator *) ) 
+msg_init ( void (*handler) (const struct msg *) )
 {
   msg_handler = handler;
 {
   msg_handler = handler;
-  msg_location = location;
 }
 
 void
 }
 
 void
@@ -102,7 +99,7 @@ msg_destroy(struct msg *m)
 void
 msg_emit (struct msg *m) 
 {
 void
 msg_emit (struct msg *m) 
 {
-  msg_location (&m->where);
+  get_msg_location (&m->where);
   if (!messages_disabled)
     msg_handler (m);
   free (m->text);
   if (!messages_disabled)
     msg_handler (m);
   free (m->text);
index e345ea655132858d34a4f708e5b9f737b00aee5d..ffafd999f6490d4b76789b2c2e9b643b782734f1 100644 (file)
@@ -86,8 +86,7 @@ struct msg
   };
 
 /* Initialization. */
   };
 
 /* 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);
 
 
 void msg_done (void);
 
index 5d06f87621376c615ce15c42f38fd2723eadb528..9ab6cb98257591b27187015e2c6e3793201312dc 100644 (file)
@@ -22,6 +22,7 @@
 #include <xalloc.h>
 #include <assert.h>
 #include "flexifile.h"
 #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>
 #include <data/casefile.h>
 #include <data/casefile-private.h>
 #include <data/case.h>
index af1886c98a7f619fdd5706259ebf21d4548dcb48..77876b0f3a176f4c3adbfec699705ca32b5f7c37 100644 (file)
@@ -29,6 +29,7 @@
 #define N_(msgid) msgid
 
 #include <libpspp/message.h>
 #define N_(msgid) msgid
 
 #include <libpspp/message.h>
+#include <libpspp/msg-locator.h>
 #include "message-dialog.h"
 #include "progname.h"
 
 #include "message-dialog.h"
 #include "progname.h"
 
@@ -49,22 +50,13 @@ static void enqueue_msg (const struct msg *m);
 static GQueue *message_queue;
 
 
 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();
 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)
 {
 void
 message_dialog_done (void)
 {
index 8ae97f1511970845178d947c5fae2f7419cf2a66..6dd41b34156e82884bc7bfbb290749f2ee54913a 100644 (file)
@@ -27,6 +27,7 @@
 #include <libpspp/copyleft.h>
 #include <data/format.h>
 #include <data/settings.h>
 #include <libpspp/copyleft.h>
 #include <data/format.h>
 #include <data/settings.h>
+#include <libpspp/getl.h>
 
 #include <getopt.h>
 #include <gtk/gtk.h>
 
 #include <getopt.h>
 #include <gtk/gtk.h>
@@ -113,11 +114,9 @@ main(int argc, char *argv[])
 
   glade_init();
 
 
   glade_init();
 
-
-
   fmt_init();
   settings_init();
   fmt_init();
   settings_init();
-
+  getl_initialize ();
   message_dialog_init();
 
   the_dictionary = psppire_dict_new();
   message_dialog_init();
 
   the_dictionary = psppire_dict_new();
@@ -169,6 +168,7 @@ main(int argc, char *argv[])
   /* start the event loop */
   gtk_main();
 
   /* start the event loop */
   gtk_main();
 
+  getl_uninitialize ();
   message_dialog_done();
 
   settings_done();
   message_dialog_done();
 
   settings_done();
index 54e4a7c2d90c51ce58bddbd7644275b90e4b65a3..f7090a3eb44f18d5086ef8868da7bc7d2f26827e 100644 (file)
 #include <libpspp/assertion.h>
 #include <libpspp/copyleft.h>
 #include <libpspp/message.h>
 #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 "progname.h"
 #include <data/settings.h>
-#include "read-line.h"
 #include <output/output.h>
 #include <data/file-name.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 <libpspp/str.h>
 #include <libpspp/version.h>
 #include <libpspp/verbose-msg.h>
+#include "read-line.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -194,7 +195,8 @@ parse_command_line (int argc, char **argv)
       char *pspprc_fn = fn_search_path ("rc", config_path, NULL);
       if (pspprc_fn != NULL) 
         {
       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); 
         }
     }
           free (pspprc_fn); 
         }
     }
@@ -204,12 +206,12 @@ parse_command_line (int argc, char **argv)
       outp_configure_macro (argv[i]);
     else 
       {
       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)
         syntax_files++;
       }
 
   if (!syntax_files || interactive_mode)
-    getl_append_interactive (readln_read);
+    getl_append_source (create_readln_source () );
 
   return true;
 }
 
   return true;
 }
index 5e9a605bc4aaef361f8c28d2940c4d4770eb7ede..5b4ad2d3ac54d6002dbb81c51678375298406d36 100644 (file)
 #include "progname.h"
 #include "read-line.h"
 
 #include "progname.h"
 #include "read-line.h"
 
+
 #include <data/dictionary.h>
 #include <data/file-handle-def.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>
 #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 <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>
 #include <libpspp/compiler.h>
 #include <libpspp/message.h>
 #include <libpspp/version.h>
@@ -94,6 +96,7 @@ main (int argc, char **argv)
   fn_init ();
   fh_init ();
   getl_initialize ();
   fn_init ();
   fh_init ();
   getl_initialize ();
+  prompt_init ();
   readln_initialize ();
   settings_init ();
   random_init ();
   readln_initialize ();
   settings_init ();
   random_init ();
@@ -194,6 +197,7 @@ terminate (bool success)
       fh_done ();
       lex_destroy (the_lexer);
       getl_uninitialize ();
       fh_done ();
       lex_destroy (the_lexer);
       getl_uninitialize ();
+      prompt_done ();
       readln_uninitialize ();
 
       outp_done ();
       readln_uninitialize ();
 
       outp_done ();
index ddd927c58f1b31f4c746e704d0161a4c21ea66b6..7cb652c021df77b3b42fe3ab70de9eeb4d7e582a 100644 (file)
 #include "exit.h"
 #include "linebreak.h"
 
 #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 <data/settings.h>
 #include <libpspp/message.h>
+#include <libpspp/str.h>
 #include <errno.h>
 #include <errno.h>
+#include <stdio.h>
+
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -65,7 +69,7 @@ msg_ui_init (void)
          msg_file = stdout;
        }
     }
          msg_file = stdout;
        }
     }
-  msg_init (handle_msg, get_msg_location);
+  msg_init (handle_msg);
 }
 
 void
 }
 
 void
index 46b53b7008ebfe0a865b1906c8b679f177a9e801..97427c6c1a59754a1f5ce20cfa31596566b8cb5c 100644 (file)
 
 #include "msg-ui.h"
 
 
 #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 <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"
 
 
 #include "xalloc.h"
 
@@ -52,6 +51,16 @@ static char **complete_command_name (const char *, int, int);
 static char **dont_complete (const char *, int, int);
 #endif /* HAVE_READLINE */
 
 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. */
 static bool initialised = false;
 
 /* Initialize getl. */
@@ -81,13 +90,29 @@ readln_uninitialize (void)
   initialised = false;
 
 #if HAVE_READLINE && unix
   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
 }
 
     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)
 /* Display a welcoming message. */
 static void
 welcome (void)
@@ -113,14 +138,19 @@ welcome (void)
 #endif
 }
 
 #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.
 /* 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
 #if HAVE_READLINE
   char *string;
 #endif
@@ -132,7 +162,7 @@ readln_read (struct string *line, enum getl_prompt_style style)
   welcome ();
 
 #if HAVE_READLINE
   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);
                                       ? complete_command_name
                                       : dont_complete);
   string = readline (prompt);
@@ -159,6 +189,29 @@ readln_read (struct string *line, enum getl_prompt_style style)
 #endif
 }
 
 #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);
 
 #if HAVE_READLINE
 static char *command_generator (const char *text, int state);
 
index 9d490fc9eb930d456847b0316bd752194250bb35..1133f648adc8558f15ad4f9fdc79fd7fdaa6f553 100644 (file)
 #define READLN_H
 
 #include <libpspp/str.h>
 #define READLN_H
 
 #include <libpspp/str.h>
-#include <language/line-buffer.h>
+#include <libpspp/getl.h>
 
 void readln_initialize (void);
 void readln_uninitialize (void);
 
 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 */
 
 
 #endif /* READLN_H */
 
index 56bb153a8f487da0b47995558a3bc26937b3c6d1..45b688276ca78507d4b5dc7e2a36d003b2887d04 100755 (executable)
@@ -64,7 +64,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 # We use the stdinput here, because the bug seems to manifest itself only in 
 # interactive mode.
 activity="run program"
 # 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
 if [ $? -ne 0 ] ; then fail ; fi
 
 pass