X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Fget-data.c;h=9be7a2d634c0282a0e5e212130929a441dacfdfe;hb=d8493b3b0617cc447446a70b031a69079bc19002;hp=32202babdea8848f5c3a06b6431b0db3c4b007ff;hpb=b5c82cc9aabe7e641011130240ae1b2e84348e23;p=pspp-builds.git diff --git a/src/language/data-io/get-data.c b/src/language/data-io/get-data.c index 32202bab..9be7a2d6 100644 --- a/src/language/data-io/get-data.c +++ b/src/language/data-io/get-data.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -219,7 +219,6 @@ parse_get_gnm (struct lexer *lexer, struct dataset *ds) } else { - printf ("Unknown data file type \"\%s\"\n", lex_tokid (lexer)); goto error; } lex_get (lexer); @@ -312,7 +311,7 @@ parse_get_txt (struct lexer *lexer, struct dataset *ds) DP_DELIMITED, &has_type); else { - lex_error (lexer, _("expecting FIXED or DELIMITED")); + lex_error (lexer, _("expecting %s or %s"), "FIXED", "DELIMITED"); goto error; } if (!ok) @@ -350,7 +349,7 @@ parse_get_txt (struct lexer *lexer, struct dataset *ds) } else { - lex_error (lexer, _("expecting LINE or VARIABLES")); + lex_error (lexer, _("expecting %s or %s"), "LINE", "VARIABLES"); goto error; } } @@ -421,11 +420,11 @@ parse_get_txt (struct lexer *lexer, struct dataset *ds) ds_put_cstr (&hard_seps, "\t"); if (ss_match_string (&s, ss_cstr ("\\\\"))) ds_put_cstr (&hard_seps, "\\"); - while ((c = ss_get_char (&s)) != EOF) + while ((c = ss_get_byte (&s)) != EOF) if (c == ' ') soft_seps = " "; else - ds_put_char (&hard_seps, c); + ds_put_byte (&hard_seps, c); data_parser_set_soft_delimiters (parser, ss_cstr (soft_seps)); data_parser_set_hard_delimiters (parser, ds_ss (&hard_seps)); ds_destroy (&hard_seps); @@ -459,7 +458,7 @@ parse_get_txt (struct lexer *lexer, struct dataset *ds) break; else { - lex_error (lexer, _("expecting VARIABLES")); + lex_error (lexer, _("expecting %s"), "VARIABLES"); goto error; } }