The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.25 / (download) - annotate - [select for diffs], Sat Aug 6 18:26:43 2022 UTC (6 months ago) by andvar
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, HEAD
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored)

s/blity/bility/ in various words, mainly in comments.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Nov 10 16:42:47 2021 UTC (14 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

s/struture/structure/ in comment.

Revision 1.20.46.1 / (download) - annotate - [select for diffs], Wed Apr 8 14:09:16 2020 UTC (2 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.20: +17 -6 lines
Diff to previous 1.20 (colored) next main 1.21 (colored)

Merge changes from current as of 20200406

Revision 1.20.48.1 / (download) - annotate - [select for diffs], Tue Dec 17 12:30:36 2019 UTC (3 years, 1 month ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2
Changes since 1.20: +17 -6 lines
Diff to previous 1.20 (colored) next main 1.21 (colored)

Pull up following revision(s) (requested by christos in ticket #555):

	usr.bin/mail/mime_child.c: revision 1.10
	usr.bin/mail/mail.1: revision 1.68
	usr.bin/mail/complete.c: revision 1.21

PR/54766: elo: Broken mime-hooks handling in mail(1)
pullup-9.

PR/54765: elo: Minor error in the mail(1) man page (-F description truncated)
pullup-9

PR/54764: elo: Incorrect '+file' filename completion in mail(1)
Add propel completion stem so that file completion works.
pullup-9

Revision 1.23 / (download) - annotate - [select for diffs], Mon Dec 16 22:55:45 2019 UTC (3 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.22: +3 -4 lines
Diff to previous 1.22 (colored)

revert previous, don't specialcase NUL string.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Dec 15 04:17:38 2019 UTC (3 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.21: +4 -3 lines
Diff to previous 1.21 (colored)

treat empty variables are unset (Steffen Nurpmeso)

Revision 1.21 / (download) - annotate - [select for diffs], Sat Dec 14 20:28:02 2019 UTC (3 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.20: +17 -6 lines
Diff to previous 1.20 (colored)

PR/54764: elo: Incorrect '+file' filename completion in mail(1)
Add propel completion stem so that file completion works.
pullup-9

Revision 1.20 / (download) - annotate - [select for diffs], Tue Jan 12 14:44:24 2010 UTC (13 years 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-20191119, phil-wifi-20190609, 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-0-RC1, 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-nb8-mediatek-base, matt-nb8-mediatek, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-mips64-premerge-20101231, localcount-20160914, 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
Branch point for: phil-wifi, netbsd-9
Changes since 1.19: +10 -9 lines
Diff to previous 1.19 (colored)

- 1 -> EXIT_FAILURE
- avoid assertion firing when hitting ^D in CC: line.

Revision 1.16.2.1 / (download) - annotate - [select for diffs], Wed May 13 19:19:56 2009 UTC (13 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.16: +65 -60 lines
Diff to previous 1.16 (colored) next main 1.17 (colored)

Sync with HEAD.

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

Revision 1.19 / (download) - annotate - [select for diffs], Fri Apr 10 13:08:24 2009 UTC (13 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.18: +56 -59 lines
Diff to previous 1.18 (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.18 / (download) - annotate - [select for diffs], Wed Feb 11 19:22:22 2009 UTC (13 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

add missing ,

Revision 1.17 / (download) - annotate - [select for diffs], Wed Feb 11 19:10:08 2009 UTC (13 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.16: +11 -3 lines
Diff to previous 1.16 (colored)

don't print warnings about can't find termcap entry.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Jan 18 01:29:57 2009 UTC (14 years ago) by lukem
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.15: +7 -8 lines
Diff to previous 1.15 (colored)

fix -Wsign-compare issues

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

sync with head.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:14 2008 UTC (14 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
Changes since 1.14: +2 -9 lines
Diff to previous 1.14 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.12.4.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:35:50 2007 UTC (15 years, 3 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.12: +34 -34 lines
Diff to previous 1.12 (colored) next main 1.13 (colored)

sync with HEAD

Revision 1.14 / (download) - annotate - [select for diffs], Mon Oct 29 23:20:38 2007 UTC (15 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.13: +5 -5 lines
Diff to previous 1.13 (colored)

From Anon Ymous:
knf changes:
- s/sizeof x/sizeof(x)/.
- remove unnecessary malloc typecasts.
- whitespace nits.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Oct 23 14:58:43 2007 UTC (15 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.12: +31 -31 lines
Diff to previous 1.12 (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.11.2.1 / (download) - annotate - [select for diffs], Mon Feb 19 13:38:29 2007 UTC (15 years, 11 months 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.11: +12 -6 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

Pull up following revision(s) (requested by christos in ticket #454):
	usr.bin/mail/complete.c: revision 1.12
	usr.bin/mail/mail.1: revision 1.47
	usr.bin/mail/main.c: revision 1.26
	usr.bin/mail/version.c: revision 1.11
	usr.bin/mail/mime_decode.c: revision 1.7
	usr.bin/mail/list.c: revision 1.19
	usr.bin/mail/names.c: revision 1.25
From Anon Ymous
1) Add support for message selection based on the message body.  The
pattern matching is done on the MIME decoded body as would be seen by
the print command.
2) Don't hook editline when doing headers only: that mode is never
interactive and it messes up piping if output is redirected to a
command that expects tty input, such as 'more'.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Dec 25 18:43:29 2006 UTC (16 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: matt-armv6
Changes since 1.11: +12 -6 lines
Diff to previous 1.11 (colored)

From Anon Ymous

1) Add support for message selection based on the message body.  The
pattern matching is done on the MIME decoded body as would be seen by
the print command.

2) Don't hook editline when doing headers only: that mode is never
interactive and it messes up piping if output is redirected to a
command that expects tty input, such as 'more'.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Nov 28 18:45:32 2006 UTC (16 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.10: +367 -364 lines
Diff to previous 1.10 (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.10 / (download) - annotate - [select for diffs], Tue Oct 31 20:07:32 2006 UTC (16 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.9: +88 -37 lines
Diff to previous 1.9 (colored)

More fixes from Anon Ymous:


1) Removed the -B flag (it was stupid on my part) and added a short
   description indicating how to accomplish the same thing under the
   "Sending Mail" section of man mail(1).

2) Added a -H flag to dump the headers and exit.  It takes optional
   flags to restrict to old, new, read, unread, and deleted messages
   (the later being kind of useless - it shares code with something
   that already had it).

3) Restored the 'Save' command which somehow got mistakenly removed in
   the last commit and add documentation for it!  (My apologies to
   its author.)

4) Added a 'mkread' command to mark messages as read (the inverse of
   'unread').  Should we also have a 'mknew' command?

5) Added a 'smopts' command to keep a database of addresses and
   sendmail options to be used when sending messages to those
   addresses.  See man mail(1) for a fuller description.

6) Added 'indentpreamble' and 'indentpostscript' variables whose
   values are inserted before and after a quoted message (~m or ~M
   escapes).
=20
7) Added string formatting abilities for the 'prompt', 'insertpreamble',
   'insertpostscript', and header display strings.  These strings
   support all the strftime() format parameters as well as many more
   specific to mail (see man mail(1)).

8) Fix the -a flag so that it only takes a single filename, unless
   "mime-attach-list" is defined.  This is more conventional and avoids
   unexpected whitespace issues.

Revision 1.9 / (download) - annotate - [select for diffs], Sat Oct 21 21:37:20 2006 UTC (16 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.8: +307 -190 lines
Diff to previous 1.8 (colored)

From our anonymous user:
- mime and character set handling
- command line editor and completion
- many code improvements

Revision 1.8 / (download) - annotate - [select for diffs], Mon Oct 2 16:43:31 2006 UTC (16 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.7: +4 -3 lines
Diff to previous 1.7 (colored)

Completion on a line like "." at the command prompt gives you a rather
rude response! (from our anonymous user)

Revision 1.7 / (download) - annotate - [select for diffs], Wed Sep 27 15:23:34 2006 UTC (16 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.6: +6 -4 lines
Diff to previous 1.6 (colored)

Coverity CID 4194: Wow, isn't char *foo = bar() ? : "0"; a syntax error?!?!

Revision 1.6 / (download) - annotate - [select for diffs], Wed Sep 27 15:21:26 2006 UTC (16 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.5: +5 -5 lines
Diff to previous 1.5 (colored)

Coverity CID 4195: Off by one buffer overflow.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Sep 27 15:20:06 2006 UTC (16 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

Coverity CID 4196: Off by one buffer overflow.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Sep 26 23:33:56 2006 UTC (16 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.3: +3 -2 lines
Diff to previous 1.3 (colored)

handle signals for the second editline struct. (from our anonymous user)

Revision 1.3 / (download) - annotate - [select for diffs], Sun Sep 24 14:01:48 2006 UTC (16 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.2: +29 -17 lines
Diff to previous 1.2 (colored)

1) Disable completion and history when grabbing header strings (e.g.,
with '~h' in the mail editor).
2) Eliminate a core dump when hitting '^D' with a zero length line.
From our anonymous user

Revision 1.2 / (download) - annotate - [select for diffs], Tue Sep 19 18:52:04 2006 UTC (16 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.1: +9 -9 lines
Diff to previous 1.1 (colored)

add an el_ prefix to the libedit variables. From our anonymous user.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Sep 18 19:48:44 2006 UTC (16 years, 4 months ago) by christos
Branch: MAIN

Jumbo mail patch from our anonymous user:

1) Use editline [optional]:
   Most of this code was borrowed from src/usr.bin/ftp.  It does the
   appropriate editing, history, and completion for all mail commands
   (from cmdtab[]) and also does editing on header strings ('~h' inside
   the mail editor).

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>