2005-10-12  Russ Allbery  <rra@stanford.edu>

	* NEWS: Version 1.8 released.

	* debian/rules: Simplify and make the clean rule more robust.
	* debian/control: Lower priority to extra and update standards
	version to 3.6.2.
	* debian/copyright: Update to match my standard format.

	* file.c (truncate_file): New function.
	* file.h: Prototype truncate_file and simplify prototypes.
	* main.c (main): Call truncate_file when appropriate.
	* cfgparse.y: Add support for truncate action.
	* cfgtoken.l: Likewise.
	* newsyslog.pod: Document the truncate action.
	* t/truncate.t: New test for truncation.
	* t/truncate.conf: Likewise.
	* t/TESTS: Add the test for truncation.

	* expand.c (expand): Add %t escape.
	* expand.h: Document %t escape.
	* newsyslog.pod: Likewise.
	* CONFIG: Likewise.
	* t/timestamp.t: New test for %t escape.
	* t/timestamp.conf: Likewise.
	* t/TESTS: Add %t escape test.

2005-05-04  Russ Allbery  <rra@stanford.edu>

	* NEWS: Version 1.7 released.

	* debian/cron.daily: Look in newsyslog.daily directories in /etc
	and /usr/local/etc rather than just newsyslog.
	* debian/cron.weekly: New file.  Handle newsyslog.weekly.
	* debian/cron.monthly: New file.  Handle newsyslog.monthly.
	* debian/dirs: Create /etc/newsyslog.{daily,weekly,monthly}.
	* debian/README.Debian: Document new cron jobs.
	* debian/NEWS: Add an entry about this change.

	* Makefile.in (maintclean): Don't remove Debian packages.
	(dist): Exclude the debian directory.
	(deb-prep): Remove.

2004-11-16  Russ Allbery  <rra@stanford.edu>

	* NEWS: Version 1.6 released.

	* debian/cron.daily: New file.
	* debian/rules: Install cron job.
	* debian/README.Debian: Document cron job.

	* configure.ac: Check for large file support.

2004-08-16  Russ Allbery  <rra@stanford.edu>

	* Makefile.in (install): Install the newsyslog binary into sbin
	rather than bin.
	* debian/dirs: Create usr/sbin rather than usr/sbin.

	* NEWS: Version 1.5 released.

	* debian/README.Debian: Add Debian packaging rules.
	* debian/changelog: Likewise.
	* debian/compat: Likewise.
	* debian/control: Likewise.
	* debian/copyright: Likewise.
	* debian/dirs: Likewise.
	* debian/docs: Likewise.
	* debian/rules: Likewise.
	* debian/watch: Likewise.

	* Makefile.in (distclean): Remove TARDIR here.
	(maintclean): Remove all of the Debian packaging results and the
	results of make dist.
	(dist): Don't remove TARDIR after building the distribution, and
	create an MD5 checksum.
	(deb-prep): New.

	* autogen: New file.

