path: root/strbuf.h
diff options
authorBrandon Casey <>2009-08-05 03:31:56 (GMT)
committerJunio C Hamano <>2009-08-05 19:13:56 (GMT)
commitc7e4f0d78aaac33d5e3cec54cddd40439e77d16c (patch)
tree858630ef7be2bc8eb26148914c906f5f974df94b /strbuf.h
parent07a4a3b4962e1fd4e40fd877427cddd7428c1bc3 (diff)
strbuf: add new function strbuf_getwholeline()
This function is just like strbuf_getline() except it retains the line-termination character. This function will be used by the mailinfo and mailsplit builtins which require the entire line for parsing. Signed-off-by: Brandon Casey <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'strbuf.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/strbuf.h b/strbuf.h
index eaa8704..d05e056 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -126,6 +126,7 @@ extern ssize_t strbuf_read(struct strbuf *, int fd, size_t hint);
extern int strbuf_read_file(struct strbuf *sb, const char *path, size_t hint);
extern int strbuf_readlink(struct strbuf *sb, const char *path, size_t hint);
+extern int strbuf_getwholeline(struct strbuf *, FILE *, int);
extern int strbuf_getline(struct strbuf *, FILE *, int);
extern void stripspace(struct strbuf *buf, int skip_comments);