reformime bug?

Harald Becker ralda at gmx.de
Thu Sep 16 17:39:04 UTC 2010


>
> The essense:
> ------
> Right now \r\n\r\n is hardcoded as EOL. This allows for very efficient
> line reading.
> Reading ahead to know the used EOL kills any attempts to pipe
> reformail and external helpers.
> That is why I do care of a cmdline switch, which amends the problem
> w/o breaking anything.
>
Why do you want to read ahead? EOL is either \r\n\r\n or \n\n ... or if
you ignore \r ... it is just \n\n without anything else between them.
What is that difficult?

You just start out reading ...

you get \r --> ignore, read next
you get \n --> ok, we count it may be the start of our EOL ... go on,
read next
you get \r --> ignore, read next
you get \n -> count goes to 2, that is, you got EOL

you get anything else than \r or \n ... count goes back to zero and it
it is not EOL, it is the start of a new data block

No reading ahead! Without breaking anything. You see?



More information about the busybox mailing list