summaryrefslogtreecommitdiffstats
path: root/hdrline.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2002-02-13 11:33:16 +0000
committerThomas Roessler <roessler@does-not-exist.org>2002-02-13 11:33:16 +0000
commite6b9b97e58c83752fd388480a970e581aa3c0802 (patch)
treeddc9ad980f8bf6f1bfe15798a7d4e49c22b531b3 /hdrline.c
parent8b5ee99b019949db3daf217fb619785d58fbc553 (diff)
Change the default format to be more friendly to "0-line messages",
and fix optional expansion for %l - it was the wrong way around. Also, add a hack to parse.c so we ignore negative values in Lines headers.
Diffstat (limited to 'hdrline.c')
-rw-r--r--hdrline.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/hdrline.c b/hdrline.c
index 619d57cf..19621137 100644
--- a/hdrline.c
+++ b/hdrline.c
@@ -449,11 +449,8 @@ hdr_format_str (char *dest,
snprintf (fmt, sizeof (fmt), "%%%sd", prefix);
snprintf (dest, destlen, fmt, (int) hdr->lines);
}
- else
- {
- if (hdr->lines > 0)
- optional = 0;
- }
+ else if (hdr->lines <= 0)
+ optional = 0;
break;
case 'L':
@@ -491,7 +488,7 @@ hdr_format_str (char *dest,
}
else
{
- if (hdr->score > 0)
+ if (hdr->score == 0)
optional = 0;
}
break;