projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://jmd@git.sv.gnu.org/srv/git/pspp
[pspp]
/
src
/
language
/
data-io
/
get-data.c
diff --git
a/src/language/data-io/get-data.c
b/src/language/data-io/get-data.c
index 189054a507058c38b17b1ba027d0f69b5a995613..54bb5653ecc2086456624e7923b9a02443b77b57 100644
(file)
--- a/
src/language/data-io/get-data.c
+++ b/
src/language/data-io/get-data.c
@@
-24,6
+24,7
@@
#include <data/dictionary.h>
#include <data/format.h>
#include <data/procedure.h>
#include <data/dictionary.h>
#include <data/format.h>
#include <data/procedure.h>
+#include <data/settings.h>
#include <language/command.h>
#include <language/data-io/data-parser.h>
#include <language/data-io/data-reader.h>
#include <language/command.h>
#include <language/data-io/data-parser.h>
#include <language/data-io/data-reader.h>
@@
-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.allow_clear = false;
psql.conninfo = NULL;
psql.str_width = -1;
+ psql.bsize = -1;
ds_init_empty (&psql.sql);
lex_force_match (lexer, '/');
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);
}
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;
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);
}
lex_get (lexer);
}
- else if (lex_match_id (lexer, "QUALIFIER"))
+ else if (lex_match_id (lexer, "QUALIFIER
S
"))
{
{
- if (!set_type (parser, "QUALIFIER", DP_DELIMITED, &has_type))
+ if (!set_type (parser, "QUALIFIER
S
", DP_DELIMITED, &has_type))
goto error;
lex_match (lexer, '=');
if (!lex_force_string (lexer))
goto error;
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);
}
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
else if (lex_match_id (lexer, "VARIABLES"))
break;
else