- if ((j = *++ep) != ' ' && j != '\t') {
-#ifdef LINUX_STDIO
- j = ep - (unsigned char *) iob->_IO_read_ptr;
- memcpy(cp, iob->_IO_read_ptr, j);
- iob->_IO_read_ptr = ep;
-#elif defined(__DragonFly__)
- j = ep - (unsigned char *) ((struct __FILE_public *)iob)->_p;
- memcpy(cp, ((struct __FILE_public *)iob)->_p, j);
- ((struct __FILE_public *)iob)->_p = ep;
- ((struct __FILE_public *)iob)->_r -= j;
-#else
- j = ep - (unsigned char *) iob->_ptr;
- memcpy(cp, iob->_ptr, j);
- iob->_ptr = ep;
- iob->_cnt -= j;
-#endif
- cp += j;
- state = FLD;
- goto finish;
- }
- c -= ep - bp;
- bp = ep;
- }
- /*
- ** end of input or dest buffer - copy what
- ** we've found.
- */
-#ifdef LINUX_STDIO
- c += bp - (unsigned char *) iob->_IO_read_ptr;
- memcpy(cp, iob->_IO_read_ptr, c);
-#elif defined(__DragonFly__)
- c += bp - (unsigned char *) ((struct __FILE_public *)iob)->_p;
- memcpy(cp, ((struct __FILE_public *)iob)->_p, c);
-#else
- c += bp - (unsigned char *) iob->_ptr;
- memcpy(cp, iob->_ptr, c);
-#endif
- i -= c;
- cp += c;
- if (i <= 0) {
- /* the dest buffer is full */
-#ifdef LINUX_STDIO
- iob->_IO_read_ptr += c;
-#elif defined(__DragonFly__)
- ((struct __FILE_public *)iob)->_r -= c;
- ((struct __FILE_public *)iob)->_p += c;
-#else
- iob->_cnt -= c;
- iob->_ptr += c;
-#endif
- state = FLDPLUS;
- break;
- }
- /*
- ** There's one character left in the input
- ** buffer. Copy it & fill the buffer.
- ** If the last char was a newline and the
- ** next char is not whitespace, this is
- ** the end of the field. Otherwise loop.
- */
- --i;
-#ifdef LINUX_STDIO
- *cp++ = j = *(iob->_IO_read_ptr + c);
- iob->_IO_read_ptr = iob->_IO_read_end;
- c = __underflow(iob);
- iob->_IO_read_ptr++; /* NOT automatic! */
-#elif defined(__DragonFly__)
- *cp++ =j = *(((struct __FILE_public *)iob)->_p + c);
- c = __srget(iob);
-#else
- *cp++ = j = *(iob->_ptr + c);
- c = _filbuf(iob);
-#endif
- if (c == EOF ||
- ((j == '\0' || j == '\n') && c != ' ' && c != '\t')) {
- if (c != EOF) {
-#ifdef LINUX_STDIO
- --iob->_IO_read_ptr;
-#elif defined(__DragonFly__)
- --((struct __FILE_public *)iob)->_p;
- ++((struct __FILE_public *)iob)->_r;
-#else
- --iob->_ptr;
- ++iob->_cnt;
-#endif
- }
- state = FLD;
- break;