X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Futilities%2Fset.q;h=243de30063c8b12332009d185ed02274c0a5bb06;hb=8d1e072157ee3c8273e328c491be3c8bf57452da;hp=dcf7a327be79e2681bbfbe841affb0a02b370592;hpb=58fe146604dfb8522c251aefbd9616779ae6cb46;p=pspp diff --git a/src/language/utilities/set.q b/src/language/utilities/set.q index dcf7a327be..243de30063 100644 --- a/src/language/utilities/set.q +++ b/src/language/utilities/set.q @@ -108,6 +108,7 @@ int tgetnum (const char *); scripttab=string; seed=custom; tnumbers=custom; + tvars=custom; tb1=string; tbfonts=string; undefined=undef:warn/nowarn; @@ -357,6 +358,35 @@ stc_custom_tnumbers (struct lexer *lexer, } +static int +stc_custom_tvars (struct lexer *lexer, + struct dataset *ds UNUSED, + struct cmd_set *cmd UNUSED, void *aux UNUSED) +{ + lex_match (lexer, T_EQUALS); + + if (lex_match_id (lexer, "NAMES")) + { + settings_set_var_style (SETTINGS_VAR_STYLE_NAMES); + } + else if (lex_match_id (lexer, "LABELS")) + { + settings_set_var_style (SETTINGS_VAR_STYLE_LABELS); + } + else if (lex_match_id (lexer, "BOTH")) + { + settings_set_var_style (SETTINGS_VAR_STYLE_BOTH); + } + else + { + lex_error_expecting (lexer, "NAMES", "LABELS", "BOTH", NULL_SENTINEL); + return 0; + } + + return 1; +} + + /* Parses the EPOCH subcommand, which controls the epoch used for parsing 2-digit years. */ static int