X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Futilities%2Fpermissions.c;h=34fa6fd83defb8701b97c9d505f3da22100c0ed4;hb=740218f508466f16a79939cd97027b99f589d682;hp=03458fcef01671f4ea4b263873ff89ebe86a7a2b;hpb=33c65b85425187f4cb06f7c8302e49d571c4c3a7;p=pspp diff --git a/src/language/utilities/permissions.c b/src/language/utilities/permissions.c index 03458fcef0..34fa6fd83d 100644 --- a/src/language/utilities/permissions.c +++ b/src/language/utilities/permissions.c @@ -15,7 +15,7 @@ along with this program. If not, see . */ #include -#include + #include #include #include @@ -42,21 +42,24 @@ cmd_permissions (struct lexer *lexer, struct dataset *ds UNUSED) { char *fn = 0; - lex_match (lexer, '/'); + lex_match (lexer, T_SLASH); 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); - lex_match (lexer, '/'); + lex_match (lexer, T_SLASH); if ( ! lex_match_id (lexer, "PERMISSIONS")) goto error; - lex_match (lexer, '='); + lex_match (lexer, T_EQUALS); if ( lex_match_id (lexer, "READONLY")) {