From 8b5ee99b019949db3daf217fb619785d58fbc553 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Wed, 13 Feb 2002 11:12:09 +0000 Subject: [PATCH] Undo the %l fix. It broke things. --- hdrline.c | 18 +++--------------- muttlib.c | 9 +-------- protos.h | 3 +-- 3 files changed, 5 insertions(+), 25 deletions(-) diff --git a/hdrline.c b/hdrline.c index e46c6aca..619d57cf 100644 --- a/hdrline.c +++ b/hdrline.c @@ -445,21 +445,9 @@ hdr_format_str (char *dest, case 'l': if (!optional) - { - if (hdr->lines >= 0) - { - snprintf (fmt, sizeof (fmt), "%%%sd", prefix); - snprintf (dest, destlen, fmt, (int) hdr->lines); - } - else - { - int i; - int len = atoi (prefix); - for (i = 0; i < len && i < destlen - 1; i++) - dest[i] = '?'; - - dest[i] = '\0'; - } + { + snprintf (fmt, sizeof (fmt), "%%%sd", prefix); + snprintf (dest, destlen, fmt, (int) hdr->lines); } else { diff --git a/muttlib.c b/muttlib.c index cff93a04..58637801 100644 --- a/muttlib.c +++ b/muttlib.c @@ -50,14 +50,6 @@ #include #include -HEADER *mutt_new_header (void) -{ - HEADER *hdr = safe_calloc (1, sizeof (HEADER)); - hdr->lines = -1; - return hdr; -} - - BODY *mutt_new_body (void) { BODY *p = (BODY *) safe_calloc (1, sizeof (BODY)); @@ -1328,3 +1320,4 @@ const char *mutt_make_version (void) MUTT_VERSION, ReleaseDate); return vstring; } + diff --git a/protos.h b/protos.h index 5e7f8bb8..895e6616 100644 --- a/protos.h +++ b/protos.h @@ -59,6 +59,7 @@ int _mutt_traverse_thread (CONTEXT *ctx, HEADER *hdr, int flag); #define mutt_new_parameter() safe_calloc (1, sizeof (PARAMETER)) +#define mutt_new_header() safe_calloc (1, sizeof (HEADER)) #define mutt_new_envelope() safe_calloc (1, sizeof (ENVELOPE)) #define mutt_new_enter_state() safe_calloc (1, sizeof (ENTER_STATE)) @@ -84,8 +85,6 @@ ADDRESS *mutt_remove_duplicates (ADDRESS *); ADDRESS *mutt_expand_aliases (ADDRESS *); ADDRESS *mutt_parse_adrlist (ADDRESS *, const char *); -HEADER *mutt_new_header(void); - BODY *mutt_make_file_attach (const char *); BODY *mutt_make_message_attach (CONTEXT *, HEADER *, int); BODY *mutt_remove_multipart (BODY *); -- 2.40.0