The NetBSD Project

CVS log for src/usr.bin/mail/format.c

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / mail

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.18 / (download) - annotate - [select for diffs], Fri Sep 8 14:34:02 2023 UTC (5 months, 2 weeks ago) by shm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.17: +16 -8 lines
Diff to previous 1.17 (colored)

Fix check_bufsize() incorrect behaviour

The function ensures that that buffer is large enough to store the data (if
not, it reallocates it). It doubled the buffer every time the buffer was too
small, but in some cases it wasn't enough, which might lead to heap overflows.
Rewrite of this function handles int overflow scenarios as well as ensures the
buffer is big enough to handle the data.

Thanks riastradh@ for the review and comments

Revision 1.17 / (download) - annotate - [select for diffs], Sun Aug 7 10:12:19 2022 UTC (18 months, 2 weeks ago) by andvar
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

fix some typos and grammar in comments.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Apr 19 17:49:28 2021 UTC (2 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored)

Fix weekday parsing; only reset the string when parsing fail and only set
the weekday when parsing succeeds (Steffen Nurpmeso)

Revision 1.13.8.1 / (download) - annotate - [select for diffs], Wed May 13 19:19:56 2009 UTC (14 years, 9 months ago) by jym
Branch: jym-xensuspend
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored) next main 1.14 (colored)

Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html

