@matheusbsbs / matheus-bagliano / commits / 6a2d3f50f5
Fork 0

builtin-mailsplit.c: remove read_line_with_nul() since it is no longer used

Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brandon Casey committed Aug 4, 2009 at 22:31 UTC 6a2d3f50f5a509fdfefca371c7178e36c0bcf7e9
2 files changed -19
builtin-mailsplit.c
-18
@@ -45,24 +45,6 @@ static int is_from_line(const char *line, int len)
45
46 static struct strbuf buf = STRBUF_INIT;
47
48 -/* We cannot use fgets() because our lines can contain NULs */
49 -int read_line_with_nul(char *buf, int size, FILE *in)
50 -{
51 - int len = 0, c;
52 -
53 - for (;;) {
54 - c = getc(in);
55 - if (c == EOF)
56 - break;
57 - buf[len++] = c;
58 - if (c == '\n' || len + 1 >= size)
59 - break;
60 - }
61 - buf[len] = '\0';
62 -
63 - return len;
64 -}
65 -
48 /* Called with the first line (potentially partial)
49 * already in buf[] -- normally that should begin with
50 * the Unix "From " line. Write it into the specified
builtin.h
-1
@@ -13,7 +13,6 @@ extern const char git_more_info_string[];
13 extern void list_common_cmds_help(void);
14 extern const char *help_unknown_cmd(const char *cmd);
15 extern void prune_packed_objects(int);
16 -extern int read_line_with_nul(char *buf, int size, FILE *file);
16 extern int fmt_merge_msg(int merge_summary, struct strbuf *in,
17 struct strbuf *out);
18 extern int commit_tree(const char *msg, unsigned char *tree,