[PATCH] coreutils tac (was: coreutils tac)

Tito farmatito at tiscali.it
Sat Dec 29 07:29:33 UTC 2007


On Saturday 29 December 2007 03:18:13 Denys Vlasenko wrote:
> On Friday 28 December 2007 21:36, Tito wrote:
> > just for fun I've created an alternative version of tac
> > using only linked lists in memory. Probably the size
> > is smaller but I haven't checked it yet as I
> > would like to hear first the opinion of the list
> > members about it. For the same reason i haven't
> > attached a patch but only a drop in replacement
> > of tac.c.
> > Hints, critics, improvements and correction
> > are always welcome!!!
> 
> Small :)
> 
> What will happen with big files?
> --
> vda
> 

With big files there will be an out of memory error and
the applet is not NOFORK.
There are also some bugs with embedded '\0' chars
and lines ending without '\n'
that i think i've fixed in this version.
More tests are needed with special files
as i tested only with regular files, empty files,
links, broken links and directories.
New version attached.


Ciao,
TIto


 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tac.c
Type: text/x-csrc
Size: 1896 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20071229/5d629f73/attachment-0002.c 


More information about the busybox mailing list