Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-15 03:44:26 +0300
committerJunio C Hamano <gitster@pobox.com>2015-10-22 01:33:39 +0300
commit30f50c3426def6062b214d3f9cb0dd09776e4415 (patch)
tree1d1d95c5ab84ae4671b53f5cb00adfb04d346fa1 /builtin/mailinfo.c
parent4f0f9d46c72f049c80c7cec0f321429ac2e49d11 (diff)
mailinfo: move cleanup_space() before its users
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/mailinfo.c')
-rw-r--r--builtin/mailinfo.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
index dd9aad2723..23dcd95211 100644
--- 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
-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)
{
@@ -272,18 +281,6 @@ static void cleanup_subject(struct strbuf *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",
};