Revision 1.15 / (download) - annotate - [select for diffs], Sat Apr 11 14:22:32 2009 UTC (14 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-premerge-20091211, matt-nb8-mediatek-base, matt-nb8-mediatek, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-mips64-premerge-20101231, localcount-20160914, jym-xensuspend-nbase, jym-xensuspend-base, is-mlppp-base, is-mlppp, cherry-xenmp-base, cherry-xenmp, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2, agc-symver-base, agc-symver
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

- magic fix for short files
- knf
from Anon Ymous

Revision 1.14 / (download) - annotate - [select for diffs], Fri Apr 10 13:08:24 2009 UTC (14 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

From Anon Ymous:

- Remove all longjmp(3) calls from signal handlers.  Instead, we post
to an internal signal queue and check that periodically.  All signal
related code is now in sig.c, except for the SIGCHLD handler which
remains in popen.c as it is intimately tied to routines there.

- Handle SIGPIPE in type1() regardless of mime support, or else the
handler in execute() will prevent our error code from being returned
resulting in 'sawcom' not being set on the first command as it should.
This only affected the initial behavior of the "next" command without
mime support.

- Add the 'T' flag to many commands in cmdtab.c that should not look
like the first command.  E.g., start mail on a mailbox with multiple
messages, run "set foo", then "next", and watch the second message get
displayed rather than the first as is the case without the first "set"
command.

- Add file descriptor and file handle leak detection.  Enabled by
DEBUG_FILE_LEAK.  This will likely disappear in the future.

- Fix a long standing (since import in 1993) longjmp() bug in
edstop(): the jmpbuf was invalid when quit() is called at the end of
main.

- Fix a long standing bug (since import in 1993) in snarf() where it
didn't strip whitespace correctly if the line consisted only of
whitespace.

- Lint cleanup.

- New Feature: "Header" command.  This allows miscellaneous header
fields to be added to the header, e.g., "X-Organization:" or
"Reply-To:" fields.

- New Feature: "page-also" variable.  This allows the specification of
additional commands to page.  It is more flexible than "crt".

- Document the "pager-off" variable: if set, it disables paging
entirely.

Revision 1.12.6.1 / (download) - annotate - [select for diffs], Sun May 18 12:36:06 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.12: +2 -9 lines
Diff to previous 1.12 (colored) next main 1.13 (colored)

sync with head.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:14 2008 UTC (15 years, 9 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, hpcarm-cleanup-nbase
Branch point for: jym-xensuspend
Changes since 1.12: +2 -9 lines
Diff to previous 1.12 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.7.4.2 / (download) - annotate - [select for diffs], Wed Jan 9 02:00:46 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.7.4.1: +5 -5 lines
Diff to previous 1.7.4.1 (colored) to branchpoint 1.7 (colored) next main 1.8 (colored)

sync with HEAD

Revision 1.12 / (download) - annotate - [select for diffs], Wed Nov 14 22:06:04 2007 UTC (16 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf
Branch point for: yamt-pf42
Changes since 1.11: +5 -5 lines
Diff to previous 1.11 (colored)

From Anon Ymous
- Fix a stupid typo: sizeof(sizeof(a)) isn't very useful.
- Use emalloc(3) and erealloc(3) instead of malloc(3) and realloc(3),
  resp.

Revision 1.7.4.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:35:52 2007 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.7: +306 -133 lines
Diff to previous 1.7 (colored)

sync with HEAD

Revision 1.11 / (download) - annotate - [select for diffs], Tue Oct 23 14:58:44 2007 UTC (16 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.10: +270 -160 lines
Diff to previous 1.10 (colored)

From Anon Ymous:
- Introduce date_to_tm() and hl_date_to_tm() to parse the date and
  headline date a bit more efficiently.
- If 'tm_isdst' is determined, let strftime(3) handle the '%Z' and
  '%z' formats.  Otherwise, output "-0000" and "???", respectively, to
  help preserve with alignment; strftime(3) will output an empty
  string in these case.
- Change fail() to use the '-d' flag (which sets the 'debug' variable)
  rather than the "debug" _environment_ variable.  This is more
  consistent with other warnings.
- Don't use gcc C extensions, e.g., "case LOW ... HIGH:".
- Define is_WSP() in def.h to be an inline function that for checks
  whitespace (WSP = ' ' or '\t'), as defined in RFC 2822.  Use it
  consistently in place of isblank().
- For consistency, rename skip_blank() to skip_WSP().
- Add inline skip_space() to complement skip_blank() (now skip_WSP).
- Check all ctype(3) calls for argument range issues.
- Whitespace and comment cleanup/changes.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Oct 19 15:59:55 2007 UTC (16 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.9: +14 -3 lines
Diff to previous 1.9 (colored)

Handle 2 digit years, from Anon Ymous

Revision 1.9 / (download) - annotate - [select for diffs], Thu Oct 4 17:05:01 2007 UTC (16 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.8: +13 -11 lines
Diff to previous 1.8 (colored)

Use warnx(3) not warn(3); timegm(3) does not set errno.  Use the
unconverted time if the date is invalid. (from Anon Ymous)

Revision 1.8 / (download) - annotate - [select for diffs], Wed Sep 12 13:09:46 2007 UTC (16 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.7: +53 -3 lines
Diff to previous 1.7 (colored)

Support obsolete zone info in date field.  (See obs_zone of RFC 2822,
sec 4.3.) from Anon Ymous

Revision 1.7 / (download) - annotate - [select for diffs], Sat Jul 7 18:04:17 2007 UTC (16 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: matt-armv6
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

off by one fix from Anon Ymous

Revision 1.6 / (download) - annotate - [select for diffs], Sat Jul 7 17:53:13 2007 UTC (16 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.5: +3 -4 lines
Diff to previous 1.5 (colored)

protect against null.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jul 6 20:14:33 2007 UTC (16 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.4: +28 -5 lines
Diff to previous 1.4 (colored)

Don't expand % escapes in headers.

Revision 1.2.2.2 / (download) - annotate - [select for diffs], Mon Feb 19 13:39:28 2007 UTC (17 years ago) by tron
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0
Changes since 1.2.2.1: +5 -5 lines
Diff to previous 1.2.2.1 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Pull up following revision(s) (requested by christos in ticket #454):
	usr.bin/mail/format.c: revision 1.4
don't overwrite variables on the stack. From Anon Ymous.

Revision 1.2.2.1 / (download) - annotate - [select for diffs], Mon Feb 19 13:37:06 2007 UTC (17 years ago) by tron
Branch: netbsd-4
Changes since 1.2: +52 -33 lines
Diff to previous 1.2 (colored)

Pull up following revision(s) (requested by christos in ticket #454):
	usr.bin/mail/format.c: revision 1.3
Fix timezone and date parsing. From Anon Ymous.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jan 22 19:07:13 2007 UTC (17 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.3: +5 -5 lines
Diff to previous 1.3 (colored)

don't overwrite variables on the stack. From Anon Ymous.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Dec 10 06:06:47 2006 UTC (17 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.2: +54 -35 lines
Diff to previous 1.2 (colored)

Fix timezone and date parsing. From Anon Ymous.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Nov 28 18:45:32 2006 UTC (17 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.1: +207 -62 lines
Diff to previous 1.1 (colored)

From Anon Ymous:

1) Statification of modules.

2) Implement the 'detach' and 'Detach' commands for extracting mime
   parts from messages.

3) Teach mail to output "In-Reply-To" and "References" header fields
   when replying so others can thread us.

4) Implement threading, sorting, and tagging, supported by the
   following commands: 'flatten', 'reverse', 'sort', 'thread',
   'unthread', 'down', 'tset', 'up', 'expose', 'hide', 'tag',
   'untag', 'invtags', 'tagbelow', 'hidetags', 'showtags'.
   See the manpage for details (when available - soon).

5) Implement a 'deldups' command to delete duplicate messages based on
   their "Message-Id" field, e.g., in replies to a mailing list that
   are also CCed to a subscriber.  (This can also be accomplished with
   the threading and tagging commands.)

6) Implement 'ifdef' and 'ifndef' commands, and make the conditionals
   nestable (i.e., implement a conditional stack).  The if/else/endif
   commands existed before, but they were primitive and undocumented.
   The 'if' command currently recognizes the "receiving", "sending",
   and "headersonly" mode keywords.

7) Teach the message selecting routine to understand regular
   expressions if "regex-search" is defined.  Otherwise only case
   insensitive substring matches are done (as in the past).

8) Teach the message selection routine to understand boolean
   expressions.  Improved "colon-modifier" support.  See the manpage
   for details (when available - soon).

9) Extend paging to all commands (where relevant).

10) Add shell like piping and redirection of (standard) output (if
   "enable-piping" is defined).  Extend completion to these contexts.

11) The manpage should follow soon!!!!

Revision 1.1 / (download) - annotate - [select for diffs], Tue Oct 31 22:36:37 2006 UTC (17 years, 3 months ago) by christos
Branch: MAIN

new files from Anon Ymous.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>