2004-02-01  Russ Allbery  <rra@stanford.edu>

	* NEWS: Version 1.4 released.

	* README: Note the version number requirement for Autoconf and add
	pod2man to the list of development tools.  Minor wording
	improvements.

	* INSTALL: Document how to run the test suite.

	* main.c (main): Don't archive anything other than regular files,
	to protect against the common mistake of rotating a directory.
	* t/error.t: New file.  Only check for not rotating directories.
	* t/error-dir.conf: New file.
	* t/TESTS: Add error.

	* Makefile.in (distclean): Remove autom4te.cache.
	(dist): Remove autom4te.cache in the distribution directory.
	(newsyslog.8.in): Depend on configure.ac to get the version.

	* main.c (main): Use PACKAGE_STRING rather than the external
	version constant.
	* mkversion: Removed.  No longer needed.
	* Makefile.in (version.c): Remove rule.
	(SOURCES): Remove version.c.
	(TAGS): Likewise.
	(clean): Likewise.

	* error.c (error_log_syslog): Don't use the %m format option since
	it causes warnings on Linux.

	* logs.c (find_logs): Read the timestamp of a failed log into an
	unsigned long and then convert to time_t for maximum portability
	and to avoid warnings.

	* compress.c: Add missing includes.
	* main.c: Likewise.

	* Makefile.in: Updated dependencies.
	(WARNINGS): Remove -Wshadow.  Too many false
	positives from system headers.
	(dist): Rewrite to use rsync and the new Autoconf results.
	(TARNAME): New.  Get the package name from Autoconf.
	(VERSION): New.  Get the version from Autoconf.
	(MISC): No longer needed.
	(TESTS): No longer needed.

	* t/filter.conf: grep is in /bin on Linux, not /usr/bin.  This
	works on both Solaris and Linux.

	* t/filter.t: Also remove logs/test2 on cleanup.

	* t/basic.t: Open and close the HUP file in the same place; it's
	less confusing and more correct.  Handle EINTR returns from
	waitpid properly.

	* t/runtests.c: Give up on compiling with -ansi.  It just produces
	more warnings from other issues.

	* configure.ac: New file.  Ported configuration to Autoconf 2.57
	or later.  Also probe for long long and whether snprintf and
	vsnprintf need to be declared, and use the Autoconf 2.57 probe for
	bool.
	* configure.in: Removed.
	* m4/snprintf.m4: New file.  Probe for snprintf from INN.
	* aclocal.m4: Removed.  Replaced with m4/snprintf.m4.
	* acconfig.h: Removed.  bool handling moved to system.h.
	* utility.h: __attribute__ and UNUSED handling moved to...
	* system.h: ...here.  New file.  Also pull in the bool work
	acconfig.h was doing, and declare snprintf and vsnprintf if
	needed.
	* cfgparse.y: Include system.h.
	* cfgtoken.l: Likewise.
	* expand.c: Likewise.
	* compress.c: Include system.h instead of config.h.
	* error.c: Likewise.
	* file.c: Likewise.
	* logs.c: Likewise.
	* main.c: Likewise.
	* process.c: Likewise.
	* xmalloc.c: Likewise.

	* snprintf.c: Update to the latest version from INN.  This adds
	support for long long, which we don't actually need, but more
	importantly correctly handles short to int promotion in va_arg.

2002-08-27  Russ Allbery  <rra@stanford.edu>

	* VERSION: Version 1.3 released.

	* file.c (shuffle_files): Rework the memory management and string
	handling to avoid making dodgy assumptions and breaking badly when
	count > 9.

2002-08-24  Russ Allbery  <rra@stanford.edu>

	* README: Correct path to zlib.

2002-08-04  Russ Allbery  <rra@stanford.edu>

	* VERSION: Version 1.2 released.

	* compress.c (gzip_stream): Don't close the input stream.
	(bzip2_stream): Likewise
	* compress.h: Document that compress_stream doesn't close the
	input stream.

	* README: Reworked the requirements section and added a mention of
	bzip2.

	* mkdepend: Handle dependency lists that take multiple lines.
	* Makefile.in: Update dependencies.
	(MISC): Add NEWS.

	* configure.in: Check for stdbool.h.
	* acconfig.h: Make sure bool, true, and false are available.
	* cfgparse.y: Use bool where appropriate.
	(yyerror): Fix formatting.
	(cfgexpand): Test against NULL explicitly.
	(archive): Adjust archived log path length for the longer bzip2
	extension to avoid a memory clobber.
	* compress.c: Use bool where appropriate.
	* compress.h: Likewise.
	* expand.c (build_machine): Test against NULL explicitly.
	* file.c: Use bool where appropriate.
	(shuffle_files): Factor out common error code using goto.
	* file.h: Use bool where appropriate.
	* logs.c: Likewise.
	(find_logs): Use size_t instead of unsigned long.
	* logs.h: Use bool where appropriate.
	* main.c: Likewise.

	* Makefile.in (clean): Remove .pure, created by Purify.

	* t/basic.conf: Don't use Stanford-specific UIDs.
	* t/basic.t: Likewise.

	* file.c (compress_stream): Move to compress.c.
	(compress_file): Move to compress.c.
	(shuffle_files): Handle extensions other than .gz.
	* compress.c: New file.  Add support for bzip2 as well as gzip.
	* file.h: Move compress_stream and compress_file prototypes to...
	* compress.h: ...here.  New file.
	* logs.c: Include compress.h.
	* logs.h: Add use_bzip2 global variable.
	* cfgparse.y (archive): Set file extension based on use_bzip2.
	* main.c: Declare use_bzip2 global variable.
	(main): Add -b to use bzip2 compression.
	* newsyslog.pod: Document -b and adjust documentation for file
	suffixes that can be either .gz or .bz2.
	* USAGE: Document -b.
	* configure.in: Check for libbz2.  Fix --enable-static comment for
	multiple compression libraries.
	* Makefile.in (SOURCES): Add compress.c and compress.h.
	(TAGS): Likewise.
	(TESTS): Add new bzip2 tests.
	* t/bzip2.conf: New file.
	* t/bzip2.t: New file.
	* t/TESTS: Add bzip2.

	* main.c (main): Add -c to only check the syntax of the
	configuration file.
	* newsyslog.pod: Document -c.
	* USAGE: Likewise.

	* CONFIG: Add an example of filter.

	* Makefile.in: Add newsyslog.pod to the distribution and remove
	newsyslog.8.in with make maintclean.

	* newsyslog.pod: New file.  Translate the documentation to POD,
	clarify in some places, add a reference to the program home page,
	and add documentation for the filter directive.
	* newsyslog.8.in: Deleted.  Now automatically generated from
	newsyslog.pod.
	* Makefile.in: Add rules to generate newsyslog.8 and
	newsyslog.8.in from newsyslog.pod.  Update dependencies.
	* configure.in: Remove newsyslog.8 from AC_OUTPUT.  The sysconfdir
	substitution is now handled by the makefile.

	* cfgtoken.l: Recognize the filter keyword.
	* cfgparse.y: Add support for filter.
	(merge): Also merge filter blocks.
	* file.c (compress_file): Break out the actual compression into...
	(compress_stream): ...here.  New function.
	* file.h: Prototype compress_stream.
	* process.c (open_pipe): New function.
	(close_pipe): New function.
	* process.h: Prototype open_pipe and close_pipe.
	* logs.c (filter_log): New function.
	(copy_log): Call filter_log if a filter is defined.
	(archive_logs): Likewise.
	* logs.h: Add a filter member to struct log.
	* t/filter.conf: Also test filter.
	* t/filter.t: Likewise

