535 |
input.type = FMT_F; |
input.type = FMT_F; |
536 |
input.d = 0; |
input.d = 0; |
537 |
} |
} |
538 |
if (!check_input_specifier (&input)) |
if (!check_input_specifier (&input, 1)) |
539 |
return 0; |
return 0; |
540 |
|
|
541 |
/* Start column for next specification. */ |
/* Start column for next specification. */ |
731 |
} |
} |
732 |
else if (lex_match ('/')) |
else if (lex_match ('/')) |
733 |
new->f.type = FMT_NEWREC; |
new->f.type = FMT_NEWREC; |
734 |
else if (!parse_format_specifier (&new->f, 1) |
else if (!parse_format_specifier (&new->f, FMTP_ALLOW_XT) |
735 |
|| !check_input_specifier (&new->f)) |
|| !check_input_specifier (&new->f, 1)) |
736 |
goto fail; |
goto fail; |
737 |
|
|
738 |
lex_match (','); |
lex_match (','); |
845 |
if (lex_match ('(')) |
if (lex_match ('(')) |
846 |
{ |
{ |
847 |
if (!parse_format_specifier (&input, 0) |
if (!parse_format_specifier (&input, 0) |
848 |
|| !check_input_specifier (&input) |
|| !check_input_specifier (&input, 1) |
849 |
|| !lex_force_match (')')) |
|| !lex_force_match (')')) |
850 |
{ |
{ |
851 |
for (i = 0; i < name_cnt; i++) |
for (i = 0; i < name_cnt; i++) |
956 |
a 1-based column number indicating the beginning of the field |
a 1-based column number indicating the beginning of the field |
957 |
on success. */ |
on success. */ |
958 |
static int |
static int |
959 |
cut_field (const struct data_list_pgm *dls, struct len_string *field, |
cut_field (const struct data_list_pgm *dls, struct fixed_string *field, |
960 |
int *end_blank) |
int *end_blank) |
961 |
{ |
{ |
962 |
struct len_string line; |
struct fixed_string line; |
963 |
char *cp; |
char *cp; |
964 |
size_t column_start; |
size_t column_start; |
965 |
|
|
1094 |
return -2; |
return -2; |
1095 |
for (i = 1; i <= dls->rec_cnt; i++) |
for (i = 1; i <= dls->rec_cnt; i++) |
1096 |
{ |
{ |
1097 |
struct len_string line; |
struct fixed_string line; |
1098 |
|
|
1099 |
if (dfm_eof (dls->reader)) |
if (dfm_eof (dls->reader)) |
1100 |
{ |
{ |
1138 |
|
|
1139 |
for (var_spec = dls->first; var_spec; var_spec = var_spec->next) |
for (var_spec = dls->first; var_spec; var_spec = var_spec->next) |
1140 |
{ |
{ |
1141 |
struct len_string field; |
struct fixed_string field; |
1142 |
int column; |
int column; |
1143 |
|
|
1144 |
/* Cut out a field and read in a new record if necessary. */ |
/* Cut out a field and read in a new record if necessary. */ |
1189 |
|
|
1190 |
for (var_spec = dls->first; var_spec; var_spec = var_spec->next) |
for (var_spec = dls->first; var_spec; var_spec = var_spec->next) |
1191 |
{ |
{ |
1192 |
struct len_string field; |
struct fixed_string field; |
1193 |
int column; |
int column; |
1194 |
|
|
1195 |
/* Cut out a field and check for end-of-line. */ |
/* Cut out a field and check for end-of-line. */ |
1911 |
{ |
{ |
1912 |
struct repeating_data_trns *t = (struct repeating_data_trns *) trns; |
struct repeating_data_trns *t = (struct repeating_data_trns *) trns; |
1913 |
|
|
1914 |
struct len_string line; /* Current record. */ |
struct fixed_string line; /* Current record. */ |
1915 |
|
|
1916 |
int starts_beg; /* Starting column. */ |
int starts_beg; /* Starting column. */ |
1917 |
int starts_end; /* Ending column. */ |
int starts_end; /* Ending column. */ |