Re: [PATCH 4/7] Clean up stripspace a bit, use strbuf even more.
From: Kristian Høgsberg <hidden>
Date: 2016-06-15 22:43:35
On Tue, 2007-09-18 at 14:12 +0100, Johannes Schindelin wrote:
Hi, I really like your patch, except for this: On Mon, 17 Sep 2007, Kristian Høgsberg wrote:quoted
diff --git a/builtin.h b/builtin.h index 03ee7bf..d6f2c76 100644 --- a/builtin.h +++ b/builtin.h@@ -7,7 +7,6 @@ extern const char git_version_string[]; extern const char git_usage_string[]; extern void help_unknown_cmd(const char *cmd); -extern size_t stripspace(char *buffer, size_t length, int skip_comments); extern int write_tree(unsigned char *sha1, int missing_ok, const char *prefix); extern void prune_packed_objects(int);diff --git a/strbuf.h b/strbuf.h index 21fc111..5960637 100644 --- a/strbuf.h +++ b/strbuf.h@@ -98,4 +98,6 @@ extern ssize_t strbuf_read(struct strbuf *, int fd, size_t hint); extern void read_line(struct strbuf *, FILE *, int); +extern void stripspace(struct strbuf *buf, int skip_comments); + #endif /* STRBUF_H */If you do that, you have to move the function "stripspace" to strbuf.c, too...
Right, the alternative is to #include strbuf.h in builtin.h, or maybe just add struct strbuf; at the top. And with Pierres latest patch strbuf is included everywhere, so maybe this is already moot. Kristian