Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
mailinfo: move cleanup_space() before its users
author
Junio C Hamano
<gitster@pobox.com>
Thu, 15 Oct 2015 00:44:26 +0000
(17:44 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 21 Oct 2015 22:33:39 +0000
(15:33 -0700)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/mailinfo.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
4f0f9d4
)
diff --git
a/builtin/mailinfo.c
b/builtin/mailinfo.c
index dd9aad27236f35239c0aac162c3b760ba94c8143..23dcd9521125c222d5ecc64de90a9c0069f8744e 100644
(file)
--- a/
builtin/mailinfo.c
+++ b/
builtin/mailinfo.c
@@
-31,8
+31,17
@@
static int use_inbody_headers = 1;
#define MAX_HDR_PARSED 10
#define MAX_BOUNDARIES 5
#define MAX_HDR_PARSED 10
#define MAX_BOUNDARIES 5
-static void cleanup_space(struct strbuf *sb);
-
+static void cleanup_space(struct strbuf *sb)
+{
+ size_t pos, cnt;
+ for (pos = 0; pos < sb->len; pos++) {
+ if (isspace(sb->buf[pos])) {
+ sb->buf[pos] = ' ';
+ for (cnt = 0; isspace(sb->buf[pos + cnt + 1]); cnt++);
+ strbuf_remove(sb, pos + 1, cnt);
+ }
+ }
+}
static void get_sane_name(struct strbuf *out, struct strbuf *name, struct strbuf *email)
{
static void get_sane_name(struct strbuf *out, struct strbuf *name, struct strbuf *email)
{
@@
-272,18
+281,6
@@
static void cleanup_subject(struct strbuf *subject)
strbuf_trim(subject);
}
strbuf_trim(subject);
}
-static void cleanup_space(struct strbuf *sb)
-{
- size_t pos, cnt;
- for (pos = 0; pos < sb->len; pos++) {
- if (isspace(sb->buf[pos])) {
- sb->buf[pos] = ' ';
- for (cnt = 0; isspace(sb->buf[pos + cnt + 1]); cnt++);
- strbuf_remove(sb, pos + 1, cnt);
- }
- }
-}
-
static const char *header[MAX_HDR_PARSED] = {
"From","Subject","Date",
};
static const char *header[MAX_HDR_PARSED] = {
"From","Subject","Date",
};