X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Futilities%2Fset.q;h=8b06448fe474fd9f2540d7036fe5aabb5e8d556f;hb=e425c8f3444e1cb6ac5c9be967bcd204c2774c77;hp=0be8c47010a7cf541501487456e3ba7eae686de8;hpb=9743aa05898c191b3c2d3fead5ae0315beb44bb3;p=pspp diff --git a/src/language/utilities/set.q b/src/language/utilities/set.q index 0be8c47010..8b06448fe4 100644 --- a/src/language/utilities/set.q +++ b/src/language/utilities/set.q @@ -137,7 +137,6 @@ cmd_set (struct lexer *lexer, struct dataset *ds) if (!parse_set (lexer, ds, &cmd, NULL)) { - free_set (&cmd); return CMD_FAILURE; } @@ -347,17 +346,11 @@ stc_custom_tnumbers (struct lexer *lexer, lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "VALUES")) - { - settings_set_value_style (SETTINGS_VAL_STYLE_VALUES); - } + settings_set_show_values (SETTINGS_VALUE_SHOW_VALUE); else if (lex_match_id (lexer, "LABELS")) - { - settings_set_value_style (SETTINGS_VAL_STYLE_LABELS); - } + settings_set_show_values (SETTINGS_VALUE_SHOW_LABEL); else if (lex_match_id (lexer, "BOTH")) - { - settings_set_value_style (SETTINGS_VAL_STYLE_BOTH); - } + settings_set_show_values (SETTINGS_VALUE_SHOW_BOTH); else { lex_error_expecting (lexer, "VALUES", "LABELS", "BOTH", NULL_SENTINEL); @@ -376,17 +369,11 @@ stc_custom_tvars (struct lexer *lexer, lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "NAMES")) - { - settings_set_var_style (SETTINGS_VAR_STYLE_NAMES); - } + settings_set_show_variables (SETTINGS_VALUE_SHOW_VALUE); else if (lex_match_id (lexer, "LABELS")) - { - settings_set_var_style (SETTINGS_VAR_STYLE_LABELS); - } + settings_set_show_variables (SETTINGS_VALUE_SHOW_LABEL); else if (lex_match_id (lexer, "BOTH")) - { - settings_set_var_style (SETTINGS_VAR_STYLE_BOTH); - } + settings_set_show_variables (SETTINGS_VALUE_SHOW_BOTH); else { lex_error_expecting (lexer, "NAMES", "LABELS", "BOTH", NULL_SENTINEL); @@ -568,7 +555,7 @@ stc_custom_format (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_se if (!fmt_check_output (&fmt)) return 0; - + if (fmt_is_string (fmt.type)) { char str[FMT_STRING_LEN_MAX + 1]; @@ -907,7 +894,7 @@ show_current_directory (const struct dataset *ds UNUSED) { len <<= 1; buf = xrealloc (buf, len); - } + } while (NULL == (wd = getcwd (buf, len))); return wd; @@ -922,7 +909,7 @@ show_tempdir (const struct dataset *ds UNUSED) static char * show_version (const struct dataset *ds UNUSED) { - return strdup (version); + return strdup (announced_version); } static char *