projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'origin/master' into sso
[pspp-builds.git]
/
src
/
language
/
utilities
/
include.c
diff --git
a/src/language/utilities/include.c
b/src/language/utilities/include.c
index f3c87779787188ad986e2be99cdb16d335c9354f..52d0e09c91dec5b559e8c86104917f08cad2b5dd 100644
(file)
--- a/
src/language/utilities/include.c
+++ b/
src/language/utilities/include.c
@@
-15,20
+15,22
@@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
+
#include <ctype.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
+
+#include <data/file-name.h>
#include <language/command.h>
#include <language/command.h>
-#include <libpspp/message.h>
-#include <libpspp/getl.h>
-#include <language/syntax-file.h>
#include <language/lexer/lexer.h>
#include <language/lexer/lexer.h>
+#include <language/syntax-file.h>
+#include <libpspp/getl.h>
+#include <libpspp/message.h>
#include <libpspp/str.h>
#include <libpspp/str.h>
-#include <data/file-name.h>
#include "dirname.h"
#include "dirname.h"
-#include "canonicalize.h"
#include "xalloc.h"
#include "gettext.h"
#include "xalloc.h"
#include "gettext.h"
@@
-89,8
+91,8
@@
cmd_insert (struct lexer *lexer, struct dataset *ds UNUSED)
syntax_mode = GETL_BATCH;
else
{
syntax_mode = GETL_BATCH;
else
{
- lex_error
(lexer
,
-
_("Expecting BATCH or INTERACTIVE after SYNTAX.")
);
+ lex_error
(lexer, _("expecting %s or %s after %s")
,
+
"BATCH", "INTERACTIVE", "SYNTAX"
);
return CMD_FAILURE;
}
}
return CMD_FAILURE;
}
}
@@
-107,7
+109,8
@@
cmd_insert (struct lexer *lexer, struct dataset *ds UNUSED)
}
else
{
}
else
{
- lex_error (lexer, _("Expecting YES or NO after CD."));
+ lex_error (lexer, _("expecting %s or %s after %s"),
+ "YES", "NO", "CD");
return CMD_FAILURE;
}
}
return CMD_FAILURE;
}
}
@@
-124,7
+127,8
@@
cmd_insert (struct lexer *lexer, struct dataset *ds UNUSED)
}
else
{
}
else
{
- lex_error (lexer, _("Expecting CONTINUE or STOP after ERROR."));
+ lex_error (lexer, _("expecting %s or %s after %s"),
+ "CONTINUE", "STOP", "ERROR");
return CMD_FAILURE;
}
}
return CMD_FAILURE;
}
}
@@
-174,7
+178,7
@@
parse_insert (struct lexer *lexer, char **filename)
lex_match (lexer, '=');
/* File name can be identifier or string. */
lex_match (lexer, '=');
/* File name can be identifier or string. */
- if (lex_token (lexer) != T_ID &&
lex_token (lexer) != T_STRING
)
+ if (lex_token (lexer) != T_ID &&
!lex_is_string (lexer)
)
{
lex_error (lexer, _("expecting file name"));
return CMD_FAILURE;
{
lex_error (lexer, _("expecting file name"));
return CMD_FAILURE;
@@
-193,7
+197,7
@@
parse_insert (struct lexer *lexer, char **filename)
return CMD_FAILURE;
}
return CMD_FAILURE;
}
- *filename =
canonicalize_file_name (relative_filename)
;
+ *filename =
relative_filename
;
if (*filename == NULL)
{
msg (SE, _("Unable to open `%s': %s."),
if (*filename == NULL)
{
msg (SE, _("Unable to open `%s': %s."),
@@
-201,7
+205,6
@@
parse_insert (struct lexer *lexer, char **filename)
free (relative_filename);
return CMD_FAILURE;
}
free (relative_filename);
return CMD_FAILURE;
}
- free (relative_filename);
return CMD_SUCCESS;
}
return CMD_SUCCESS;
}