]> granicus.if.org Git - neomutt/commitdiff
Undo the %l fix. It broke things.
authorThomas Roessler <roessler@does-not-exist.org>
Wed, 13 Feb 2002 11:12:09 +0000 (11:12 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Wed, 13 Feb 2002 11:12:09 +0000 (11:12 +0000)
hdrline.c
muttlib.c
protos.h

index e46c6aca1a2a9f9a3da9f01edd8b065c561910ed..619d57cfa99a7b536fdc1468d0834912d14cf6e1 100644 (file)
--- 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
       {
index cff93a04a9ae28188c33981c9ccc01419ba63d56..58637801da0f1516fcf0790f004047170db4a31c 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
 #include <sys/types.h>
 #include <utime.h>
 
-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;
 }
+
index 5e7f8bb8a271d0cf542688eb54495dc51a27f480..895e66165bf102f18ba092a1918551e4364a4096 100644 (file)
--- 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 *);