On Tue, Apr 8, 2008 at 1:00 AM, Karel Zak <kzak@xxxxxxxxxx> wrote: > if (line[strlen(line) - 1] != '\n') The loop we end up with reinvents ~50% of the state machine I proposed earlier, but IMHO less efficiently. We still end up with an [f]getc loop anyway, while discarding the advantage of the implementation I proposed, which is that each character in the input is examined just once. James. -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html