The less patch is in.

Rob Sullivan cogito.ergo.cogito at gmail.com
Sat Sep 17 21:06:47 UTC 2005


Oh, I forgot the changelog:

- Merged next_file and previous_file into change_file, with a direction 
given as an argument to the
function. next_file is change_file(1), previous_file is change_file(-1), and 
first_file is
change_file(0).
*** saves 128 bytes ***

- Replaced the free_flines(), data_readlines(), etc sequence with one 
function: reinitalise().
*** no effect on size ***

- Fixed up flag detection to be more Busybox-like.
*** saves 94 bytes ***

- Changed buffer[100][256] to **buffer and also changed all array 
assignments involving the buffer to
pointer assignments.
*** saves 1824 bytes ***

- Changed *flines[MAXLINES] into **flines - this reduces memory usage, but 
does increase the size of
the less binary somewhat.
*** adds 2026 bytes ***

The last two changes make me feel a bit nervous - why would changing from an 
array to pointers save or add so much respectively? Perhaps something's gone 
wrong with my flines change...

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20050917/092c9f2e/attachment-0001.htm 


More information about the busybox mailing list