X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Ffmt_scan.c;h=5dc7f22c91269d2a71c6b273e057822f23dd7e33;hp=630cfc5c2f4b4db49a75a1abab89043dcf349d7c;hb=6c42153ad9362cc676ea66563bf400d7511b3b68;hpb=e49cacf800179ed9650c07f9fc13c5e8736cb9e7 diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index 630cfc5..5dc7f22 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -3,14 +3,29 @@ * fmt_scan.c -- format string interpretation * * $Id$ + * + * This code is Copyright (c) 2002, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. */ #include #include #include -#include +#include #include +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef TM_IN_SYS_TIME +# include +# else +# include +# endif +#endif + #define NFMTS MAXARGS extern char *formataddr (); /* hook for custom address formatting */ @@ -234,7 +249,7 @@ get_x400_friendly (char *mbox, char *buffer, int buffer_len) return NULL; if (get_x400_comp (mbox, "/PN=", buffer, buffer_len)) { - for (mbox = buffer; mbox = strchr(mbox, '.'); ) + for (mbox = buffer; (mbox = strchr(mbox, '.')); ) *mbox++ = ' '; return buffer; @@ -636,7 +651,7 @@ fmt_scan (struct format *format, char *scanl, int width, int *dat) } if (fmt->f_type == FT_LS_ADDR) goto unfriendly; - if ((str = mn->m_pers) == NULL) + if ((str = mn->m_pers) == NULL) { if ((str = mn->m_note)) { strncpy (buffer, str, sizeof(buffer)); str = buffer; @@ -674,6 +689,7 @@ fmt_scan (struct format *format, char *scanl, int width, int *dat) break; } } + } break; case FT_LOCALDATE: @@ -748,9 +764,6 @@ fmt_scan (struct format *format, char *scanl, int width, int *dat) len -= sp - lp + 1; while (cp < ep && lp <= sp) *cp++ = *lp++; - *cp++ = '\n'; - for (i=indent; cp < ep && i > 0; i--) - *cp++ = ' '; while (isspace(*lp)) lp++, len--; if (*lp) {