The main motivation was to ease adding attachments. You'll easy happen
to have trailing whitespace there, whereas you'll probably never want
to send files that have a name with whitespace at the end ... at least
you should never want to have or even send such files.
I don't know if it is a good idea to strip the trailing whitespace
in `anno -list' as well. I couldn't come up with an example when I
would want to keep it, hence I decided to remove it. This can be
changed back, if needed.
.B \-list
mode produces a listing of the field bodies for header fields with
matching component names, one per line.
+Trailing whitespace in the field body does not get printed.
If the
.B \-number
option is also used,
if (strncasecmp(field, comp, length)==0 &&
field[length] == ':') {
- for (cp = field + length + 1;
- *cp == ' ' || *cp == '\t'; cp++) {
- continue;
- }
+ cp = trim(field + length + 1);
if (number) {
printf("%d\t", count++);
}
while (get_line() != EOF && *field && *field != '-') {
if (strncasecmp(field, attach_hdr, length) == 0 &&
field[length] == ':') {
- for (p = field+length+1; *p==' ' || *p=='\t'; p++) {
- continue;
- }
+ p = trim(field+length+1);
if (*p == '+') {
/* forwarded message */
fprintf(composition_file, "#forw [forwarded message(s)] %s\n", p);