2002-04-20  Russ Allbery  <rra@stanford.edu>

	* VERSION: Version 1.1 released.

	* INSTALL: Update copyright, simplify the instructions by removing
	details that few people need to care about, and mention
	--enable-static.
	* README: Update copyright.

	* Makefile.in: List new files, beef up the warnings used with make
	warnings, and install into bindir by default instead of sbindir.

	* mkusage: Include utility.h in utility.c so that usage will have
	a prototype, to silence compiler warnings.

	* file.c: Remove old section headings.

	* error.c (error_log_syslog): Mark static.

	* t/basic.t: Clean up after the test suite finishes.

	* t/filter.t: New file.  Test suite for analyze.
	* t/filter: New file.
	* t/filter.conf: New file.
	* t/TESTS: Add filter.

	* cfgtoken.l: Add some prototypes to silence warnings, exclude
	quoted strings from the definition of WORD, and recognize the
	analyze keyword.
	* cfgparse.y: Add support for analyze.
	(merge): Also merge analyze blocks.  Use explicit comparisons with
	NULL rather than implicit ones.
	* logs.c (analyze_log): New function.
	* logs.h: Add analyze to struct log, allow struct command to form
	a linked list, and prototype analyze_log.
	* process.c (run): Take a second argument specifying the file to
	use as input to the process.
	* process.h: Update run prototype accordingly.
	* main.c (process): Pass the additional argument to run.
	(main): Run analyze_log where appropriate.
	* CONFIG: Add an example of an analyze directive.
	* newsyslog.8.in: Add documentation of the analyze directive and
	update the copyright notice.

	* configure.in: Add --enable-static to link against the static
	version of zlib.

	* Makefile.in (clean): Remove version.c and usage.c.

	* file.c (rename_unique): Use snprintf instead of sprintf.
	(shuffle_files): Likewise.

2002-04-09  Russ Allbery  <rra@stanford.edu>

	* t/runtests.c: Add a definition of WCOREDUMP for platforms that
	don't have it.

	* t/basic.conf: Give a path for command in case the current
	directory isn't in the path.

2002-04-08  Russ Allbery  <rra@stanford.edu>

	* VERSION: Version 1.0 released.

	* Makefile.in: Redo the make dist rule to include the test suite
	and to get the version number from VERSION.  Update the lists of
	files to reflect the current contents of the package and add a
	list of test suite files.
	* mkversion: New file.
	* version.c: Removed.

