X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Fget-data.c;h=54bb5653ecc2086456624e7923b9a02443b77b57;hb=4d688b2e05945b3e3c733a005fb2775110ebb78b;hp=189054a507058c38b17b1ba027d0f69b5a995613;hpb=dde7b813c5747fba5d14e47f6dd82bb7b4dc7cf1;p=pspp-builds.git diff --git a/src/language/data-io/get-data.c b/src/language/data-io/get-data.c index 189054a5..54bb5653 100644 --- a/src/language/data-io/get-data.c +++ b/src/language/data-io/get-data.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -69,6 +70,7 @@ parse_get_psql (struct lexer *lexer, struct dataset *ds) psql.allow_clear = false; psql.conninfo = NULL; psql.str_width = -1; + psql.bsize = -1; ds_init_empty (&psql.sql); lex_force_match (lexer, '/'); @@ -93,6 +95,12 @@ parse_get_psql (struct lexer *lexer, struct dataset *ds) psql.str_width = lex_integer (lexer); lex_get (lexer); } + else if ( lex_match_id (lexer, "BSIZE")) + { + lex_match (lexer, '='); + psql.bsize = lex_integer (lexer); + lex_get (lexer); + } else if ( lex_match_id (lexer, "UNENCRYPTED")) { psql.allow_clear = true; @@ -422,18 +430,29 @@ parse_get_txt (struct lexer *lexer, struct dataset *ds) lex_get (lexer); } - else if (lex_match_id (lexer, "QUALIFIER")) + else if (lex_match_id (lexer, "QUALIFIERS")) { - if (!set_type (parser, "QUALIFIER", DP_DELIMITED, &has_type)) + if (!set_type (parser, "QUALIFIERS", DP_DELIMITED, &has_type)) goto error; lex_match (lexer, '='); if (!lex_force_string (lexer)) goto error; + if (settings_get_syntax () == COMPATIBLE + && ds_length (lex_tokstr (lexer)) != 1) + { + msg (SE, _("In compatible syntax mode, the QUALIFIER string " + "must contain exactly one character.")); + goto error; + } + data_parser_set_quotes (parser, ds_ss (lex_tokstr (lexer))); lex_get (lexer); } + else if (settings_get_syntax () == ENHANCED + && lex_match_id (lexer, "ESCAPE")) + data_parser_set_quote_escape (parser, true); else if (lex_match_id (lexer, "VARIABLES")) break; else