R
rihad
Hi there. If you remember my recent posting regarding fslurp(), well, this is
its continuation
A collection of useful and semi-useful file-and-line-slurping functions:
fslurp() - slurp a text file into memory and return it as an array of lines
fslurpb() - slurp a binary file into memory
fslurpl() - slurp a whole line from a text file (i.e. fgets() with no limits)
Also included are several utility functions that try to mimic the behaviour
of traditional Unix commands on the slurped text file:
fgrep(), fsort(), funiq(), freverse(), fhead(), ftail(), fcat(). And more.
Look into f.h for some documentation.
Written in ISO C.
Code is here:
http://my.baku.to/f.c
http://my.baku.to/f.h
some simple API demonstrating utilities:
http://my.baku.to/fsort.c
http://my.baku.to/funiq.c
http://my.baku.to/ftac.c
http://my.baku.to/fhead.c
http://my.baku.to/ftail.c
(it's around 1000 l.o.c. and I reckon only FAQ maintainers could post that much
or more without getting flamed. I didn't think I'd want to try
)
Please comment! Thank you very much in advance.
its continuation
A collection of useful and semi-useful file-and-line-slurping functions:
fslurp() - slurp a text file into memory and return it as an array of lines
fslurpb() - slurp a binary file into memory
fslurpl() - slurp a whole line from a text file (i.e. fgets() with no limits)
Also included are several utility functions that try to mimic the behaviour
of traditional Unix commands on the slurped text file:
fgrep(), fsort(), funiq(), freverse(), fhead(), ftail(), fcat(). And more.
Look into f.h for some documentation.
Written in ISO C.
Code is here:
http://my.baku.to/f.c
http://my.baku.to/f.h
some simple API demonstrating utilities:
http://my.baku.to/fsort.c
http://my.baku.to/funiq.c
http://my.baku.to/ftac.c
http://my.baku.to/fhead.c
http://my.baku.to/ftail.c
(it's around 1000 l.o.c. and I reckon only FAQ maintainers could post that much
or more without getting flamed. I didn't think I'd want to try
Please comment! Thank you very much in advance.