2002-04-04  Russ Allbery  <rra@stanford.edu>

	* depend: Removed, replaced by...
	* mkdepend: New file, new dependency generation method.

	* configure.in: Remove a ton of extraneous comments and tests that
	we don't actually use, stop using stamp-h.in, and check for
	snprintf using the macro defined...
	* aclocal.m4: ...here.  New file.

	* t/TESTS: New file.  Initial test suite.
	* t/basic.conf: New file.
	* t/basic.t: New file.
	* t/command: New file.
	* t/runtests.c: New file.

	* Makefile.in: Style fixes.  Add CPPFLAGS.  Migrate the dependency
	tracking to the new mkdepend script.  Add a new make check target.
	Generate usage.c from USAGE.  Clean up after the test suite as
	well.  Remove all the makefile rules to rebuild autoconf stuff; we
	only want to do that by hand.  Add a make warnings target.

	* utility.c: Removed, split into...
	* error.c: New file.
	* xmalloc.c: New file.
	* snprintf.c: Added for the use of the error handling functions.
	* utility.h: Updated prototypes for the new error handling and
	malloc functions, and added handling of GCC attributes.  Added a
	prototype for usage.

	* USAGE: New file containing usage information.
	* mkusage: Generate usage function from USAGE.

	* main.c: Coding style fixes and constification.  Call the new
	usage function rather than including usage information.

	* cfgparse.y: Coding style fixes and constification.
	* cfgtoken.l: Likewise.
	* expand.c: Likewise.
	* expand.h: Likewise.
	* file.c: Likewise.
	* file.h: Likewise.
	* logs.c: Likewise.
	* logs.h: Likewise.
	* process.c: Likewise.
	* process.h: Likewise.

	* acconfig.h: Remove extraneous headers and comments.

1999-06-07  Russ Allbery  <rra@stanford.edu>

	* version.c: Version 0.7 released.

	* newsyslog.8.in: Clarify the rules for variable names.

1999-05-27  Russ Allbery  <rra@stanford.edu>

	* cfgparse.y (merge): Avoid segfault while merging an empty block.
	(read_config): Empty configuration file isn't a fatal error.

1999-04-22  Russ Allbery  <rra@stanford.edu>

	* depend: If the compiler isn't gcc, print an error and touch the
	dependency file anyway so that compilation can continue.

	* newsyslog.8.in: Noted the block name isn't used, added a license
	section.

	* INSTALL: Removed the note about editing config.h, modified the
	instructions to account for the fact newsyslog is installed in
	sbin, added a note about setting sysconfdir.

	* README: Reworked the introduction, added a requirements section,
	stripped out the documentation since it's now in the man page, and
	changed the license to be an MIT-style one.

	* CONFIG: Updated to look like the current auth server
	newsyslog.conf, but with more comments and a cleaner variable
	naming scheme.

	* depend: Generate a separate dependency line for the .d file that
	excludes config.h so that dependencies aren't rebuilt after
	running configure, added comments.

	* Makefile.in: Added TAGS and tags targets and a list of files to
	construct tags from; added TAGS, dependency files, and the man
	page source file to the distribution; added a .PHONY rule listing
	all the non-file-generating targets; remove the man page on make
	distclean; remove the tags file on make maintclean; and use cp -p
	to create the distribution files.

	* logs.c (archive_logs): Restructured a little to print out all of
	the file names to which an old log has been archived.

1999-04-21  Russ Allbery  <rra@stanford.edu>

	* logs.c (archive_logs): Fixed notice of archiving old log to not
	have an extra blank line, added what file name the log was
	archived as.

	* Makefile.in: Add newsyslog.8 to all target, install the man
	page, add rule for rebuliding the man page using config.status.
	* configure.in: Generate newsyslog.8 from newsyslog.8.in.
	* newsyslog.8.in: New file.

1999-04-19  Russ Allbery  <rra@stanford.edu>

	* logs.c (find_logs): Fixed pointer comparison in assert to avoid
	warnings on 64-bit machines.
	(archive_logs): Dropped old unused argument to a warn.

	* main.c (main): Fixed test for too many command line arguments.

	* file.h: Include config.h for typedef portability.
	* logs.h: Likewise.

	* configure.in: Require zlib, remove check for gzip and compress,
	comment out checks for functions and headers whose results aren't
	used in the source.

	* acconfig.h: Changed protective define, took out CONFIG_FILE
	section as that's now handled by Makefile.in.

	* Makefile.in: Added $(sysconfdir) and $(CONFIG) as the -D flag
	setting CONFIG_FILE relative to $(sysconfdir) only when building
	main.c (taking it out of acconfig.h and allowing configure to
	handle it).  Added version.c to the list of sources, cleaned up
	the list of supporting files.  Ripped out the old dependency file
	scheme in favor of .d files for each .c file.
	* depend: New file.

	* process.c: Include config.h for pid_t portability.

	* main.c (usage): New function.
	(main): Add rudimentary option parsing to recognize -h and -v,
	picking up the version string from version.c, and print a usage
	message for unknown options.

	* version.c: New file.

