[BusyBox] improved process_escape_char function for utility.c
Manuel Novoa III
mnovoa3 at bellsouth.net
Thu Feb 8 03:45:33 UTC 2001
Here is a replacement for the process_escape_char function in utility.c.
Besides the size decrease, it fixes behavior for illegal octal escape codes
with values to large for a char. If you want the original behavior, change
"#if 1" to "#if 0".
On i386 with -Os -fomit-frame-pointer, I get the following sizes:
text data bss dec hex filename
396 0 0 396 18c original switch-based implementation
123 0 0 123 7b new with "#if 0" (same behavior)
141 0 0 141 8d new with "#if 1" (octal bug fixed)
Manuel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pes.c
Type: text/x-c++
Size: 875 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20010207/68a0a958/attachment.bin
More information about the busybox
mailing list