Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Weirdness in comm(1)



You changed the behaviour in the case of over-long lines, but
arguably to a more rational failure (or weirdness) mode than the current
comm, so that's probably OK (the man page says nothing about a max line
length, I have no idea if posix does or not).   To change back, make
getnextln() a wrapper around fgets() that removes the final \n if it
is there, rather than a fgetc() loop, but I think it is better as you have it
(of course, better still would be to remove the limit, but that's not
nearly so easy.)

I'd  use a tab, rather than spaces, before the local var declarations
in the new getnextln() function, to be consistent with the rest of
what is in the source.

Aside from that, the fix is clearly correct, so I'm not sure there's
any need to wait.

kre



Home | Main Index | Thread Index | Old Index