-
- i->f2 = i->f1 + (i->e - i->s) - 1;
-
- /* Make sure that the string isn't too long. */
- if (i->format.w > fmt_max_input_width (i->format.type))
- {
- dls_error (i, _("Field too long (%d characters). Truncated after "
- "character %d."),
- i->format.w, fmt_max_input_width (i->format.type));
- i->format.w = fmt_max_input_width (i->format.type);
- }
-
- if (!(fmt_get_category (i->format.type)
- & (FMT_CAT_STRING | FMT_CAT_BINARY | FMT_CAT_HEXADECIMAL)))
- {
- const char *cp;
-
- cp = i->s;
- for (;;)
- {
- if (!isspace ((unsigned char) *cp))
- break;
-
- if (++cp == i->e)
- {
- i->v->f = get_blanks();
- return true;
- }
- }
- }
-
-
- switch (i->format.type)
- {
- case FMT_F:
- case FMT_COMMA:
- case FMT_DOT:
- case FMT_DOLLAR:
- case FMT_PCT:
- case FMT_E:
- success = parse_numeric (i);
- break;
- case FMT_CCA:
- case FMT_CCB:
- case FMT_CCC:
- case FMT_CCD:
- case FMT_CCE:
- NOT_REACHED ();
- case FMT_N:
- success = parse_N (i);
- break;
- case FMT_Z:
- success = parse_Z (i);
- break;
- case FMT_P:
- success = parse_P (i);
- break;
- case FMT_PK:
- success = parse_PK (i);
- break;
- case FMT_IB:
- success = parse_IB (i);
- break;
- case FMT_PIB:
- success = parse_PIB (i);
- break;
- case FMT_PIBHEX:
- success = parse_PIBHEX (i);
- break;
- case FMT_RB:
- success = parse_RB (i);
- break;
- case FMT_RBHEX:
- success = parse_RBHEX (i);
- break;
- case FMT_DATE:
- success = parse_DATE (i);
- break;
- case FMT_ADATE:
- success = parse_ADATE (i);
- break;
- case FMT_EDATE:
- success = parse_EDATE (i);
- break;
- case FMT_JDATE:
- success = parse_JDATE (i);
- break;
- case FMT_SDATE:
- success = parse_SDATE (i);
- break;
- case FMT_QYR:
- success = parse_QYR (i);
- break;
- case FMT_MOYR:
- success = parse_MOYR (i);
- break;
- case FMT_WKYR:
- success = parse_WKYR (i);
- break;
- case FMT_DATETIME:
- success = parse_DATETIME (i);
- break;
- case FMT_TIME:
- success = parse_TIME (i);
- break;
- case FMT_DTIME:
- success = parse_DTIME (i);
- break;
- case FMT_WKDAY:
- success = parse_WKDAY (i);
- break;
- case FMT_MONTH:
- success = parse_MONTH (i);
- break;
- case FMT_A:
- success = parse_A (i);
- break;
- case FMT_AHEX:
- success = parse_AHEX (i);
- break;
- default:
- NOT_REACHED ();
- }
- if (!success)
- default_result (i);
-
- return success;