X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Flanguage%2Fdata-io%2Fdata-reader.c;h=5ff1693351dd576b936cf3a843e0d458c74af44e;hb=48e0129f54424a6fd5fb1bc7651e48dedc5293c2;hp=4811ba76ac8164d8f9034142f33273db4472a96e;hpb=01b970b8972e4e457b1d8e3f5af350c325152942;p=pspp diff --git a/src/language/data-io/data-reader.c b/src/language/data-io/data-reader.c index 4811ba76ac..5ff1693351 100644 --- a/src/language/data-io/data-reader.c +++ b/src/language/data-io/data-reader.c @@ -178,7 +178,7 @@ read_inline_record (struct dfm_reader *r) { r->flags |= DFM_SAW_BEGIN_DATA; - while (lex_token (r->lexer) == '.') + while (lex_token (r->lexer) == T_ENDCMD) lex_get (r->lexer); if (!lex_force_match_id (r->lexer, "BEGIN") || !lex_force_match_id (r->lexer, "DATA")) return false; @@ -190,7 +190,7 @@ read_inline_record (struct dfm_reader *r) lex_discard_line (r->lexer); msg (SE, _("Unexpected end-of-file while reading data in BEGIN " "DATA. This probably indicates " - "a missing or miss-formatted END DATA command. " + "a missing or incorrectly formatted END DATA command. " "END DATA must appear by itself on a single line " "with exactly one space between words.")); return false; @@ -556,7 +556,7 @@ dfm_expand_tabs (struct dfm_reader *r) if (r->fh != fh_inline_file () && (fh_get_mode (r->fh) != FH_MODE_TEXT || fh_get_tab_width (r->fh) == 0 - || ds_find_char (&r->line, '\t') == SIZE_MAX)) + || ds_find_byte (&r->line, '\t') == SIZE_MAX)) return; /* Expand tabs from r->line into r->scratch, and figure out @@ -573,11 +573,11 @@ dfm_expand_tabs (struct dfm_reader *r) c = ds_data (&r->line)[ofs]; if (c != '\t') - ds_put_char (&r->scratch, c); + ds_put_byte (&r->scratch, c); else { do - ds_put_char (&r->scratch, ' '); + ds_put_byte (&r->scratch, ' '); while (ds_length (&r->scratch) % tab_width != 0); } }