[BusyBox] wc.c take 2

Tito farmatito at tiscali.it
Fri Jan 24 13:03:03 UTC 2003


Hi Erik,
the  previous version of wc.c that i've send you was not as good
as i tought  because a lot of stuff  i've put in it was ripped out in the past 
as i've seen today looking at the various versions in cvs.
I'm sorry about that,I should have checked this before
submitting it.
But I'm sure wc.c could be shrinked in size so I'm sending you
another version which follows closer tha actual one but reduces
the size about 100bytes for wc.o.
The main difference vs actual is that if we use "-" for stdin on
the command line we get it printed out in the filename field
as GNU wc does.

Maybe some brackets have to be set in a more correct
position as i am not used to the coding style used..

BTW I think that more  size optimization could be achieved
by moving the wc_file() function inside wc_main() as it is used
only one time there, but i've not done this until now ..........
If you give me the OK i can try it.

CIAO

Tito
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wc_new_2.c
Type: text/x-csrc
Size: 3655 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20030124/35811b93/attachment.c 


More information about the busybox mailing list