X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Fplacement-parser.c;fp=src%2Flanguage%2Fdata-io%2Fplacement-parser.c;h=64bdeec1e6f7f54f3c76bfb5d46311201a911653;hp=cf9981de8f88f93fe028de7ce4ddfcef6e55a929;hb=950da6e5aec7a0e0f282798604e708cb77a6dd5b;hpb=e3f69c13478f07af6a956a9e4f1ea6eddb0d2986 diff --git a/src/language/data-io/placement-parser.c b/src/language/data-io/placement-parser.c index cf9981de8f..64bdeec1e6 100644 --- a/src/language/data-io/placement-parser.c +++ b/src/language/data-io/placement-parser.c @@ -52,6 +52,13 @@ static bool fixed_parse_fortran (struct lexer *l, struct pool *, enum fmt_use, formats like those parsed by DATA LIST or PRINT. Returns true only if successful. + The formats parsed are either input or output formats, according + to USE. + + If USE is FMT_FOR_INPUT, then T, X, and / "formats" are parsed, + in addition to regular formats. If USE is FMT_FOR_OUTPUT, then + T and X "formats" are parsed but not /. + If successful, formats for VAR_CNT variables are stored in *FORMATS, and the number of formats required is stored in *FORMAT_CNT. *FORMAT_CNT may be greater than VAR_CNT because @@ -204,7 +211,7 @@ fixed_parse_fortran (struct lexer *lexer, struct pool *pool, enum fmt_use use, { new_formats = &f; new_format_cnt = 1; - if (lex_match (lexer, T_SLASH)) + if (use == FMT_FOR_INPUT && lex_match (lexer, T_SLASH)) f.type = PRS_TYPE_NEW_REC; else {