X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Flanguage%2Fdictionary%2Fattributes.c;h=c992ff806817156fa20f2fe27ab3fc6e14da382f;hb=bd50b397b3ed4e7e627c33e234a5d0394e2c3dc6;hp=35e69542950300498484ab8b4506b992c2be0423;hpb=691c25e36fd1ee722dd35419d6110e3876b99f9c;p=pspp diff --git a/src/language/dictionary/attributes.c b/src/language/dictionary/attributes.c index 35e6954295..c992ff8068 100644 --- a/src/language/dictionary/attributes.c +++ b/src/language/dictionary/attributes.c @@ -79,7 +79,7 @@ static bool match_subcommand (struct lexer *lexer, const char *keyword) { if (lex_token (lexer) == T_ID - && lex_id_match (ss_cstr (lex_tokid (lexer)), ss_cstr (keyword)) + && lex_id_match (lex_tokss (lexer), ss_cstr (keyword)) && lex_look_ahead (lexer) == T_EQUALS) { lex_get (lexer); /* Skip keyword. */ @@ -96,7 +96,7 @@ parse_attribute_name (struct lexer *lexer, char name[VAR_NAME_LEN + 1], { if (!lex_force_id (lexer)) return false; - strcpy (name, lex_tokid (lexer)); + strcpy (name, lex_tokcstr (lexer)); lex_get (lexer); if (lex_match (lexer, T_LBRACK)) @@ -122,14 +122,14 @@ static bool add_attribute (struct lexer *lexer, struct attrset **sets, size_t n) { char name[VAR_NAME_LEN + 1]; + const char *value; size_t index, i; - char *value; if (!parse_attribute_name (lexer, name, &index) || !lex_force_match (lexer, T_LPAREN) || !lex_force_string (lexer)) return false; - value = ds_cstr (lex_tokstr (lexer)); + value = lex_tokcstr (lexer); for (i = 0; i < n; i++) {