[BusyBox] [patch] Simplify the heck out of the sed newline hack.

Rob Landley rob at landley.net
Thu Sep 25 09:55:29 UTC 2003


Okay, instead of turning the length two string "\n" into a length three string 
"\\n", why not just turn the \n into an ascii 10 in the search pattern, and 
rip out the conversion/reversion stuff on the strings we're testing against?

The following patch does that.  It fixes some bugs I encountered in the 
binutils build from the newline hackage basically screwing things up (the 
test case I posted earlier tonight), AND makes the code smaller and simpler.  
I don't think it needs to be conditional anymore (it isn't in gnu), but I 
haven't touched menuconfig.

Treat with extreme skepticism: it worked for me configuring binutils (leaving 
me with the "s/blah/blah/;$s/blah/blah/" bug that's still blocking, but as 
far as I know that's the ONLY remaining bug, and the newline matches seem to 
be working), but I'm not entirely sure what the code I'm ripping out was 
trying to accomplish, so...

Rob


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-newline
Type: text/x-diff
Size: 2593 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20030925/223bfcb5/attachment.bin 


More information about the busybox mailing list