tAdding whitespace like in RFC 822. - rohrpost - A commandline mail client to change the world as we see it.
 (HTM) git clone git://r-36.net/rohrpost
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit 8609a6a20e2133067c19e86b3222eac0a0ff9153
 (DIR) parent 808ce93bcad7e1555229692d66f77010a60412a5
 (HTM) Author: Christoph Lohmann <20h@r-36.net>
       Date:   Tue, 14 May 2013 18:09:09 +0200
       
       Adding whitespace like in RFC 822.
       
       Diffstat:
         ind.c                               |       4 ++++
         mime.c                              |       8 ++++++++
       
       2 files changed, 12 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/ind.c b/ind.c
       t@@ -85,6 +85,10 @@ memdupz(void *p, int l)
                return (void *)ret;
        }
        
       +/*
       + * Append the data at c with the length of lc to
       + * p, at position lp of p.
       + */
        void *
        memdupcat(void *p, int lp, void *c, int lc)
        {
 (DIR) diff --git a/mime.c b/mime.c
       t@@ -851,6 +851,14 @@ mime_parsebufintern(mime_t *mime, char *str, int len)
                                        if (value != NULL && hdr != NULL) {
                                                if (hdr->data != NULL) {
                                                        part = memdup(value, strlen(value)+1);
       +
       +                                                /* Adding a space. */
       +                                                hdr->data = memdupcat(hdr->data,
       +                                                                hdr->datalen-1,
       +                                                                " ", 1);
       +                                                hdr->datalen++;
       +
       +                                                /* Adding the next line. */
                                                        i = strlen(part);
                                                        key = memdupcat(hdr->data,
                                                                        hdr->datalen-1,