02110-1301, USA. */
#include <config.h>
-#include "line-buffer.h"
-#include "message.h"
+#include <language/line-buffer.h>
+#include <libpspp/message.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
-#include "alloc.h"
-#include "command.h"
-#include "message.h"
-#include "filename.h"
-#include "lexer.h"
-#include "settings.h"
-#include "str.h"
-#include "table.h"
-#include "variable.h"
-#include "version.h"
+#include <libpspp/alloc.h>
+#include <language/command.h>
+#include <libpspp/message.h>
+#include <data/file-name.h>
+#include <language/lexer/lexer.h>
+#include <data/settings.h>
+#include <libpspp/str.h>
+#include <output/table.h>
+#include <data/variable.h>
+#include <libpspp/version.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
struct getl_source *next; /* Next file in list. */
/* Current location. */
- char *fn; /* Filename. */
+ char *fn; /* File name. */
int ln; /* Line number. */
enum getl_source_type
getl_add_include_dir (const char *path)
{
if (ds_length (&getl_include_path))
- ds_putc (&getl_include_path, PATH_DELIMITER);
+ ds_putc (&getl_include_path, ':');
ds_puts (&getl_include_path, path);
}
append_source (create_syntax_file_source (fn));
}
-/* Inserts the given file with filename FN into the current file after
- the current line. */
+/* Inserts the given file with name FN into the current file
+ after the current line. */
void
getl_include_syntax_file (const char *fn)
{
if (cur_source != NULL)
{
char *found_fn = fn_search_path (fn, ds_c_str (&getl_include_path),
- fn_dirname (cur_source->fn));
+ fn_dir_name (cur_source->fn));
if (found_fn != NULL)
{
include_source (create_syntax_file_source (found_fn));
if (nfile_loc)
*f = *file_loc[nfile_loc - 1];
else
- getl_location (&f->filename, &f->line_number);
+ getl_location (&f->file_name, &f->line_number);
}
/* Reads a line from syntax file source S into LINE.
/* Open file, if not yet opened. */
if (s->u.syntax_file == NULL)
{
- msg (VM (1), _("%s: Opening as syntax file."), s->fn);
+ verbose_msg (1, _("opening \"%s\" as syntax file"), s->fn);
s->u.syntax_file = fn_open (s->fn, "r");
if (s->u.syntax_file == NULL)
/* Echo to listing file, if configured to do so. */
if (get_echo ())
- tab_output_text (TAB_LEFT | TAT_FIX, ds_c_str (line));
+ tab_output_text (TAB_LEFT | TAB_FIX, ds_c_str (line));
return true;
}