X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Futilities%2Finclude.c;h=1efa3bd2e3c5d5cf196d9dc4be1eb6465cb5cca1;hb=5905c43031658415a3d013e1572bd70e734e3813;hp=b0823eafcb72a8e4954b55c9dc72b558d3c6dc9e;hpb=450bd01ed7355f7420cf436d60620f4078661eff;p=pspp diff --git a/src/language/utilities/include.c b/src/language/utilities/include.c index b0823eafcb..1efa3bd2e3 100644 --- a/src/language/utilities/include.c +++ b/src/language/utilities/include.c @@ -23,7 +23,6 @@ #include #include "data/dataset.h" -#include "data/file-name.h" #include "data/session.h" #include "language/command.h" #include "language/lexer/include-path.h" @@ -62,7 +61,10 @@ do_insert (struct lexer *lexer, struct dataset *ds, enum variant variant) if (!lex_force_string_or_id (lexer)) return CMD_FAILURE; - relative_name = utf8_to_filename (lex_tokcstr (lexer)); + relative_name = utf8_to_filename (lex_tokcstr (lexer)); + if (NULL == relative_name) + return CMD_FAILURE; + filename = include_path_search (relative_name); free (relative_name); @@ -103,8 +105,7 @@ do_insert (struct lexer *lexer, struct dataset *ds, enum variant variant) syntax_mode = LEX_SYNTAX_AUTO; else { - lex_error_expecting (lexer, "BATCH", "INTERACTIVE", "AUTO", - NULL_SENTINEL); + lex_error_expecting (lexer, "BATCH", "INTERACTIVE", "AUTO"); goto exit; } } @@ -121,7 +122,7 @@ do_insert (struct lexer *lexer, struct dataset *ds, enum variant variant) } else { - lex_error_expecting (lexer, "YES", "NO", NULL_SENTINEL); + lex_error_expecting (lexer, "YES", "NO"); goto exit; } } @@ -138,7 +139,7 @@ do_insert (struct lexer *lexer, struct dataset *ds, enum variant variant) } else { - lex_error_expecting (lexer, "CONTINUE", "STOP", NULL_SENTINEL); + lex_error_expecting (lexer, "CONTINUE", "STOP"); goto exit; } }