projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lexer: Get rid of lex_negative_to_dash().
[pspp]
/
src
/
language
/
utilities
/
permissions.c
diff --git
a/src/language/utilities/permissions.c
b/src/language/utilities/permissions.c
index 03458fcef01671f4ea4b263873ff89ebe86a7a2b..34fa6fd83defb8701b97c9d505f3da22100c0ed4 100644
(file)
--- a/
src/language/utilities/permissions.c
+++ b/
src/language/utilities/permissions.c
@@
-15,7
+15,7
@@
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 <libpspp/message.h>
+
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
@@
-42,21
+42,24
@@
cmd_permissions (struct lexer *lexer, struct dataset *ds UNUSED)
{
char *fn = 0;
{
char *fn = 0;
- lex_match (lexer,
'/'
);
+ lex_match (lexer,
T_SLASH
);
if (lex_match_id (lexer, "FILE"))
if (lex_match_id (lexer, "FILE"))
- lex_match (lexer, '=');
+ lex_match (lexer, T_EQUALS);
+
+ if (!lex_force_string (lexer))
+ return CMD_FAILURE;
fn = ds_xstrdup (lex_tokstr (lexer));
lex_force_match (lexer, T_STRING);
fn = ds_xstrdup (lex_tokstr (lexer));
lex_force_match (lexer, T_STRING);
- lex_match (lexer,
'/'
);
+ lex_match (lexer,
T_SLASH
);
if ( ! lex_match_id (lexer, "PERMISSIONS"))
goto error;
if ( ! lex_match_id (lexer, "PERMISSIONS"))
goto error;
- lex_match (lexer,
'='
);
+ lex_match (lexer,
T_EQUALS
);
if ( lex_match_id (lexer, "READONLY"))
{
if ( lex_match_id (lexer, "READONLY"))
{