Compare commits
9 Commits
3e8c80b8e0
...
0.7.10
Author | SHA1 | Date | |
---|---|---|---|
29a1add6f0
|
|||
0be2cf9fda
|
|||
a7920dedf3
|
|||
5cc84ca1bd
|
|||
af7c6c8ced
|
|||
7dd6f3d69d
|
|||
10a9440e57
|
|||
994cb03fe5
|
|||
c527aff34b
|
384
ChangeLog
384
ChangeLog
@@ -1,384 +0,0 @@
|
|||||||
Mon Oct 23 01:29:07 CEST 2006 Daniel Spiljar <dspiljar@panix.com>
|
|
||||||
|
|
||||||
* src/mboxgrep.h, src/main.c, src/mbox.c, src/mbox.h, src/scan.c:
|
|
||||||
temporary mbox file (used for deleting messages) is now created
|
|
||||||
by tmpmbox_create(), tmpp global pointer is killed; portions of
|
|
||||||
code in scan.c are replaced by single call of mbox_write_message();
|
|
||||||
scan.c no longer includes zlib.h and bzlib.h
|
|
||||||
|
|
||||||
Thu Oct 19 03:50:38 CEST 2006 Daniel Spiljar <dspiljar@panix.com>
|
|
||||||
|
|
||||||
* src/mboxgrep.h, src/main.c, src/maildir.c, src/scan.c:
|
|
||||||
got rid off tmpp and maildir_count global variables (code
|
|
||||||
cleanup)
|
|
||||||
|
|
||||||
Thu Oct 19 03:38:24 CEST 2006 Daniel Spiljar <dspiljar@panix.com>
|
|
||||||
|
|
||||||
* src/mboxgrep.h, src/main.c, src/scan.c:
|
|
||||||
introduction of the global runtime_t structure; mailbox counter,
|
|
||||||
MD5 hash and other global variables are now part of it (code
|
|
||||||
cleanup)
|
|
||||||
|
|
||||||
Fri Jul 7 06:10:51 CEST 2006 Daniel Spiljar <dspiljar@panix.com>
|
|
||||||
|
|
||||||
* src/mboxgrep.h, src/re.c, src/re.h, src/scan.c:
|
|
||||||
portions of scan_mailbox() have been moved to new functions,
|
|
||||||
pcre_match() and regex_match() (code cleanup)
|
|
||||||
|
|
||||||
Thu Jul 6 13:54:23 CEST 2006 Daniel Spiljar <dspiljar@panix.com>
|
|
||||||
|
|
||||||
* src/main.c, src/mboxgrep.h, src/re.c, src/re.h, src/scan.c:
|
|
||||||
main() has been partially uncluttered by moving portions of the
|
|
||||||
code to functions pcre_init() and regex_init()
|
|
||||||
|
|
||||||
Thu Jul 6 12:49:59 CEST 2006 Daniel Spiljar <dspiljar@panix.com>
|
|
||||||
|
|
||||||
* src/main.c, src/mboxgrep.h, src/misc.c, src/misc.h:
|
|
||||||
variables regex_s and haveregex are now part of the option_t
|
|
||||||
structure (code cleanup)
|
|
||||||
|
|
||||||
Thu Jul 6 10:26:57 CEST 2006 Daniel Spiljar <dspiljar@panix.com>
|
|
||||||
|
|
||||||
* src/main.c, src/misc.c, src/misc.h:
|
|
||||||
parts of main() have been moved to set_default_options() and
|
|
||||||
get_runtime_options() (code cleanup)
|
|
||||||
|
|
||||||
Sat Jul 1 13:06:37 CEST 2006 Daniel Spiljar <dspiljar@panix.com>
|
|
||||||
|
|
||||||
* src/mbox.c, src/mbox.h:
|
|
||||||
file mode and ownership-altering code has been moved to a separate
|
|
||||||
function, tmpfile_mod_own (code cleanup)
|
|
||||||
|
|
||||||
Tue Jun 27 18:48:00 CEST 2006 Daniel Spiljar <dspiljar@panix.com>
|
|
||||||
|
|
||||||
* src/mbox.c, src/mbox.h:
|
|
||||||
portions of the code from tmpfile_open moved to a new function,
|
|
||||||
tmpfile_name (code cleanup)
|
|
||||||
|
|
||||||
Mon Feb 20 18:09:59 CET 2006 Daniel Spiljar <dspiljar@panix.com>
|
|
||||||
|
|
||||||
* src/maildir.c, src/mh.c:
|
|
||||||
removed some unused variables (have_return_path)
|
|
||||||
|
|
||||||
Mon Jan 30 01:35:30 CET 2006 Daniel Spiljar <dspiljar@panix.com>
|
|
||||||
|
|
||||||
* src/mboxgrep.h, src/maildir.c, src/mh.c, src/mbox.c, src/scan.c, src/main.c:
|
|
||||||
boxname, outboxname, pipecmd and tmpfilename are now a part of
|
|
||||||
the config_t structure and no longer global variables
|
|
||||||
|
|
||||||
Sat Jan 21 08:18:29 CET 2006 Daniel Spiljar <dspiljar@panix.com>
|
|
||||||
|
|
||||||
* src/scan.c, src/misc.c, src/misc.h:
|
|
||||||
created postmark_print() to unclutter scan_mailbox()
|
|
||||||
|
|
||||||
Fri Jan 20 05:36:44 CET 2006 Daniel Spiljar <dspiljar@panix.com>
|
|
||||||
|
|
||||||
* src/misc.c, src/misc.h, src/mbox.c, src/maildir.c, src/mh.c:
|
|
||||||
some repetitive code moved to malloc_message()
|
|
||||||
|
|
||||||
Fri Jan 20 05:13:06 CET 2006 Daniel Spiljar <dspiljar@panix.com>
|
|
||||||
|
|
||||||
* src/mbox.c:
|
|
||||||
cleanup of mbox_write_message(); use of gzwrite_loop() and
|
|
||||||
bzwrite_loop()
|
|
||||||
|
|
||||||
Fri Jan 20 03:57:28 CET 2006 Daniel Spiljar <dspiljar@panix.com>
|
|
||||||
|
|
||||||
* src/scan.c, src/wrap.h, src/wrap.c:
|
|
||||||
wrote gzwrite_loop() and bzwrite_loop() to remove some repetitive
|
|
||||||
code from scan.c
|
|
||||||
|
|
||||||
Fri Jan 20 02:11:50 CET 2006 Daniel Spiljar <dspiljar@panix.com>
|
|
||||||
|
|
||||||
* src/scan.c:
|
|
||||||
md5_check_message(): array b and cast in strncmp are no longer
|
|
||||||
unsigned
|
|
||||||
|
|
||||||
Wed Jan 18 01:48:56 CET 2006 Daniel Spiljar <dspiljar@panix.com>
|
|
||||||
|
|
||||||
* src/info.c, src/mboxgrep.h:
|
|
||||||
updated copyright information, changed author's email address
|
|
||||||
to the one at Panix
|
|
||||||
|
|
||||||
Mon Apr 12 19:30:52 CEST 2004 Daniel Spiljar <dspiljar@world.std.com>
|
|
||||||
|
|
||||||
* src/info.c:
|
|
||||||
updated copyright information
|
|
||||||
|
|
||||||
Sun Apr 11 23:45:08 CEST 2004 Daniel Spiljar <dspiljar@world.std.com>
|
|
||||||
|
|
||||||
* src/mbox.h, src/mbox.c, src/scan.c, src/main.c:
|
|
||||||
mbox_write_message(); further fixes of message deletion code
|
|
||||||
|
|
||||||
Thu Sep 18 00:10:13 CEST 2003 Daniel Spiljar <dspiljar@world.std.com>
|
|
||||||
|
|
||||||
* src/scan.c:
|
|
||||||
fixed deleting messages from mbox folders compressed with
|
|
||||||
bzip2
|
|
||||||
|
|
||||||
Thu Sep 18 00:08:36 CEST 2003 Daniel Spiljar <dspiljar@world.std.com>
|
|
||||||
|
|
||||||
* src/main.c, src/mbox.c:
|
|
||||||
moved James P. Dugal's ownership-preserving code from main()
|
|
||||||
to tmpfile_open()
|
|
||||||
|
|
||||||
Sat Aug 30 23:13:01 CEST 2003 Vid Strpic <vms@bofhlet.net>
|
|
||||||
|
|
||||||
* src/info.c:
|
|
||||||
If bzip2 support is compiled in, `--help' command should list
|
|
||||||
`bz2mbox' as a valid option to `--mailbox-format='.
|
|
||||||
|
|
||||||
Sun Aug 24 21:49:52 CEST 2003 Daniel Spiljar <dspiljar@world.std.com>
|
|
||||||
|
|
||||||
* doc/mboxgrep.1, doc/mboxgrep.texi:
|
|
||||||
small updates
|
|
||||||
|
|
||||||
Sat Aug 23 20:56:39 CEST 2003 James P. Dugal <jpd@louisiana.edu>
|
|
||||||
|
|
||||||
* src/main.c, src/mbox.h, src/mbox.c
|
|
||||||
If we are to use rename() to move a temp file (resulting from
|
|
||||||
deletions done in a mailbox) back over the original mailbox, we
|
|
||||||
must be sure the temp file is on the same file system. Also,
|
|
||||||
we should try to preserve the same ownership and permissions.
|
|
||||||
|
|
||||||
Mon Aug 11 00:39:14 CEST 2003 Daniel Spiljar <dspiljar@world.std.com>
|
|
||||||
|
|
||||||
* configure.ac:
|
|
||||||
look for pcre-config(1) script; this effectively fixes a
|
|
||||||
compilation bug on recent RedHat Linux systems
|
|
||||||
|
|
||||||
Sun Apr 13 21:16:25 CEST 2003 Daniel Spiljar <dspiljar@world.std.com>
|
|
||||||
|
|
||||||
* src/info.c, src/info.h:
|
|
||||||
print_wrap(); list of compile-time options is now printed wrapped
|
|
||||||
|
|
||||||
Mon Apr 7 01:24:20 CEST 2003 Daniel Spiljar <dspiljar@world.std.com>
|
|
||||||
|
|
||||||
* src/mbox.c, src/wrap.c, src/wrap.h:
|
|
||||||
m_gzdopen()
|
|
||||||
|
|
||||||
Sun Apr 6 23:04:19 CEST 2003 Daniel Spiljar <dspiljar@world.std.com>
|
|
||||||
|
|
||||||
* src/mbox.c, src/mbox.h, src/mboxgrep.h, src/misc.c, src/scan.c:
|
|
||||||
support for bzip2 compressed mailboxes
|
|
||||||
|
|
||||||
Fri Apr 4 00:14:01 CEST 2003 Daniel Spiljar <dspiljar@world.std.com>
|
|
||||||
|
|
||||||
* configure.ac:
|
|
||||||
check for libbz2
|
|
||||||
|
|
||||||
Sun Oct 27 23:57:31 CET 2002 Daniel Spiljar <dspiljar@world.std.com>
|
|
||||||
|
|
||||||
* src/mbox.c:
|
|
||||||
mbox_open() should now complain if called with an unknown argument
|
|
||||||
mode. Shouldn't normally happen, but...
|
|
||||||
|
|
||||||
Sun Aug 25 22:43:38 CEST 2002 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/main.c, src/mbox.c, src/mbox.h, src/scan.c:
|
|
||||||
removed the gzmbox* functions in order to avoid code duplication;
|
|
||||||
as a side effect, mboxgrep can now read compressed mbox folders
|
|
||||||
from standard input
|
|
||||||
|
|
||||||
Sun Aug 11 01:36:02 CEST 2002 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* configure.ac:
|
|
||||||
AC_HEADER_STDC, which fixed another compiler warning
|
|
||||||
|
|
||||||
Sat Aug 10 22:03:31 CEST 2002 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/main.c, src/mbox.c, src/mh.c, src/scan.c, src/misc.c, src/maildir.c, src/mboxgrep.h:
|
|
||||||
made various code cleanups: got rid of a couple of global variables,
|
|
||||||
fixed compiler warnings and things like that
|
|
||||||
|
|
||||||
Sat Aug 10 00:35:21 CEST 2002 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/mh.h, src/wrap.h, src/mboxgrep.h:
|
|
||||||
removed some unnecessary #defines that have been causing compiler
|
|
||||||
errors
|
|
||||||
|
|
||||||
Sun Aug 4 20:11:29 CEST 2002 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/main.c, src/scan.c, src/scan.h:
|
|
||||||
code clean up: moved recursive scan code from main()
|
|
||||||
to recursive_scan()
|
|
||||||
|
|
||||||
Wed Jul 24 00:20:59 CEST 2002 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/maildir.c:
|
|
||||||
same thing with maildir as with MH below
|
|
||||||
|
|
||||||
Sat Jul 6 22:51:45 CEST 2002 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/mh.c:
|
|
||||||
MH module doesn't read files which aren't RFC 2822 messages anymore
|
|
||||||
|
|
||||||
Sat Jun 29 01:43:36 CEST 2002 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* configure.in, src/maildir.c, src/main.c, src/mbox.c, src/mh.c, src/scan.c:
|
|
||||||
added debugging with dmalloc library
|
|
||||||
|
|
||||||
Sat Jun 29 01:39:21 CEST 2002 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/mbox.c, src/maildir.c:
|
|
||||||
fixed potential problem as with MH folders (below)
|
|
||||||
|
|
||||||
Sat Jun 29 01:28:30 CEST 2002 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/mh.c, src/scan.c:
|
|
||||||
(hopefully) fixed crashes on MH folders
|
|
||||||
|
|
||||||
Sat Feb 23 22:22:12 CET 2002 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/mbox.c, src/maildir.c, src/mh.c, src/misc.c:
|
|
||||||
removed useless code that required strptime ()
|
|
||||||
|
|
||||||
Sat Feb 23 15:43:05 CET 2002 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/main.c, src/mbox.h, src/mbox.c, src/scan.c:
|
|
||||||
mboxgrep can now read mbox folders from standard input
|
|
||||||
|
|
||||||
Fri Feb 8 02:15:36 CET 2002 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/main.c:
|
|
||||||
fixed a bug which prevented mboxgrep from being compiled;
|
|
||||||
this happened because I've put some assignments *before*
|
|
||||||
declarations
|
|
||||||
|
|
||||||
Wed Feb 6 23:11:50 CET 2002 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/maildir.c, src/main.c, src/mbox.c, src/mboxgrep.h, src/mh.c, src/mh.h, src/misc.c, src/scan.c, src/wrap.c
|
|
||||||
code cleanups; many global variables have been replaced with
|
|
||||||
a single option_t structure
|
|
||||||
|
|
||||||
Fri Feb 1 00:31:05 CET 2002 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/maildir.c:
|
|
||||||
fixed a bug which occured on recursive search of maildirs
|
|
||||||
|
|
||||||
Wed Jan 2 00:32:37 CET 2002 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/main.c, src/misc.c, src/wrap.h:
|
|
||||||
applied a patch (kindly submitted by John R. Daily
|
|
||||||
<jdaily@progeny.com>), which fixes missing prototypes that might
|
|
||||||
cause mboxgrep to coredump on IA64 platform
|
|
||||||
|
|
||||||
Sat Dec 15 20:12:40 CET 2001 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/main.c, src/scan.c, src/scan.h:
|
|
||||||
recursive search through directories has been reimplemented
|
|
||||||
|
|
||||||
Sat Dec 8 22:13:54 CET 2001 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/main.c, src/maildir.c:
|
|
||||||
replaced remaining occurences of malloc() with xmalloc()
|
|
||||||
|
|
||||||
Sat Dec 8 21:21:58 CET 2001 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/maildir.c, src/main.c, src/mbox.c, src/mh.c, src/misc.c, src/scan.c, src/wrap.c, src/wrap.h:
|
|
||||||
wrote xstrdup(), an error-checking wrapper around strdup() and
|
|
||||||
replaced all occurences of strdup() with xstrdup()
|
|
||||||
|
|
||||||
Sun Dec 2 18:05:57 CET 2001 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/Makefile.in, src/info.c, src/main.c, src/mboxgrep.h, src/md5.c, src/md5.h, src/scan.c, src/scan.h, doc/mboxgrep.texi:
|
|
||||||
mboxgrep can now ignore duplicate messages, thanks to the MD5
|
|
||||||
algorithm
|
|
||||||
|
|
||||||
* src/maildir.c, src/main.c, src/scan.c, src/wrap.c, src/wrap.h:
|
|
||||||
wrote xcalloc() and renamed m_realloc() to xrealloc()
|
|
||||||
|
|
||||||
Sat Nov 17 22:57:57 CET 2001 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/mbox.c, src/mh.c, src/maildir.c
|
|
||||||
message->headers and message->body pointers are now initially malloc'd
|
|
||||||
to size of one character in order to prevent NULL pointers from being
|
|
||||||
passed to regexec()
|
|
||||||
|
|
||||||
Wed Nov 7 22:47:34 CET 2001 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* configure.ac, src/mboxgrep.h, src/main.c, src/misc.h, src/misc.c, src/info.c, src/config.h, src/mbox.c:
|
|
||||||
file locking method can now be selected at run time
|
|
||||||
|
|
||||||
* src/info.c, src/maildir.c, src/main.c, src/mbox.h, src/misc.c, src/scan.c, src/Makefile.in
|
|
||||||
changed `#include "config.h"' to `#include <config.h>', and fixed
|
|
||||||
other bugs with #including
|
|
||||||
|
|
||||||
Sat Nov 3 16:08:22 CET 2001 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* configure.ac, src/config.h.in, src/info.c, src/mbox.c
|
|
||||||
files can be locked with flock() instead of fcntl(), if
|
|
||||||
enabled at compile time
|
|
||||||
|
|
||||||
Sun Oct 28 19:01:44 CET 2001 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/Makefile.in:
|
|
||||||
forgot to mention getopt.c and getopt1.c
|
|
||||||
|
|
||||||
Sun Oct 28 16:06:28 CET 2001 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/mh.c, src/main.c, src/scan.c:
|
|
||||||
#included certain neccessary files
|
|
||||||
|
|
||||||
Sun Oct 28 14:43:21 CET 2001 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/maildir.c, src/maildir.h, src/scan.c:
|
|
||||||
wrote functions maildir_check and maildir_create;
|
|
||||||
if the target maildir doesn't exist, mboxgrep creates one;
|
|
||||||
if it does exist, mboxgrep checks its consistency and refuses to
|
|
||||||
write to it unless `tmp', `new' and `cur' subdirectories exist
|
|
||||||
|
|
||||||
Sun Oct 28 13:02:10 CET 2001 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/info.c, doc/mboxgrep.texi, doc/mboxgrep.1
|
|
||||||
the "--regexp" command was implemented in version 0.7.0, but I
|
|
||||||
forgot to document it
|
|
||||||
|
|
||||||
Sat Oct 27 21:48:36 CEST 2001 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/scan.c:
|
|
||||||
if the input is a non-mbox folder, a proper postmark line (with
|
|
||||||
date) is put on top of each message written to stdout
|
|
||||||
|
|
||||||
Mon Oct 8 22:53:34 CEST 2001 Daniel Spiljar <dspiljar@bofhlet.net>
|
|
||||||
|
|
||||||
* src/*:
|
|
||||||
source code now completely rewritten
|
|
||||||
|
|
||||||
Sun May 27 00:19:52 CEST 2001 Daniel Spiljar <dspiljar@public.srce.hr>
|
|
||||||
|
|
||||||
* doc/mboxgrep.1:
|
|
||||||
updated the manual page -- it now refers to RFC 2822, instead
|
|
||||||
of the obsoleted 822
|
|
||||||
|
|
||||||
Tue May 1 15:06:03 CEST 2001 Daniel Spiljar <dspiljar@public.srce.hr>
|
|
||||||
|
|
||||||
* configure.in, doc/Makefile.in, src/Makefile.in, Makefile.in:
|
|
||||||
moved manpage to the `doc' subdirectory; changed files above
|
|
||||||
accordingly
|
|
||||||
|
|
||||||
Sun Apr 15 23:00:08 CEST 2001 Daniel Spiljar <dspiljar@public.srce.hr>
|
|
||||||
|
|
||||||
* src/mboxgrep.h, src/main.c, src/file.c, src/scan.c, src/info.c:
|
|
||||||
added support for writing messages to another mail folder
|
|
||||||
|
|
||||||
Mon Apr 9 21:55:15 CEST 2001 Daniel Spiljar <dspiljar@public.srce.hr>
|
|
||||||
|
|
||||||
* src/file.c, src/scan.c: all calls of malloc() are now checked
|
|
||||||
and mboxgrep exits with code 2 if it fails to allocate memory
|
|
||||||
|
|
||||||
Sun Apr 8 19:40:33 CEST 2001 Daniel Spiljar <dspiljar@public.srce.hr>
|
|
||||||
|
|
||||||
* src/mboxgrep.h, src/main.c: wrote mboxgrep_stat()
|
|
||||||
|
|
||||||
Sun Apr 8 16:58:36 CEST 2001 Daniel Spiljar <dspiljar@public.srce.hr>
|
|
||||||
|
|
||||||
* src/mboxgrep.h, src/main.c: wrote mboxgrep_error()
|
|
||||||
|
|
||||||
Tue Mar 27 01:26:22 CEST 2001 Daniel Spiljar <dspiljar@public.srce.hr>
|
|
||||||
|
|
||||||
* configure.in: check for gethostname()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.59 2006-10-22 23:34:47 dspiljar Exp $
|
|
123
NEWS → NEWS.md
123
NEWS → NEWS.md
@@ -1,110 +1,129 @@
|
|||||||
Changes of mboxgrep
|
# Changes of mboxgrep
|
||||||
===================
|
|
||||||
|
|
||||||
Changes since 0.7.9
|
## Changes since 0.7.9
|
||||||
|
|
||||||
|
- development has been restarted after a longer hiatus
|
||||||
|
- moved the source tree to git
|
||||||
- fixed compile bug on FreeBSD and other systems
|
- fixed compile bug on FreeBSD and other systems
|
||||||
- fixed deleting messages mbox folders compressed with bzip2
|
- fixed deleting messages mbox folders compressed with bzip2
|
||||||
|
- fixed multiple compilation errors and warnings on Linux and FreeBSD
|
||||||
|
- started implementing a debug mode
|
||||||
|
|
||||||
|
## Changes since 0.7.8
|
||||||
|
|
||||||
Changes since 0.7.8
|
|
||||||
- implemented support for mbox folders compressed with bzip2 algorithm
|
- implemented support for mbox folders compressed with bzip2 algorithm
|
||||||
- improved detection of PCRE library; this also fixes a compilation bug
|
- improved detection of PCRE library; this also fixes a compilation bug
|
||||||
on recent RedHat Linux systems
|
on recent RedHat Linux systems
|
||||||
- fixed a problem with message deletion, which used to occur if an mbox
|
- fixed a problem with message deletion, which used to occur if an mbox
|
||||||
folder and temporary directory were on different filesystems;
|
folder and temporary directory were on different filesystems;
|
||||||
thanks to James P. Dugal <jpd@louisiana.edu> for providing a patch
|
thanks to James P. Dugal <jpd AT louisiana.edu> for providing a patch
|
||||||
|
|
||||||
|
## Changes since 0.7.7
|
||||||
|
|
||||||
Changes since 0.7.7
|
|
||||||
- fixed crashes on MH folders, as well as a potential problem with mbox
|
- fixed crashes on MH folders, as well as a potential problem with mbox
|
||||||
and maildir folders with the same cause
|
and maildir folders with the same cause
|
||||||
- debugging with dmalloc library
|
- debugging with the dmalloc library
|
||||||
- MH and maildir functions no longer read files which aren't RFC 2822 messages
|
- MH and maildir functions no longer read files which aren't RFC 2822 messages
|
||||||
- mboxgrep can now read gzip compressed mbox folders from standard input
|
- mboxgrep can now read gzip compressed mbox folders from standard input
|
||||||
(which is a side effect of a code cleanup!)
|
(which is a side effect of a code cleanup!)
|
||||||
|
|
||||||
Changes since 0.7.6a
|
## Changes since 0.7.6a
|
||||||
|
|
||||||
- mboxgrep can now read mbox folders from standard input
|
- mboxgrep can now read mbox folders from standard input
|
||||||
|
|
||||||
Changes since 0.7.6
|
## Changes since 0.7.6
|
||||||
|
|
||||||
- fixed a bug which prevented mboxgrep from being compiled
|
- fixed a bug which prevented mboxgrep from being compiled
|
||||||
|
|
||||||
Changes since 0.7.5
|
## Changes since 0.7.5
|
||||||
|
|
||||||
- fixed a bug which caused mboxgrep to coredump on recursive search of
|
- fixed a bug which caused mboxgrep to coredump on recursive search of
|
||||||
maildirs
|
maildirs
|
||||||
- code cleanups
|
- code cleanups
|
||||||
|
|
||||||
Changes since 0.7.4
|
## Changes since 0.7.4
|
||||||
|
|
||||||
- recursive search through directories has been reimplemented
|
- recursive search through directories has been reimplemented
|
||||||
|
|
||||||
Changes since 0.7.3
|
## Changes since 0.7.3
|
||||||
|
|
||||||
- mboxgrep can now ignore messages with identical bodies
|
- mboxgrep can now ignore messages with identical bodies
|
||||||
|
|
||||||
Changes since 0.7.2
|
## Changes since 0.7.2
|
||||||
|
|
||||||
- file locking method can be selected at runtime
|
- file locking method can be selected at runtime
|
||||||
- mboxgrep used to coredump on messages with empty headers; the problem is
|
- mboxgrep used to coredump on messages with empty headers; the problem is
|
||||||
now hopefully fixed
|
now hopefully fixed
|
||||||
- mboxgrep now compiles on FreeBSD
|
- mboxgrep now compiles on FreeBSD
|
||||||
|
|
||||||
Changes since 0.7.1
|
## Changes since 0.7.1
|
||||||
- file locking with flock() instead of fcntl() is now supported
|
|
||||||
- mboxgrep should now compile on systems which don't have getopt_long()
|
- file locking with `flock()` instead of `fcntl()` is now supported
|
||||||
|
- mboxgrep should now compile on systems which don't have `getopt_long()`
|
||||||
- other minor bugfixes
|
- other minor bugfixes
|
||||||
|
|
||||||
Changes since 0.7.0
|
## Changes since 0.7.0
|
||||||
|
|
||||||
- bugfixes
|
- bugfixes
|
||||||
|
|
||||||
Changes since 0.5.3
|
## Changes since 0.5.3
|
||||||
|
|
||||||
- NOTE: there was no stable version between 0.5.x and 0.7.x
|
- NOTE: there was no stable version between 0.5.x and 0.7.x
|
||||||
- mboxgrep is almost completely rewritten
|
- mboxgrep is almost completely rewritten
|
||||||
- implemented message deleting feature (--delete)
|
- implemented message deleting feature (`--delete`)
|
||||||
- implemented piping messages to a command (--pipe) (using this option,
|
- implemented piping messages to a command (`--pipe`) (using this option,
|
||||||
each selected message is piped to a separate instance of the specified
|
each selected message is piped to a separate instance of the specified
|
||||||
command)
|
command)
|
||||||
- added support for compressed mbox folders
|
- added support for compressed mbox folders
|
||||||
|
|
||||||
Changes since 0.5.2
|
## Changes since 0.5.2
|
||||||
|
|
||||||
- implemented ability to write found messages to another folder (instead
|
- implemented ability to write found messages to another folder (instead
|
||||||
of stdout)
|
of standard output)
|
||||||
- started writing *real* changelog (while this file has been renamed to
|
- started writing a *real* changelog (while this file has been renamed to
|
||||||
"NEWS")
|
"NEWS")
|
||||||
- wrote a manual in Texinfo format
|
- wrote a manual in Texinfo format
|
||||||
|
|
||||||
Changes since 0.5.1
|
## Changes since 0.5.1
|
||||||
- implemented message counting (-c, --count)
|
|
||||||
- fixed manual page installation target in src/Makefile.in -- manual page
|
- implemented message counting (`-c, --count`)
|
||||||
is now installed in $(manpath)/man1/ rather than in $(prefix)/man/man1/
|
- fixed manual page installation target in src/Makefile.in -- manual page
|
||||||
- added `--without-sense-of-humor' switch to the configure script, which
|
is now installed in `$(manpath)/man1/` rather than `$(prefix)/man/man1/`
|
||||||
disables checking whether Garfield still hates Mondays
|
- added `--without-sense-of-humor` switch to the configure script, which
|
||||||
- short version of `--version' switch is now `-V' instead of `-v',
|
disables checking whether Garfield still hates Mondays
|
||||||
because `-v' will be used for inverted matching
|
- short version of `--version` switch is now `-V` instead of `-v`,
|
||||||
- implemented inverted matching (-v, --invert-match)
|
because `-v` will be used for inverted matching
|
||||||
- implemented recursive search through directories (-r, --recursive)
|
- implemented inverted matching (`-v, --invert-match`)
|
||||||
- config.h[.in] is now wrapped (#ifndef CONFIG_H and stuff)
|
- implemented recursive search through directories (`-r, --recursive`)
|
||||||
|
- config.h[.in] is now wrapped (`#ifndef CONFIG_H` and stuff)
|
||||||
|
|
||||||
|
## Changes since 0.5.0
|
||||||
|
|
||||||
Changes since 0.5.0
|
|
||||||
- added support for qmail-style maildir folders
|
- added support for qmail-style maildir folders
|
||||||
|
|
||||||
Changes since 0.4.0
|
## Changes since 0.4.0
|
||||||
- source of getopt_long() is now included, so long options are also available
|
|
||||||
|
- the source of `getopt_long()` is now included, so long options are also available
|
||||||
on platforms that don't use GNU libc
|
on platforms that don't use GNU libc
|
||||||
- file locking is now performed on mbox folders only
|
- file locking is now performed on mbox folders only
|
||||||
|
|
||||||
Changes since 0.2.0
|
## Changes since 0.2.0
|
||||||
- added support for MH mailboxes
|
|
||||||
- added scope selection switches `-B' (or `--body') and `-H' (or `--headers')
|
- added support for MH mailboxes
|
||||||
- getopt() (or getopt_long(), if available) is now used to parse command line
|
- added scope selection switches `-B` (or `--body`) and `-H` (or `--headers`)
|
||||||
arguments, instead of my own lousy routine
|
- `getopt()` (or `getopt_long()`, if available) is now used to parse command line
|
||||||
- configure script now looks for PCRE by default, unless `--with-pcre=no' or
|
arguments, instead of my own lousy routine
|
||||||
`--without-pcre' is specified
|
- the configure script now looks for PCRE by default, unless `--with-pcre=no` or
|
||||||
- the feature of reading from standard input is gone
|
`--without-pcre` is specified
|
||||||
- added `-v' (or `--version') switch
|
- the feature of reading from standard input is gone
|
||||||
|
- added `-v` (or `--version`) switch
|
||||||
|
|
||||||
|
## Changes since 0.1.1
|
||||||
|
|
||||||
Changes since 0.1.1
|
|
||||||
- mboxgrep now puts a shared lock on a mailbox before reading it
|
- mboxgrep now puts a shared lock on a mailbox before reading it
|
||||||
- various code cleanups
|
- various code cleanups
|
||||||
|
|
||||||
Changes since 0.1.0
|
## Changes since 0.1.0
|
||||||
- fixed install target in Makefile (`install' is now used instead of `cp')
|
|
||||||
|
- fixed install target in Makefile (`install` is now used instead of `cp`)
|
||||||
- added support for mailboxes generated by Gnus
|
- added support for mailboxes generated by Gnus
|
||||||
|
|
||||||
|
|
||||||
$Id: NEWS,v 1.23 2004-04-11 21:48:53 dspiljar Exp $
|
|
1
TODO.md
1
TODO.md
@@ -13,6 +13,7 @@
|
|||||||
- [ ] literal date matching
|
- [ ] literal date matching
|
||||||
- [x] reading messages from standard input
|
- [x] reading messages from standard input
|
||||||
- [x] run-time selection of file locking method
|
- [x] run-time selection of file locking method
|
||||||
|
- [x] add a debug function
|
||||||
|
|
||||||
## File formats, encodings and standards
|
## File formats, encodings and standards
|
||||||
|
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
This directory is intended to hold third-party contributions.
|
|
||||||
|
|
||||||
- mboxgrep.spec is an RPM spec file, kindly contributed by
|
|
||||||
Vaclav Slavik <v.slavik@volny.cz>
|
|
||||||
|
|
3
contrib/README.md
Normal file
3
contrib/README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
This directory is intended to hold third-party contributions.
|
||||||
|
|
||||||
|
- mboxgrep.spec is an RPM spec file, kindly contributed by Vaclav Slavik <v.slavik AT volny.cz>
|
@@ -1,5 +1,4 @@
|
|||||||
.Id $Id: mboxgrep.1,v 1.16 2006-01-18 00:09:58 dspiljar Exp $
|
.TH MBOXGREP 1 "17 Feb 2023"
|
||||||
.TH MBOXGREP 1 "26 Jan 2023"
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mboxgrep \- displays email messages matching a pattern
|
mboxgrep \- displays email messages matching a pattern
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -86,6 +85,10 @@ Ignore duplicate messages.
|
|||||||
Select input and output mailbox TYPE. TYPE can be either `mbox' (default),
|
Select input and output mailbox TYPE. TYPE can be either `mbox' (default),
|
||||||
`zmbox' (gzip compressed mbox), `bz2mbox' (bzip2 compressed mbox), `mh', `nnml',
|
`zmbox' (gzip compressed mbox), `bz2mbox' (bzip2 compressed mbox), `mh', `nnml',
|
||||||
`nnmh' or `maildir'.
|
`nnmh' or `maildir'.
|
||||||
|
.IP "-s, --no-messages"
|
||||||
|
Suppress most error messages.
|
||||||
|
.IP "--debug"
|
||||||
|
Print messages useful for debugging.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
.TP
|
.TP
|
||||||
\(bu
|
\(bu
|
||||||
|
@@ -169,6 +169,9 @@ options below change such behavior.
|
|||||||
'-s'
|
'-s'
|
||||||
Suppress error messages.
|
Suppress error messages.
|
||||||
|
|
||||||
|
'--debug'
|
||||||
|
Print messages useful for debugging.
|
||||||
|
|
||||||
|
|
||||||
File: mboxgrep.info, Node: Search scope selection, Next: Mailbox type selection, Prev: Output control, Up: Invoking
|
File: mboxgrep.info, Node: Search scope selection, Next: Mailbox type selection, Prev: Output control, Up: Invoking
|
||||||
|
|
||||||
@@ -253,11 +256,11 @@ Node: Miscellaneous1827
|
|||||||
Node: File locking2112
|
Node: File locking2112
|
||||||
Node: Regexp selection2749
|
Node: Regexp selection2749
|
||||||
Node: Output control3301
|
Node: Output control3301
|
||||||
Node: Search scope selection4292
|
Node: Search scope selection4345
|
||||||
Node: Mailbox type selection4533
|
Node: Mailbox type selection4586
|
||||||
Node: Examples4854
|
Node: Examples4907
|
||||||
Node: Bugs5678
|
Node: Bugs5731
|
||||||
Node: To Vicky6096
|
Node: To Vicky6149
|
||||||
|
|
||||||
End Tag Table
|
End Tag Table
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
@set EDITION 0.7
|
@set EDITION 0.7
|
||||||
@set VERSION 0.7.10
|
@set VERSION 0.7.10
|
||||||
@set UPDATED 26 Jan 2023
|
@set UPDATED 17 Feb 2023
|
||||||
|
|
||||||
@dircategory Mail
|
@dircategory Mail
|
||||||
@direntry
|
@direntry
|
||||||
@@ -188,6 +188,9 @@ instance of COMMAND.
|
|||||||
@itemx -s
|
@itemx -s
|
||||||
Suppress error messages.
|
Suppress error messages.
|
||||||
|
|
||||||
|
@item --debug
|
||||||
|
Print messages useful for debugging.
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@node Search scope selection, Mailbox type selection, Output control, Invoking
|
@node Search scope selection, Mailbox type selection, Output control, Invoking
|
||||||
|
@@ -120,7 +120,8 @@ help (void)
|
|||||||
" -nd, --no-duplicates\t\tIgnore duplicate messages\n"
|
" -nd, --no-duplicates\t\tIgnore duplicate messages\n"
|
||||||
" -o, --output=MAILBOX\t\tWrite messages to MAILBOX\n"
|
" -o, --output=MAILBOX\t\tWrite messages to MAILBOX\n"
|
||||||
" -p, --pipe=COMMAND\t\tPipe each found message to COMMAND\n"
|
" -p, --pipe=COMMAND\t\tPipe each found message to COMMAND\n"
|
||||||
" -s, --no-messages\t\tSuppress most error messages\n\n"
|
" -s, --no-messages\t\tSuppress most error messages\n"
|
||||||
|
" --debug\t\t\tPrint messages useful for debugging\n\n"
|
||||||
"Matching criteria:\n\n"
|
"Matching criteria:\n\n"
|
||||||
" -E, --extended-regexp\tPATTERN is an extended regular expression\n"
|
" -E, --extended-regexp\tPATTERN is an extended regular expression\n"
|
||||||
" -G, --basic-regexp\t\tPATTERN is a basic regular expression\n");
|
" -G, --basic-regexp\t\tPATTERN is a basic regular expression\n");
|
||||||
|
30
src/main.c
30
src/main.c
@@ -48,8 +48,6 @@ runtime_t runtime;
|
|||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
/* {{{ */
|
|
||||||
|
|
||||||
{
|
{
|
||||||
int havemailbox = 0;
|
int havemailbox = 0;
|
||||||
int singlefile = 0;
|
int singlefile = 0;
|
||||||
@@ -57,8 +55,6 @@ main (int argc, char **argv)
|
|||||||
runtime.maildir_count = 0;
|
runtime.maildir_count = 0;
|
||||||
|
|
||||||
static struct option long_options[] =
|
static struct option long_options[] =
|
||||||
/* {{{ */
|
|
||||||
|
|
||||||
{
|
{
|
||||||
{"count", 0, 0, 'c'},
|
{"count", 0, 0, 'c'},
|
||||||
{"delete", 0, 0, 'd'},
|
{"delete", 0, 0, 'd'},
|
||||||
@@ -80,13 +76,12 @@ main (int argc, char **argv)
|
|||||||
{"output", 1, 0, 'o'},
|
{"output", 1, 0, 'o'},
|
||||||
{"no-duplicates", 0, 0, 200},
|
{"no-duplicates", 0, 0, 200},
|
||||||
{"no-file-lock", 0, 0, 201},
|
{"no-file-lock", 0, 0, 201},
|
||||||
|
{"debug", 0, 0, 202},
|
||||||
{"file-lock", 1, 0, 'l'},
|
{"file-lock", 1, 0, 'l'},
|
||||||
{"recursive", 0, 0, 'r'},
|
{"recursive", 0, 0, 'r'},
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* }}} */
|
|
||||||
|
|
||||||
set_default_options ();
|
set_default_options ();
|
||||||
|
|
||||||
get_runtime_options (&argc, argv, long_options);
|
get_runtime_options (&argc, argv, long_options);
|
||||||
@@ -112,7 +107,7 @@ main (int argc, char **argv)
|
|||||||
config.regex_s = xstrdup (argv[optind]);
|
config.regex_s = xstrdup (argv[optind]);
|
||||||
config.haveregex = 1;
|
config.haveregex = 1;
|
||||||
++optind;
|
++optind;
|
||||||
} /* if */
|
}
|
||||||
|
|
||||||
if (config.haveregex)
|
if (config.haveregex)
|
||||||
{
|
{
|
||||||
@@ -122,7 +117,7 @@ main (int argc, char **argv)
|
|||||||
else
|
else
|
||||||
#endif /* HAVE_LIBPCRE */
|
#endif /* HAVE_LIBPCRE */
|
||||||
regex_init ();
|
regex_init ();
|
||||||
} /* if */
|
}
|
||||||
else
|
else
|
||||||
usage ();
|
usage ();
|
||||||
|
|
||||||
@@ -130,10 +125,9 @@ main (int argc, char **argv)
|
|||||||
singlefile = 1;
|
singlefile = 1;
|
||||||
|
|
||||||
while (optind < argc)
|
while (optind < argc)
|
||||||
/* {{{ */
|
|
||||||
|
|
||||||
{
|
{
|
||||||
if (config.action == DELETE) {
|
if (config.action == DELETE)
|
||||||
|
{
|
||||||
tmpmbox_create (argv[optind]);
|
tmpmbox_create (argv[optind]);
|
||||||
runtime.tmp_mbox = (mbox_t *) mbox_open (config.tmpfilename, "w");
|
runtime.tmp_mbox = (mbox_t *) mbox_open (config.tmpfilename, "w");
|
||||||
}
|
}
|
||||||
@@ -144,7 +138,9 @@ main (int argc, char **argv)
|
|||||||
recursive_scan (argv[optind]);
|
recursive_scan (argv[optind]);
|
||||||
else
|
else
|
||||||
scan_mailbox (argv[optind]);
|
scan_mailbox (argv[optind]);
|
||||||
|
|
||||||
havemailbox = 1;
|
havemailbox = 1;
|
||||||
|
|
||||||
if (config.action == COUNT)
|
if (config.action == COUNT)
|
||||||
{
|
{
|
||||||
if (singlefile)
|
if (singlefile)
|
||||||
@@ -163,13 +159,9 @@ main (int argc, char **argv)
|
|||||||
rename (config.tmpfilename, argv[optind]);
|
rename (config.tmpfilename, argv[optind]);
|
||||||
}
|
}
|
||||||
++optind;
|
++optind;
|
||||||
} /* while */
|
}
|
||||||
|
|
||||||
/* }}} */
|
|
||||||
|
|
||||||
if (! havemailbox)
|
if (! havemailbox)
|
||||||
/* {{{ */
|
|
||||||
|
|
||||||
{
|
{
|
||||||
config.format = MBOX;
|
config.format = MBOX;
|
||||||
scan_mailbox ("-");
|
scan_mailbox ("-");
|
||||||
@@ -177,9 +169,5 @@ main (int argc, char **argv)
|
|||||||
fprintf (stdout, "%i\n", runtime.count);
|
fprintf (stdout, "%i\n", runtime.count);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* }}} */
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
} /* main */
|
}
|
||||||
|
|
||||||
/* }}} */
|
|
||||||
|
@@ -107,6 +107,7 @@ typedef struct
|
|||||||
int merr;
|
int merr;
|
||||||
int pid;
|
int pid;
|
||||||
int haveregex;
|
int haveregex;
|
||||||
|
int debug;
|
||||||
|
|
||||||
char hostname[HOST_NAME_SIZE];
|
char hostname[HOST_NAME_SIZE];
|
||||||
char *boxname, *outboxname, *pipecmd, *tmpfilename, *regex_s;
|
char *boxname, *outboxname, *pipecmd, *tmpfilename, *regex_s;
|
||||||
|
73
src/misc.c
73
src/misc.c
@@ -1,6 +1,6 @@
|
|||||||
/* -*- C -*-
|
/*
|
||||||
mboxgrep - scan mailbox for messages matching a regular expression
|
mboxgrep - scan mailbox for messages matching a regular expression
|
||||||
Copyright (C) 2000, 2001, 2002, 2003, 2006 Daniel Spiljar
|
Copyright (C) 2000 - 2004, 2006, 2023 Daniel Spiljar
|
||||||
|
|
||||||
Mboxgrep is free software; you can redistribute it and/or modify it
|
Mboxgrep is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by
|
||||||
@@ -15,8 +15,7 @@
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with mboxgrep; if not, write to the Free Software Foundation,
|
along with mboxgrep; if not, write to the Free Software Foundation,
|
||||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
$Id: misc.c,v 1.17 2006-07-06 10:53:49 dspiljar Exp $ */
|
|
||||||
|
|
||||||
#define _XOPEN_SOURCE /* Pull in strptime(3) from time.h */
|
#define _XOPEN_SOURCE /* Pull in strptime(3) from time.h */
|
||||||
#define _BSD_SOURCE /* Compensate for _XOPEN_SOURCE to pull in strdup(3)
|
#define _BSD_SOURCE /* Compensate for _XOPEN_SOURCE to pull in strdup(3)
|
||||||
@@ -38,7 +37,6 @@
|
|||||||
|
|
||||||
format_t
|
format_t
|
||||||
folder_format (const char *name)
|
folder_format (const char *name)
|
||||||
/* {{{ */
|
|
||||||
{
|
{
|
||||||
format_t f;
|
format_t f;
|
||||||
|
|
||||||
@@ -63,16 +61,14 @@ folder_format (const char *name)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (config.merr)
|
if (config.merr)
|
||||||
fprintf (stderr, "mboxgrep: %s: unknown folder type\n", name);
|
fprintf (stderr, "%s: %s: unknown folder type\n", APPNAME, name);
|
||||||
exit (2);
|
exit (2);
|
||||||
}
|
}
|
||||||
|
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
/* }}} */
|
|
||||||
|
|
||||||
lockmethod_t lock_method (const char *name)
|
lockmethod_t lock_method (const char *name)
|
||||||
/* {{{ */
|
|
||||||
{
|
{
|
||||||
lockmethod_t l;
|
lockmethod_t l;
|
||||||
|
|
||||||
@@ -97,38 +93,36 @@ lockmethod_t lock_method (const char *name)
|
|||||||
|
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
/* }}} */
|
|
||||||
|
|
||||||
/* time_t parse_date(char *datestr) */
|
/*
|
||||||
/* {{{ */
|
time_t parse_date(char *datestr)
|
||||||
/* { */
|
{
|
||||||
/* time_t t; */
|
time_t t;
|
||||||
/* const char *fmt = "%d%n%b%n%Y%n%T"; */
|
const char *fmt = "%d%n%b%n%Y%n%T";
|
||||||
/* int h, m; */
|
int h, m;
|
||||||
/* struct tm tm; */
|
struct tm tm;
|
||||||
/* char *str2, str1[BUFSIZ]; */
|
char *str2, str1[BUFSIZ];
|
||||||
|
|
||||||
/* sscanf (datestr, "Date: %[^\r\n]", str1); */
|
sscanf (datestr, "Date: %[^\r\n]", str1);
|
||||||
|
|
||||||
/* str2 = (char *) strptime (str1, "%d%n%b%n%Y%n%T", &tm); */
|
str2 = (char *) strptime (str1, "%d%n%b%n%Y%n%T", &tm);
|
||||||
/* if (str2 == NULL) */
|
if (str2 == NULL)
|
||||||
/* str2 = (char *) strptime (str1, "%a, %d%n%b%n%Y%n%T", &tm); */
|
str2 = (char *) strptime (str1, "%a, %d%n%b%n%Y%n%T", &tm);
|
||||||
/* if (str2 == NULL) */
|
if (str2 == NULL)
|
||||||
/* return (time_t) 0; */
|
return (time_t) 0;
|
||||||
|
|
||||||
/* if (sscanf (str2, "%3d%2d", &h, &m) == 2) */
|
if (sscanf (str2, "%3d%2d", &h, &m) == 2)
|
||||||
/* { */
|
{
|
||||||
/* tm.tm_hour -= h; */
|
tm.tm_hour -= h;
|
||||||
/* tm.tm_min -= (h >= 0 ? m : -m); */
|
tm.tm_min -= (h >= 0 ? m : -m);
|
||||||
/* t = (time_t) mktime (&tm); */
|
t = (time_t) mktime (&tm);
|
||||||
/* } */
|
}
|
||||||
|
|
||||||
/* return t; */
|
return t;
|
||||||
/* } */
|
}
|
||||||
/* }}} */
|
*/
|
||||||
|
|
||||||
char * parse_return_path(char *rpath)
|
char * parse_return_path(char *rpath)
|
||||||
/* {{{ */
|
|
||||||
{
|
{
|
||||||
char *blah1, blah2[BUFSIZ];
|
char *blah1, blah2[BUFSIZ];
|
||||||
|
|
||||||
@@ -137,7 +131,6 @@ char * parse_return_path(char *rpath)
|
|||||||
|
|
||||||
return blah1;
|
return blah1;
|
||||||
}
|
}
|
||||||
/* }}} */
|
|
||||||
|
|
||||||
void * allocate_message (void)
|
void * allocate_message (void)
|
||||||
{
|
{
|
||||||
@@ -188,6 +181,7 @@ set_default_options (void)
|
|||||||
config.format = MBOX; /* default mailbox format */
|
config.format = MBOX; /* default mailbox format */
|
||||||
config.lock = FCNTL; /* default file locking method */
|
config.lock = FCNTL; /* default file locking method */
|
||||||
config.merr = 1; /* report errors by default */
|
config.merr = 1; /* report errors by default */
|
||||||
|
config.debug = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -204,8 +198,6 @@ get_runtime_options (int *argc, char **argv, struct option *long_options)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
switch (c)
|
switch (c)
|
||||||
/* {{{ */
|
|
||||||
|
|
||||||
{
|
{
|
||||||
case '?':
|
case '?':
|
||||||
usage();
|
usage();
|
||||||
@@ -236,7 +228,7 @@ get_runtime_options (int *argc, char **argv, struct option *long_options)
|
|||||||
#else
|
#else
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"%s: Support for Perl regular expressions not "
|
"%s: Support for Perl regular expressions not "
|
||||||
"compiled in\n");
|
"compiled in\n", APPNAME);
|
||||||
exit(2);
|
exit(2);
|
||||||
#endif /* HAVE_LIBPCRE */
|
#endif /* HAVE_LIBPCRE */
|
||||||
break;
|
break;
|
||||||
@@ -274,6 +266,11 @@ get_runtime_options (int *argc, char **argv, struct option *long_options)
|
|||||||
case 201:
|
case 201:
|
||||||
config.lock = 0;
|
config.lock = 0;
|
||||||
break;
|
break;
|
||||||
|
case 202:
|
||||||
|
config.debug = 1;
|
||||||
|
fprintf (stderr, "%s: %s, line %d: enable debugging\n",
|
||||||
|
APPNAME, __FILE__, __LINE__);
|
||||||
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
config.recursive = 1;
|
config.recursive = 1;
|
||||||
break;
|
break;
|
||||||
@@ -297,7 +294,5 @@ get_runtime_options (int *argc, char **argv, struct option *long_options)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} /* switch */
|
} /* switch */
|
||||||
|
|
||||||
/* }}} */
|
|
||||||
} /* while */
|
} /* while */
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user