* Copyright (C) 1987 by the Massachusetts Institute of Technology
*
* $Log$
- * Revision 1.1 1987-07-13 03:50:02 wesommer
- * Initial revision
+ * Revision 1.2 1988-05-10 11:34:37 mar
+ * Throw away rest of field if too long
*
+ * Revision 1.1 87/07/13 03:50:02 wesommer
+ * Initial revision
+ *
*/
#ifndef lint
if (c == EOF)
return;
- if (c != EOF && c != ':' && c != '\n')
+ if (c != EOF && c != ':' && c != '\n') {
fprintf(stderr, "Field too wide, truncated\n");
- else {
+ while ((c = getc(f)) != EOF && c != ':' && c != '\n');
+ (void) ungetc(c, f);
+ } else {
*buf++ = 0;
(void) ungetc(c, f);
}