LF can occur before the end of a full line (76 characters) if it’s
immediately followed by EOF.
The last line can be any number of quadruplets long; it need not be 76
characters. (I suspect this was an attempt to deal with LF without the extra
call to get_byte and goto.)
/* Accept wrapping lines, reversibly if at each 76 characters. */
character = get_byte (subtask);
+
+ top:
if (character == EOF)
- {
- if (counter != 0)
- RETURN_IF_NOGO (RECODE_NOT_CANONICAL, subtask);
- SUBTASK_RETURN (subtask);
- }
+ SUBTASK_RETURN (subtask);
if (character == '\n')
{
+ character = get_byte (subtask);
+ if (character == EOF)
+ SUBTASK_RETURN (subtask);
if (counter != MIME_LINE_LENGTH / 4)
RETURN_IF_NOGO (RECODE_NOT_CANONICAL, subtask);
counter = 0;
- continue;
+ goto top;
}
if (character == '\r')