Add a file reading routine along with an io buffer type
commit75d584305598407be4c53d42c85eca3cd58c973c
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>
Thu, 18 Dec 2008 22:56:14 +0000 (18 22:56 +0000)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 19 Dec 2008 15:21:20 +0000 (19 07:21 -0800)
tree150bce88353a5b322b1600a5989e126cf8288562
parentdef425bf8568b9c1e20879bf5be6f9c52b7361c4
Add a file reading routine along with an io buffer type

In particular, the gitfo_read_file() routine can be used to slurp
the complete file contents into an gitfo_buf structure. The buffer
content will be allocated by malloc() and may be released by the
gitfo_free_buf() routine. The io buffer type can be initialised
on the stack with the GITFO_BUF_INIT macro.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
src/common.h
src/fileops.c
src/fileops.h