1999-04-16  Russ Allbery  <rra@stanford.edu>

	* cfgparse.y: Reformatted, added tons of comments including an
	overview of the configuration file syntax and how it's parsed.

1999-04-15  Russ Allbery  <rra@stanford.edu>

	* expand.h: Changed protective #define.
	* process.h: Changed protective #define.

	* expand.c: Reformatted.

	* process.c: Reformatted.
	(hup): Changed warning text, fixed core dump when verification of
	the process after a HUP fails.

1999-04-14  Russ Allbery  <rra@stanford.edu>

	* Makefile.in (SRCS): Added logs.c.

	* cfgparse.y: Fixed a buffer overwrite in building command
	structs, started to reformat some of the C code.

	* cfgtoken.l: Rename all of the states to all-caps names starting
	with S_ to work around the problem on HP-UX with the lowercase
	state names.  Removed the include previously needed on HP-UX,
	reformatted.

	* file.h: Adjust for function renamings, remove overwrite_log and
	archive_log prototypes, add create_directory prototype, changed
	protective #define.

	* file.c (rename_unique): Renamed from rename_log.
	(shuffle_files): Renamed from shuffle_log, streamlined some of the
	logic.
	(copy): Renamed from copy_log, streamlined some error handling.
	(overwrite_log): Removed.
	(archive_log): Removed.
	(create_file): Renamed from create_log.
	(create_directory): Made non-static.
	(compress_file): Renamed from compress_log, streamlined some error
	handling.

	* main.c: Reformatted, comments clarified.
	(main): Moved log archiving logic into logs.c archive_logs and
	copy_log.

	* logs.h: Reformatted, added archive_logs and copy_log from
	logs.c, changed protective #define.

	* utility.h: Include config.h for portable size_t, change
	protective #define.

	* utility.c: Include config.h for portable size_t, reformatted,
	comments streamlined.

	* logs.c: New file.

1998-08-08  Russ Allbery  <rra@stanford.edu>

	* cfgtoken.l: Added an early #include of stdlib.h to avoid
	problems on HP-UX.

1998-07-04  Russ Allbery  <rra@stanford.edu>

	* main.c: Version 0.6 released.

	* file.c (create_directory): Don't print an error message if
	mkdir fails because the directory already exists.

	* configure.in: Don't need to explicitly list in AC_SUBST the
	variables that configure always exports.

	* Makefile.in: Added rules for making the lexer and parser, added
	defines for LEX and YACC, switched to installing in sbin, changed
	the lists of sources and headers and the maintclean target for the
	new files.

	* utility.c (xrealloc): New function.
	* utility.h: Added xrealloc.

	* main.c (main): We no longer attempt to free everything, which
	makes our life considerably easier.  We also have to do the
	expansion of archive names ourselves now.
	(process): Renamed, don't free everything.

	* expand.c (expand): Added %D, %M, and %Y for parts of the date,
	simplified the date parsing, allowed one to pass in 0 as the time
	to indicate that the current time should be used.
	(build_date): Removed, no longer needed.

	* expand.h: Added documentation of the new % escapes.

	* logs.h: Renamed from cfgfile.h, added space to store the
	original template in an archive struct, made a separate struct for
	holding commands and renamed the old command struct to process,
	renamed archives to archive in the log struct.

	* cfgfile.c: Deleted.  Replaced with the new parser.
	* cfgtoken.l: New file.	 The new configuration file lexer.
	* cfgparse.y: New file.	 This is the new configuration file
	parsing code, completely rewritten from cfgfile.c.

1998-02-02  Russ Allbery  <rra@stanford.edu>

	* process.c (run): If we fork and then fail to exec, die rather
	than warn in the child.

1997-12-29  Russ Allbery  <rra@stanford.edu>

	* main.c: Version 0.5 released.
	
	* file.c (create_directory): New function to create the trailing
	directory in a path.
	(archive_log): Use it.
	(overwrite_log): Use it.

