X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Fsave-translate.c;h=213f0bf735e40fe6b9ead6aac5aa66e3a1d698ad;hb=refs%2Fbuilds%2F20101231030502%2Fpspp;hp=3e33ff112536c539d94fd1b66844c8e98b67d2f0;hpb=fcb75da3200f19842a2eb12ca00063a727a226fd;p=pspp diff --git a/src/language/data-io/save-translate.c b/src/language/data-io/save-translate.c index 3e33ff1125..213f0bf735 100644 --- a/src/language/data-io/save-translate.c +++ b/src/language/data-io/save-translate.c @@ -84,7 +84,7 @@ cmd_save_translate (struct lexer *lexer, struct dataset *ds) case_map_prepare_dict (dict); dict_delete_scratch_vars (dict); - while (lex_match (lexer, '/')) + while (lex_match (lexer, T_SLASH)) { if (lex_match_id (lexer, "OUTFILE")) { @@ -94,7 +94,7 @@ cmd_save_translate (struct lexer *lexer, struct dataset *ds) goto error; } - lex_match (lexer, '='); + lex_match (lexer, T_EQUALS); handle = fh_parse (lexer, FH_REF_FILE); if (handle == NULL) @@ -108,7 +108,7 @@ cmd_save_translate (struct lexer *lexer, struct dataset *ds) goto error; } - lex_match (lexer, '='); + lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "CSV")) type = CSV_FILE; else if (lex_match_id (lexer, "TAB")) @@ -125,7 +125,7 @@ cmd_save_translate (struct lexer *lexer, struct dataset *ds) include_var_names = true; else if (lex_match_id (lexer, "MISSING")) { - lex_match (lexer, '='); + lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "IGNORE")) recode_user_missing = false; else if (lex_match_id (lexer, "RECODE")) @@ -138,7 +138,7 @@ cmd_save_translate (struct lexer *lexer, struct dataset *ds) } else if (lex_match_id (lexer, "CELLS")) { - lex_match (lexer, '='); + lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "VALUES")) use_value_labels = false; else if (lex_match_id (lexer, "LABELS")) @@ -151,40 +151,40 @@ cmd_save_translate (struct lexer *lexer, struct dataset *ds) } else if (lex_match_id (lexer, "TEXTOPTIONS")) { - lex_match (lexer, '='); + lex_match (lexer, T_EQUALS); for (;;) { if (lex_match_id (lexer, "DELIMITER")) { - lex_match (lexer, '='); + lex_match (lexer, T_EQUALS); if (!lex_force_string (lexer)) goto error; - if (ds_length (lex_tokstr (lexer)) != 1) + if (ss_length (lex_tokss (lexer)) != 1) { msg (SE, _("The %s string must contain exactly one " "character."), "DELIMITER"); goto error; } - delimiter = ds_first (lex_tokstr (lexer)); + delimiter = ss_first (lex_tokss (lexer)); lex_get (lexer); } else if (lex_match_id (lexer, "QUALIFIER")) { - lex_match (lexer, '='); + lex_match (lexer, T_EQUALS); if (!lex_force_string (lexer)) goto error; - if (ds_length (lex_tokstr (lexer)) != 1) + if (ss_length (lex_tokss (lexer)) != 1) { msg (SE, _("The %s string must contain exactly one " "character."), "QUALIFIER"); goto error; } - qualifier = ds_first (lex_tokstr (lexer)); + qualifier = ss_first (lex_tokss (lexer)); lex_get (lexer); } else if (lex_match_id (lexer, "DECIMAL")) { - lex_match (lexer, '='); + lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "DOT")) decimal = '.'; else if (lex_match_id (lexer, "COMMA")) @@ -198,7 +198,7 @@ cmd_save_translate (struct lexer *lexer, struct dataset *ds) } else if (lex_match_id (lexer, "FORMAT")) { - lex_match (lexer, '='); + lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "PLAIN")) use_print_formats = false; else if (lex_match_id (lexer, "VARIABLE")) @@ -216,7 +216,7 @@ cmd_save_translate (struct lexer *lexer, struct dataset *ds) } else if (lex_match_id (lexer, "UNSELECTED")) { - lex_match (lexer, '='); + lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "RETAIN")) retain_unselected = true; else if (lex_match_id (lexer, "DELETE")) @@ -245,7 +245,7 @@ cmd_save_translate (struct lexer *lexer, struct dataset *ds) } else if (!replace && fn_exists (fh_get_file_name (handle))) { - msg (SE, _("Output file \"%s\" exists but REPLACE was not specified."), + msg (SE, _("Output file `%s' exists but REPLACE was not specified."), fh_get_file_name (handle)); goto error; }