rewriting config_*, xmalloc_fget*

Nuno Lucas ntlucas at gmail.com
Thu Jun 16 13:53:41 UTC 2011


On 06/16/2011 05:51 AM, Timo Teräs wrote:
> Notably, though, at least sed.c seems to rely on the fact that \n and \0
> are both recognized, and jumps through many hoops to handle them both
> properly. Apparently there's out some sed scripts that use both \n and
> \0 as statement separator, but they have different meaning.
>
> Not sure if there's other applets relying on this.
>
> But just like I told before, this also reason why the API needs rewrite,
> it should *not* treat both as line separators, unless there's some
> explicit need.

See, e.g, the -print0 parameter in "find".

It is an old method to handle paths with spaces on them.
Some old programs treated all white space (including newline) as file 
separators, so when spaces could be in paths something needed to be done to 
handle them by programs like, for example, "xargs".

It may be arguable if it was the right thing to do, but it's too late, by some 
decades, to change it.


Regards,
~Nuno Lucas



More information about the busybox mailing list