1997-12-11  Russ Allbery  <rra@stanford.edu>

	* main.c: Version 0.4 released.

	* Makefile.in (MISC): Added TODO to the list of files to include
	in the distribution.

	* cfgfile.c (parse_command): Reworked the realloc call; the
	previous version was horribly wrong if realloc had to move the
	memory block.

1997-10-31  Russ Allbery  <rra@stanford.edu>

	* cfgfile.c, file.c: Initialized several variables to NULL or 0
	and added several casts to make compiler warnings be quiet on
	Linux.

	* main.c: Version 0.3 released.

	* main.c (main): Tweaked the main loop to allow for logs that
	aren't rotated and to call overwrite_log when appropriate.

	* file.c (overwrite_log): New function to copy a log into an
	archive location, overwriting the existing file if it exists.
	* file.h: Added prototype.

	* cfgfile.h: Added a flag to a log struct saying whether the log
	should be rotated.

	* cfgfile.c (parse_name): New function to parse a log name from
	the input stream.
	(parse_log): Modified to use parse_name and initialize the
	rotate flag.
	(parse_archive): Modified to use parse_name and set the rotate
	flag.
	(parse_copy): New function to read copy: directives.
	(read_class): Call parse_copy for copy: directives.

	* main.c: Version 0.2 released.

	* Makefile.in (newsyslog-$(VERSION).tar.gz): Tweaked this rule
	slightly to improve the way make dist works.

	* main.c (main): We now take an optional path to a configuration
	file on the command line.
	(main): Made the necessary modifications to handle the change of
	field names in cfgfile.h and to support multiple archive paths and
	shuffling of saved log file names.

	* expand.c: Added preprocessor directives to ensure that
	MAXHOSTNAMELEN is set rather than trying to get it from config.h).

	* cfgfile.h: Added an archive struct to store an archive path and
	the number of logs to save in that path, renamed the rotate struct
	to a log struct, changed the names of a few of the fields from
	name to path and split the name of a log from its path
	information.

	* cfgfile.c (parse_user): New function to convert a word into a
	UID.
	(parse_group): New function to convert a word into a GID.
	(parse_log): New function to read a log: directive and save its
	associated information.	 This is very, very similar to the old
	parse_rotate function because the old functionality of a rotate:
	directive has been split across the log: directive and the
	archive: directive.
	(parse_archive): New function to read an archive: directive.
	(read_class): Call the new parse_log and parse_archive
	functions for the corresponding directives.

	* file.h: Added declaration for shuffle_log, changed move_log
	to archive_log.

	* file.c (shuffle_log): New function.  Rotates the numbering of
	saved logs, deleting the highest numbered one.
	(archive_log): Renamed from move_log and deletion of the source
	log removed.
	(compress_log): Be sure to close files in the event of an error.

1997-07-11  Russ Allbery  <rra@stanford.edu>

	* configure.in: Added AC_AIX to check for AIX and define
	_ALL_SOURCE if necessary.

	* cfgfile.c: Added a check for AIX to include strings.h, needed
	for strcasecmp prototypes under AIX.

	* file.c (compress_log): Removed unused variables.
	(rename_log): Added a cast to unsigned long to kill a warning on
	Digital UNIX.
	(copy_log): Made sure that fopens were being done in binary
	mode, for probably no particularly good reason.

1997-07-10  Russ Allbery  <rra@stanford.edu>

	* cfgfile.c (parse_rotate): Changed to use strtol instead of
	sscanf to extract the owner, group, and permissions.	This was
	necessary to avoid warnings under -Wall on Linux and also allows
	some slightly clearer code.

1997-07-09  Russ Allbery  <rra@stanford.edu>

	* cfgfile.c: Make sure that each rotation is added to the end of
	the linked list of rotations, and make sure that all pointers in
	created structures are initialized to NULL to avoid errors down
	the road.

	* main.c: It's no longer necessary to explicitly compress.

	* file.h: compress_log now does a move of the file and
	compresses on the fly, and move_log always compresses.

	* file.c: Modified the copy_log function to chmod the
	destination file to have the same permissions as the original and
	to fix a bug in checking that the size is correct.  Reworked
	compress_log to actually do the copy and use zlib to compress on
	the fly and the changed move_log so that it would actually use
	compress_log rather than copy_log.
