X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=handler.c;h=09556d18fa08544bd5bfdbe176383de66be8af99;hp=88a318331d5fbe234287815f64e5e53361e0c9eb;hb=fbce8661618b322f5cfd8efd6ead47163b04d69a;hpb=170b2f011c6e3616b24ae69bd181c4915ba6eb67 diff --git a/handler.c b/handler.c index 88a3183..09556d1 100644 --- a/handler.c +++ b/handler.c @@ -16,6 +16,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ +#if HAVE_CONFIG_H +# include "config.h" +#endif + #include #include #include @@ -1216,7 +1220,11 @@ static void print_flowed_line(char * line, STATE *s,int ql) { /* fprintf(stderr,"print_flowed_line will print `%s' with ql = %d\n",line,ql); */ if (strlen(line)==0) { + if (s->prefix) + state_puts(s->prefix,s); for (i=0;i',s); + if (option(OPTSTUFFQUOTED)) + state_putc(' ',s); state_putc('\n',s); return; } @@ -1257,11 +1265,15 @@ static void print_flowed_line(char * line, STATE *s,int ql) { } else { /* fprintf(stderr,"if 1 else\n"); */ } + if (s->prefix) + state_puts(s->prefix,s); for (i=0;i',s); - if (option(OPTSTUFFQUOTED) && ql>0) state_putc(' ',s); + if (option(OPTSTUFFQUOTED) && (ql>0 || s->prefix)) state_putc(' ',s); state_puts(oldpos,s); /* fprintf(stderr,"print_flowed_line: `%s'\n",oldpos); */ + if (pos0 && curline[strlen(curline)-1]==' ' && newql==quotelevel && strcmp(curline+quotelevel,"-- ")!=0) { + if (buf[newql]==' ') + curline[strlen(curline)-1] = '\0'; + curline = realloc(curline,curline_len+strlen(buf)); if (curline_len == 1) *curline = '\0'; curline_len+=strlen(buf);