Code

builtin-mailsplit.c: remove read_line_with_nul() since it is no longer used
authorBrandon Casey <drafnel@gmail.com>
Wed, 5 Aug 2009 03:31:58 +0000 (22:31 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Aug 2009 19:13:58 +0000 (12:13 -0700)
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-mailsplit.c
builtin.h

index c2ec6ea3d51e760581dcb6f86c1783a545ebc07a..d288fde2c2cef606a60507a7a56b81352ab5d06e 100644 (file)
@@ -45,24 +45,6 @@ static int is_from_line(const char *line, int len)
 
 static struct strbuf buf = STRBUF_INIT;
 
-/* We cannot use fgets() because our lines can contain NULs */
-int read_line_with_nul(char *buf, int size, FILE *in)
-{
-       int len = 0, c;
-
-       for (;;) {
-               c = getc(in);
-               if (c == EOF)
-                       break;
-               buf[len++] = c;
-               if (c == '\n' || len + 1 >= size)
-                       break;
-       }
-       buf[len] = '\0';
-
-       return len;
-}
-
 /* Called with the first line (potentially partial)
  * already in buf[] -- normally that should begin with
  * the Unix "From " line.  Write it into the specified
index 20427d2963fa25c1177bd05ab9f8be2890b9f7ba..9993dfcf99f7ad47a1a0a052d591cfc06a9f614d 100644 (file)
--- a/builtin.h
+++ b/builtin.h
@@ -13,7 +13,6 @@ extern const char git_more_info_string[];
 extern void list_common_cmds_help(void);
 extern const char *help_unknown_cmd(const char *cmd);
 extern void prune_packed_objects(int);
-extern int read_line_with_nul(char *buf, int size, FILE *file);
 extern int fmt_merge_msg(int merge_summary, struct strbuf *in,
        struct strbuf *out);
 extern int commit_tree(const char *msg, unsigned char *tree,