GNATS ChangeLog record for gnats version 3 (roughly 1993-1999).


1999-07-12  Jason Molenda  (jsm@bugshack.cygnus.com)

	* mkdist.sh (SAVEOPTS): Set appropriately if only one command
	line option is being passed to the script.

1999-04-15  Kenneth H. Cox  <kenstir@senteinc.com>

	* Makefile.in: Fixed bug in 'gnats-edit-pr' target; xGNATS_SERVERx
	was not being substituted.

1999-04-11  Paul Traina	<pst@juniper.net>
	* Makefile.in, version.texi: Bumped version number to 3.110
	* Makefile.in, bring back INSTALL_SCRIPT since top-level Makefile
	  is a mess.
	* BETA: Described what's new in 3.110
	* NEWS: removed, obsolete

1999-03-17  Rick Macdonald  <rickm@vsl.com>

	* index.c: free_index(): removed the free of index_filename,
	(actually moved it to GNATS_chdb()) because modify_pr() calls
 	free_index with an index other than index_chain. This broke a few
 	things.

	* cmds.c: GNATS_chdb(): added free of index_filename (actually
 	moved from free_index()).

	* edit.c: modify_pr(): set the global index_chain to the newly
 	built index to reflect any changes (especially a changed
 	category).

1999-03-15  Kenneth Cox	<kenstir@senteinc.com>
	* gnats-edit-pr.sh: nedit-pr incorrectly tried to connect to
	gnatsd on the local host.  Default GNATS_HOST to GNATS_SERVER
	if present.

1999-03-03  Paul Traina  <pst@juniper.net>

	* file-pr.c, pr.c, edit.c: portability -- convert strftime %e
	and %T arguments to %d and %H:%M:%S for POSIX (and OpenStep).
	(suggested by Carl Lindberg <lindberg@blacksmith.com>)

	* cmds.c, internal.c: When the UNDB command is issued, we sent
	back two response codes if the database was already unlocked.
	Handle all the responses directly in unlock_db (which isn't
	really where this should be, but that's easier than changing
	the semantics.  IMHO, unlock_db() should *not* be responsible
	for sending output to the daemon. :-( ). (reported by lindberg)

1999-02-26  Paul Traina  <pst@juniper.net>

	* file-pr.c: Accept subject lines of the form "pr: <number>" too
	since people seem to make that mistake a lot

	* gen-index.c: malformed line -> malformed category line

	* check-db.sh: Bring it in from the contrib area, clean it up.

	* delete-pr.sh: Change index delimiter from ':' to '|' to match
	new format, fix several bugs, and include it in the regular
	distribution, removing it from the contrib area.

	* Makefile.in: fix missing regex entry, remove obsolete DISTFILES
	macro, remove INSTALL_SCRIPT favor of INSTALL_PROGRAM, install
	file-pr setuid gnats, add support for check-db and delete-pr

Thu Nov 18 22:46:12 1998  Rick Macdonald  <rickm@timshel>

        * version.c, version.texi, Makefile.in: set to version 3.108.

	* Makefile.in: added new program npr-addr.
	
	* PROBLEMS: removed bugs that are now fixed. Added another note
 	about gnats.el needing more work. Added more words about how hosed
 	doret/ret is.
	
	* client.c: get_reply(): changed CODE_INVALID_STATE to
 	CODE_INVALID_ENUM and changed for general enum errors.
  	read_server() now un-escapes dots. New function
 	client_init_gnats(). client_chdb() now uses global gnats_root
 	instead of passed arg.

	* cmds.c: deleted daemon_lock_pr() and daemon_pr() and put code
 	directly into the one calling function, GNATS_lock().  Moved
 	lookup_pr_path() to index.c for more general use. Changed
 	GNATS_edit() to never unlock the PR. Improved various return
 	messages. General cleanup of LOCK, UNLK and EDIT functions. New
 	gnatsd command CHEK that calls new function GNATS_chek() to allow
 	the daemon to check PR fields instead of duplicating the
 	functionality in the client (npr-edit). Moved printing of PR text
 	from GNATS_lock() to lock_pr() so pr-edit would have same
 	behaviour as npr-edit and gnatsd (lock retrieves PR text).
  	get_text() now un-escapes dots. Removed call to configure from
 	GNATS_chdb since it's now in init_gnats().

	* contrib/check-db.sh: updated for new locks directory.
	
	* db_conf.c: local_chdb(): now uses global gnats_root instead of
 	passed arg, and returns if gnats_root is null.
	
	* db_conf.c: modified prototype for local_chdb.
	
	* edit.c: changed get_path() to get_lock_path(), changed it to use
 	new lock location, and moved it to internal.c. lock_pr() now
 	prints PR text so pr-edit has same behaviour as npr-edit and
 	gnatsd (lock retrieves PR text). lock_pr() now properly sends
 	"\r\n.\r\n" to terminate the PR text sent (like query FULL
 	does). General cleanup of lock_pr(), unlock_pr() and
 	get_lock_path(). modify_pr() changed to use new lock
 	location. Fixed check_pr() to handle all fields properly for the
 	case of is_daemon (gnatsd).

	* edit-pr.sh: replaced with a simple stub to call the new script
 	gnats-edit-pr.sh.

	* files.c: new function get_responsible_addr() for pr-addr and
 	gnatsd.

	* gen-closed-date.c: Replaced
 	configure()/init_gnats()/local_chdb() calls with new init_gnats().

	* gen-index.c: change return type of entry_cmp to int. Replaced
 	configure()/init_gnats()/local_chdb() calls with new init_gnats().

	* getclose.c: Replaced configure()/init_gnats()/local_chdb() calls
 	with new init_gnats().

	* globals.h: new prototype for get_responsible_addr().
	
	* gnatsd.c: Replaced configure()/init_gnats()/local_chdb() calls
 	with new init_gnats().

	* gnats.h: added prototype for lookup_pr_path(), GNATS_chek(). 
	Changed prototype for init_gnats().

	* gnats.el-in: gnats::finish-filing: npr-edit (gnatsd) no longer
 	unlocks PRs when updating, so the gnats:::pr-locked variable is no
 	longer unset for the network case. gnats::handle-pr-edit:
 	temporary hack to erase the gnats-error buffer after locking
 	because pr-edit now returns the full PR text like npr-edit
 	does. For now the code still operates the old way of reading the
 	PR file directly. Added new network program npr-addr to
 	gnats::real-pr-addr.
	
	* gnats-edit-pr.sh: new script to do the task of both edit-pr and
 	nedit-pr (both local and network editing). Removed direct access
 	to any GNATS files. Ignores any category supplied with the PR
 	number.  All /tmp files are cleaned up. Properly saves aborted
 	edits to "$new.changed". Added unlock command now that gnatsd no
 	longer unlocks the PR. Removed gnats-bin from PATH. Separate dual
 	usage of GNATS_ROOT to GNATS_DB for --directory arg. Error fixing
 	loop (to re-enter the editor) now works for both local and network
 	editing. Calls pr-addr or npr-addr as required.

	* index.c: moved get_category() from query.c and lookup_pr_path()
 	from cmds.c here for more general use. lookup_pr_path() modified
 	to ignore any given category and use only the PR number.
	
	* internal.c: moved get_lock_path from edit.c so file-pr could use
 	it. New functions get_prid_from_path() and
 	get_cat_prid_from_path().

	* lists.c: fixed \n vs \r\n when printing lists.
	
	* main.c: call get_lock_path() to get PR lock pathname. Replaced
 	configure()/init_gnats()/local_chdb() calls with new init_gnats().
	
	* misc.c (init_gnats): added calls to configure() and local_chdb()
 	and reordered calls.
	
	* nedit-pr.sh: replaced with a simple stub to call the new script
 	gnats-edit-pr.sh.

	* npr-edit.c: CHECK now calls daemon CHEK for check_pr
 	function. Replaced client_init()/client_chdb()/client_user() calls
 	with new client_init_gnats(). net_check_pr() now calls
 	init_pr()/init_header()/init_network() instead of init_gnats().
	Added missing --prt option to Usage print.

	* nquery-pr.c: Replaced client_init()/client_chdb()/client_user()
 	calls with new client_init_gnats().

	* pcodes.h: changed CODE_INVALID_STATE to CODE_INVALID_ENUM.

	* pr.c: check_enum_types(): don't put newlines in msgs if
 	is_daemon. New function write_multitext() to escape single dots
	in multitext fields when writing to the network. Also, each line
	is sent terminated with "\r\n" when appropriate (a local "ret"
	variable is used).
	
	* pr-addr: added -d|--directory arg; now supports multiple
 	databases. Moved internal code to files.c to share with gnatsd
	for network version npr-addr.
	
	* pr-age: modified to call lookup_pr_path instead of
 	get_category. Replaced configure()/init_gnats()/local_chdb() calls
 	with new init_gnats().

	* pr-edit.c: LOCK and UNLOCK edit options now call lookup_pr_path
 	first. pr-edit no longer locks the entire database when locking a
 	single PR for edit (LOCK) since gnatsd doesn't. Replaced
 	configure()/init_gnats()/local_chdb() calls with new init_gnats().

	* pr-stat: modified to call lookup_pr_path instead of
 	get_category. Replaced configure()/init_gnats()/local_chdb() calls
 	with new init_gnats().

	* pr-mail: added args for multi-database and user access control:
 	-d|--directory, --v|user, -w|--passwd, plus missing network args
 	-H|--host, -P|--port.
	
	* query-pr.c: Replaced configure()/init_gnats()/local_chdb() calls
 	with new init_gnats().

	* queue.c: Replaced configure()/init_gnats()/local_chdb() calls
 	with new init_gnats().

	* sub-type-pr.c: Replaced client_init()/client_chdb()/client_user()
 	calls with new client_init_gnats().

Wed Nov  4 20:37:33 1998  Rick Macdonald  <rickm@vsl.com>

	* cmds.c: GNATS_chdb: fixed to set user access to the host default
 	for the new db, not the previous one.

	* gnatsd.c: Changed the access level from "view" to unrestricted
 	for the HELP and DBLA commands. The DBLS command was changed from
	"view" to "admin".
	
Mon Nov  2 16:57:50 1998  Rick Macdonald  <rickm@vsl.com>

	* Makefile.in: nedit-pr.sh target needed to set GNATS_SERVER_PORT.

	* nedit-pr.sh: removed the unused variables bindir and query_pr.
	Changed GNATS_USER and GNATS_PASSWD variables to EDIT_USER and
	EDIT_PASSWD (they were set one way but used the other way, causing
	the command line args to be ignored). Changed "oldstate-newstate"
	to "oldstate->newstate" as discussed on mailing list. This was
	previously done for edit-pr but nedit-pr got missed.
	
	* gnatsd.c: (match): added 3rd argument to flag case sensitive
 	match. Now matches to end of both stings, such that "abcd" no
 	longer matches "abcde". Use "abcd*" or "abcd?". A null string in
 	the gnatsd config (gnatsd.conf, gnatsd.access) is still assumed to
 	be "*").

	* gnatsd.c: improved syslog messages for host and user access
 	denied messages.
	
	* cmds.c: improved syslog messages for host and user access
 	denied messages.

Mon Oct 19 16:33:46 1998  Rick Macdonald  <rickm@vsl.com>

	* INSTALL: added mention of some newish files: states,
	classes, addresses and gnatsd.access.
	
	* MANIFEST: added files gnatsd.access, gnatsd.conf, 
 	gnats-db.conf and UPGRADING.

	* Makefile.in (VERSION): up to 3.107.  Install empty gnatsd.access
 	file to gnats-adm and chown.chmod to gnats/600.

	* PROBLEMS: added mention of 6 things not done for gnats.el.

	* README: changed the gnats mailing list to bug-gnats@gnu.org.
	
	* TODO: added mention of three programs that could be rewitten to
 	use dates from the expanded index instead of parsing the
 	Audit-Trail and other fields.

	* TAGS: replaced with an updated tags file that includes gnats.el
 	functions.

	* UPGRADING: new file with quickstart instructions for upgrading
 	to gnats-3.107.
	
	* client.c: added new function client_user() to send userid and
 	password to gnatsd.

	* cmds.c: Cleaned up the qualify and pr_matches functions to use
 	expanded index. Added SQL2 query format, like SQLF but without
 	padded blanks.  Added GNATS_user function. Modified GNATS_chdb to
 	only accept database aliases.  Fixed GNATS_chdb "doret" setting
 	when changing databases. Fixed problems with GNATS_rset.

	* config.h: added define for STR_MAXLONG as 512, needed for
 	reading and handing expanded index entries. Added DB_ACCESS_FILE
 	and GLOBAL_ACCESS_FILE.

	* db_conf.c: local_chdb: changed to abort (exit) if errors occur
 	looking up database entries. Otherwise, a program such as mkcat
 	would operate on the wrong database.

	* edit-pr.sh: removed the -v argument. Surely -V and --version is
 	good enough.  Changed index separator character from : to |.
  	Redirected stderr to stdout so that the error handling and re-edit
 	option would work as intended.

	* edit.c: Fixed various problems with date handling.

	* file-pr.c: Update the Last-Modified date in the index when email
 	is appended to the Audit-Trail.

	* gen-closed-date: Added call to local_chdb for multiple database
 	support.

	* gen-index.c: Increased length of line variable to handle
 	expanded index.

	* getdate.y: Y2K fixes. GNATS should now be Y2K compliant.  Added
 	cest and ces timezones for Central Europe Summer.

	* gnats-db.conf: added sample file (doesn't get installed).

	* gnats.el: Added support for multiple databases: variables
 	gnats:::types, gnats:alias. Added support for user/passwd
 	authentication: variables gnats:userid, gnats:password. There
	is still more work to be done: see the PROBLEMS file.

	* gnats.h: added prototypes.

	* gnats.texi: added new node: Controlling User Access, describing
 	access levels.

	* gnatsd.access: New sample access file; gets installed to
 	gnats-db/gnats-adm.

	* gnatsd.c: added user/passwd authentication and host/user access
 	levels. New arg: -r|require-db insists first cmd sent to gnatsd is
 	CHDB. Reworked getopt_long entries to support access levels. Added
 	FLAG_ONE_ARG flag to SYNP to allow spaces in Synopsis queries.
  	New function set_confidential_access to handle the difference
 	between view and viewconf access. New functions access_level,
 	access_level_str and get_user_access for access level
 	support. Upgraded the "allowed" function to support IP addresses
 	and a host default access level in the gnatsd.conf file. Reordered
 	code to delay reading the gnats index until determining if the
 	first command is CHDB to avoid reading in the default index
 	unnecessarily).

	* gnatsd.conf: added instructions for new access level feature.

	* gnatsd.h: new prototypes. Bit masks for access level control of
 	gnatsd commands.

	* index.c: support for expanded index. All fields excpet multitext
 	are now in the index. Changed the index separator from : to |.
  	*** compatibility issue ***

	* internal.c: support for expanded index.

	* mail-query.sh: reordered args passed to query-pr: moved
 	GNATS_ROOT and newly added /etc/aliases args ($*) to come after
 	the email senders args so they can't override GNATS_ROOT or
 	--directory. --directory="$GNATS_ROOT" is somewhat redundant now
 	because the database alias should be given in the mail alias file
 	for total control.

	* nedit-pr.sh: Redirected stderr to stdout so that the error
 	handling and re-edit option would work as intended. Added
 	-v|--user, -w|--passwd args.

	* npr-edit.c: Added -v|--user, -w|--passwd args. Added missing
 	call to client_chdb for multiple database support.

	* nquery-pr.c: Added -v|--user, -w|--passwd args. Changed for
 	expanded index support. Added new -I|--sql2 query format.

	* p-admin.texi: changed description of the index file to match
	the new expanded index.

	* p-inst.texi: added mention of some newish files: states,
       	classes, addresses and gnatsd.access. More work is required to
 	update this file.
	
	* p-usage.texi: removed warnings about slow query performance to
 	reflect the improved performance of the new expanded index. Added
 	the -I|--sql2 query output format. More work is required to
 	update this file.
	
	* pr.c: added expanded index support. Changed LAST_MODIFIED
 	datatype from Text to Date.

	* pr.h: added expanded index support.

	* query-pr.c: added expanded index support. Added SQL2 query
 	format.

	* query.c: added expanded index support. Added SQL2 query
 	format. Added seconds to sql time format output. Reworked
 	do_query, pr_matches, query, do_pr functions to simplify. All
 	matching is now done in pr_matches. PR files are only opened when
 	necessary: multitext search or full format query output. The end
 	dot (".") sent after full PR output is now properly preceeded by
 	"\r\n" from gnatsd. This only affects front-ends written with
 	direct socket communication to gnatsd. 
	*** compatibility issues ***

	* query.h: various globals and prototypes for sql2 format and user
 	access control.

	* queue-pr: added missing support for multiple databases.

	* sub-type.c: added -v|--user, -w|--passwd args. Fixed Usage
 	print.

	* version.c: changed to 3.107.

	* version.texi: changed to 3.107.
	
Mon Oct 12 20:42:52 1998  Rick Macdonald  <rickm@vsl.com>

	* client.c: Fixed client_chdb() to just return if it's
	passed a null string for new_root.

	* cmds.c: GNATS_chdb() - removed fatal exit when the index file
 	can't be read. Front-ends need to get information from GNATS in
 	order to submit the very first PR even though there is no index
 	file yet.
	
	* at-pr.sh: Removed the tag "function" from the get_default_state
	declaration. This is optional in bash and invalid in sh. This
	fix came from Paul Triana <pst@juniper.net>.

Wed Jul 29 16:04:03 1998  Rick Macdonald  <rickm@vsl.com>

	* Makefile.in: when you follow the install instructions and run
 	"make install" as root, "mkcat" later fails because root owns the
 	files and directories that mkcat needs to write. I added a chown
 	to GNATS_USER of the DATADIR/gnats directory.

	* Makefile.in: added GNATS_USER to GNATS_VARS for the send-pr
 	Makefile, where it is needed to chmod the gnats/dist directory for
 	mkcat to write to.

	* Makefile.in: the Makefile was checking only for the existance of
 	an installed categories file before assuming that it was OK to
 	install the categories, responsible, submitters and gnatsd.conf
 	files. There is now a separate check for _each_ of these files.

	* send-pr/Makefile.in: when you follow the install instructions
 	and run "make install" as root, "mkcat" later fails because root
 	owns the files and directories that mkcat needs to write. I added
 	a chown to GNATS_USER of the gnats/dist directory.
	
	* query-pr.c: removed fatal exit when the index file can't be
 	read. Front-ends need to get information from GNATS in order to
 	submit the very first PR even though there is no index file yet.

	* gnatsd.c: same as query-pr.c.

	* index.c: same as query-pr.c.

Fri Jul 24 13:01:34 1998  Rick Macdonald  <rickm@vsl.com>

	* Makefile.in: added target for new gen-closed-date program.

	* gnatsd.c: added missing commands MBFR and MAFT for modified
 	before/after.

	* gnatsd.c: added new commands CBFR, CAFT and LCFG for closed
 	before/after, and list config.

	* gnatsd.h: added prototypes for GNATS_mbfr, GNATS_maft,
        GNATS_cbfr, GNATS_caft, GNATS_lcfg.

	* query.h: - referenced globals for closed_before and closed_after.

	* query.c: added closed before/after support to do_pr_internal().
  	Fixed do_pr_internal bugs when a date field was missing from PR
        (Segmentation fault).  Added LAST_MODIFIED and CLOSED_DATE to SQL
 	output format.  added CLOSED_DATE to the default output format.

	* qvariable.c: added globals for closed_before and closed_after.

	* query-pr.c: added queries for closed before/after:
	[-z | --closed-before] [-Z | --closed-after].  Added query for
 	list config: [-G | --list-config].  Fixed bug in error checking of
 	arrived before/after and modified before/after.

	* nquery-pr.c: added queries for closed before/after:
	[-z | --closed-before] [-Z | --closed-after].  Added query for
 	list config: [-G | --list-config].  Added missing args:
 	-a/-b/-B/-M.

	* pr.h: added CLOSED_DATE to pr fields.
	Remove state.final_value member.

	* pr.c: added CLOSED_DATE to pr fields.
	Remove state.final_value member.
        Change customizable states  to use new functions init_states(),
        get_state_enum_field().
        Change customizable classes to use new functions init_classes(),
        get_class_enum_field().

	* edit.c: added support to set Closed-Date.

	* lists.c: added support for list-config.
        list-classes lists class_chain instead of re-reading external file.
        list-states  lists state_chain instead of re-reading external file.

	* config.h: added config file name for list-config.

	* p-usage.texi: reversed -M and -B to match actual code and
 	descriptions. Added -z|--closed-before, -Z|--closed-after,
 	-G|--list-config, -A|--release, -o|--outfile -x|--skip-closed
 	-J|--list-classes, to query-pr usage. Added new fields Closed-Date
 	and Release-Note to various parts. Added Last-Modified and
 	Closed-Date to the query output descriptions.

	* cmds.c: Fixed RSET command for arrived/modified/closed
 	before/after.  Added commands GNATS_mbfr, GNATS_maft, GNATS_cbfr,
 	GNATS_caft and GNATS_lcfg.  Added several missing commands to HELP
 	(lock, unlk, edit, etc).  Changed VDATE to VDAT in HELP.

	* MANIFEST: added gen-closed-date.c

	* classes: added class type fields and descriptions.
	
	* states:  added state type fields and descriptions.

	* files.h: added Classes structure for classes file.  Added States
 	structure for states file.

	* files.c: added init_classes() and free_class(), global Classes *class_chain.
        Added check_class_type(), get_class_type(). 
        Added init_states() and free_state(), global States *state_chain.
        Added check_state_type(), get_state_type().
	Fixed memory overrun when too many fields are in the data given to
 	next_record(). EG, when a class or state description field
 	contains a colon.

	* globals.h: added init_classes() and free_class(), global Classes *class_chain.
        Added check_class_type(), get_class_type(). 
        Added init_states() and free_state(), global States *state_chain.
        Added check_state_type(), get_state_type().

	* query.c, query-pr.c, getclose.c, pr-stat.c, edit.c: replace
 	state.final_value with check_state_type().

Mon Jul 20 22:35:27 1998  Rick Macdonald <rickm@vsl.com>

	* query-pr.c: Added missing args to usage() for the
 	non-release-based case: -b, -a, -B, -M, --modified-before and
 	--modified-after were all missing. Also, a bracket was missing
 	from --list-classes.

Fri Jul 17 12:37:34 1998  Mike Sutton <Mike_Sutton@dayton.saic.com>

	* file-pr.c, npr-edit.c, pr.c: Compilation error fixes for
 	running on SunOS 4.1 using Sun's K&R C compiler.

Wed Jul 15 12:20:00 1998  Paul Traina  <pst@juniper.net>

	* edit-pr.sh: Change "oldstate-newstate" to "oldstate->newstate"
	as discussed on mailing list.

	* man/Makefile.in, man/gnats.man: Put the gnats general manual
	page in manual section 7, not "local".

Mon Jun 29 13:53:14 1998  Paul Traina  <pst@juniper.net>

	* pr.c: Change the ordering of states to match the original
	SQL numeric values in GNATS 3.104.

Sun Jun 28 12:05:54 1998  Paul Traina  <pst@juniper.net>

	* edit-pr.sh: Always run the date(1) command with language
	support set to the C default because the getdate() code is
	not multi-language aware.  (From FreeBSD)

	* gen-index.c (xxx): Fix gen-index's error reporting when it
	encounters empty files.  (Gen-index was reporting errors like
	gen-index: error reading pr /usr/local/share/gnats/gnats-db/pending/
	(From ??? someone on the mailing list (Karl?))

	* pr.c, pr.h: Add "Release-Note:" field for human readable comments
	about problems or fixes (suitable for incorporation into release
	notes for a given software release).

	* query.c (do_pr_internal): Remove useless backslashes.

	* query.c, Makefile.in, cmds.c, config.h, gnatsd.c, gnatsd.h,
	lists.c, nquery-pr.c, pr.c, query-pr.c, classes: Add support
	for user-defined classes, lifted from Karl's user-defined states
	code.
	
	* query.c: (enum_numeric) Clean up some of the grotty enumerated
	field-to-sql value code and make everything use the new routine.
	This should mean that future changes to enumerated fields don't
	need hacking here.  Functionality first, performance second.
	enum_numeric needs to be re-coded to be more efficient, it's
	a pig now.

	* query.c: Make SQL date output Y2K compliant by changing output
	to provide 4 digits of years (FLAG DAY!!!)

Wed Feb 11 07:43:30 EST 1998  Mike Sutton <mike_sutton@dayton.saic.com>
	
	* at-pr.sh: added support for -d option
	
	* client.c, gnats.h: added client_chdb routine.
	
	* db_conf.c, db_conf.h: added to support database changing,
 	  listing and alias listing.
	
	* mail-query.sh: Updated so that a previously set GNATS_ROOT
 	  environment variable is not ignored. Also added support for
 	  --directory=gnats_root.
	
	* misc.c (init_gnats): added initialization of database
 	  configuration.
	
	* Makefile.in: added support for db_conf.c compilation

	* cmds.c (GNATS_help): added GNATS_chdb, GNATS_dbls and GNATS_dbla
 	  command descriptions.

	* cmds.c: added GNATS_chdb, GNATS_dbls and GNATS_dbla
 	  commands changing and listing databases via gnatsd.

	* edit-pr.sh, mkdist.sh: Updated so that a previously set
 	  GNATS_ROOT environment variable is not ignored.

	* gen-index.c, getclose.c, npr-edit.c, nquery-pr.c, pr-age.c,
 	  pr-edit.c, pr-stat.c, query-pr.c: added support for
 	  --directory=gnats_root.

	* gnatsd.c (allowed): Made the gnats_root (aka database) an
	  argument to support access checking for DBLS and DBLA commands.

	* gnatsd.c (main): added a host access check (security fix) to
	  prevent access to databases when in --not-inetd mode.

	* gnatsd.c (main): added initialization and clean up for database
	  database aliases.

	* gnatsd.c, gnatsd.h: Added the CHDB (change database) command.

	* gnatsd.c: Added --help (-h) command line option.

	* main.c: Added support --directory=gnats_root.

	* nedit-pr.sh, npr-edit.c, nquery-pr.c: modified to support
	  multiple databases.

	* nedit-pr.sh: Updated so that a previously set GNATS_ROOT
 	  environment variable is not ignored. added --directory, --host
 	  and --port options.

	* sub-type.c: added support for --directory=gnats_root and --host.

	* gnats.texi: added node discussing multiple databases on one
	  host.

Thu Dec 18 15:54:28 1997  Karl Fogel  <kfogel@floss.red-bean.com>

	Changes to implement customizable PR states:

	* Makefile.in (DISTFILES): added `states' file.
	(install-gnats-arch-indep): install the `states' file to gnats-adm
	with everything else, if not already installed.
	(install-tools-arch-indep): fixed typo, so gnats.elc installs.

	* states: new admin file, old hardcoded states put in as
	defaults.

	* pr.c (get_pr_states): new func, reads states from an init file
	if possible, else returns what used to be hardcoded.
	(get_default_state, get_final_state): new funcs, retrieve first/last
	state from "this | kind | of | string".
	(init_pr): use above new funcs to init `enum_value',
	`default_value', and `final_value', in pr[STATE].

	* pr.h (PR_entry): new member char * `final_value'.  For states,
	holds the string which signifies a "closed" PR (this may or may
	not be the literal string "closed", depending on the last entry in
	the new gnats-adm/states file).  No other PR fields use
	`final_value' yet.

	* config.h (STATES): new #define, for `states' file in
	gnats_root/gnats_adm/.

	* getclose.c (do_prlist): use pr[STATE].final_value, instead of
	hardcoding "closed".

	* pr-stat.c (do_category): same as above.

	* query.c (pr_matches): same as above.
        (state_numeric): new func.
        (sql_type): use above new func for numeric value of a state.

	* pr-addr.c (is_daemon): Add definition to 0 (necessary for above
	changes to compile, don't even THINK of asking why).

	* at-pr.sh (STATES_FILE): new var, init according to $GNATS_ROOT.
	(OPEN_STATE): new var, use instead of hardcoded "open".
	(get_default_state): new function, use to above new var
	OPEN_STATE.  Defaults to "open".

	* p-admin.texi (Local configuration): add `states file' to menu.
	Update references everywhere for changes below:
	(states file): new node.
	(config file): replaces `config' node.
	(categories file): replaces `categories' node.
	(responsible file): replaces `responsible' node.
	(submitters file): replaces `submitters' node.
	(addresses file): replaces `addresses' node.
	
	* p-usage.texi (Reporting): note mapping of numbers to states may
 	not hold if administrator made custom states; explain meaning of
	"0".
	(Invoking query-pr): document "--list-*" options, including new
	"--list-states", and document their short versions as well.
	
	* gnats.texi (GNATS_ROOT): mention the new `states' file.
	(defaults): same.

	* query-pr.c (long_options): associate 'T' option with
	list-states.
	(main): handle 'T' option.
	(usage): include "--list-states" option.
	(query_pr): use pr[STATE].final_value, instead of hardcoding
	"closed".
	(print_pr): format state as a string not a number.
	(sql_types): don't handle states anymore -- the administrator now
	has too much flexibility with states for us to assume they're
	ordered.

	* nquery-pr.c (long_options): added "list-states" option ('T' is
	short option).
	(main): handle new 'T' option to get states, in getopt() and in
	switch-case.
	(usage): include "--list-states" option.
	(ask_about): add case for LIST_STATES.

	* query.h (LIST_STATES): new #define.

	* lists.c (get_gnats_file): add case for STATES.

	* cmds.c (GNATS_lsta): new func, gets states file.
	(GNATS_help): add help msg for "LSTA".
	(get_reply): handle CODE_INVALID_STATE, although currently no one
        sends it.

	* pcodes.h (CODE_INVALID_STATE): new code, unused but available
        for those who like that sort of thing.

	* gnatsd.h: declare new func GNATS_lsta().

	* gnatsd.c (cmds): added "LSTA"

	* gnats-el.in (gnats::states): new var.
	(gnats::default-states): new constant var, contains old hardcoded
	states as a fallback.
	(gnats::states-sans-descriptions): new func.
	(gnats::state-following): new func replaces var of same name.
	(gnats::fields): use above new funcs instead of hardcoding
	state names.
	Moved to end of file so everything it needs is defined before it
	gets set.
	(gnats::set-states): new func, passes new noerror arg to below.
	(gnats::get-list-from-file): take optional noerror arg.
	(gnats::get-alist): fix regexp to handle comments, blank lines.

Sun Dec  7 20:33:20 1997  Karl Fogel  <kfogel@floss.red-bean.com>

    	* file-pr.c (check_if_reply): don't file if category in Subject
        header is not a valid category (this helps prevent spurious
        matches, for example "Re: OS/2 release").

Fri Dec  5 14:18:16 1997  Karl Fogel  <kfogel@floss.red-bean.com>

	* file-pr.c (append_report): init `cc' and `subject' to have
	newlines, otherwise GNATS sends out mail with misformatted
	headers.
	(pr_number_from_path): new func.
	(append_report): use above new func instead of unreliable
	field_value(NUMBER) to determine pr number.

Fri Dec  5 13:43:20 1997  Karl Fogel  <kfogel@floss.red-bean.com>

	* files.c (free_responsible): if `alias' lives in borrowed space
	then don't try to free() it.

Sun Nov 30 21:05:29 1997  Karl Fogel  <kfogel@floss.red-bean.com>

	* Makefile.in (getdate.c): handle bisons that output
	FILENAME.tab.[ch] as well as those that output y.tab.[ch].

Tue Nov 24 16:00:00 1997  Abe Feldman  <feldman@cyclic.com>

	* file-pr.c: (gnats) If submitter ID is null or default, call
	defive_submitter.  (derive_submitter) New function, looks for
	end fragment of "From:" header in "addresses" file; returns
	submitter ID if found, othewise returns the default submitter
	* addresses: New file.  Meant to contain mappings between submitter
	IDs and incoming e-mail addresses.  Template contains format 
	instructions for entries.  Used by derive_submitter
	* Makefile.in: Install addresses file in gnats-adm
	* p-admin.texi: Documentation for new feature

Wed Oct 29 12:02:41 EST 1997  Mike Sutton <mike_sutton@dayton.saic.com>

	* file-pr.c:(reply_to_submitter) Changed the From and Reply-To
 	  lines to be gnats_admin from gnats_addr.  This is best compromise
	  for multiple databases.

	* file-pr.c:(notify_responsible) Changed gnats_user to gnats_admin
	  in Resent-From field.  Changed gnats_addr to gnats_admin
	  in Resent-Reply-To field. A good compromise for multiple
	  databases.

Mon Oct 27 09:42:10 EST 1997  Mike Sutton <mike_sutton@dayton.saic.com>

	* query.c: Removed a trailing backslash that the compiler
	  complained about.

Fri Oct 24 16:10:00 1997  Abe Feldman  <feldman@cyclic.com>

	* query-pr.c: (main) Look for new qualifiers -B, -M, --modified-before,
	--modified-after.  Enable -a, -b.  (usage) include usage notes on 
	-a, -b, -B, -M, --modified-before, --modified-after.
	* query.c: (do-pr-internal) Check for modified_before, 
	modified_after.  if either of these is non-zero, do date-compare
	between PR in question and given date.
	* query.h: New extern variables modified_before, modified_after.
	* qvariables.c: Initialize modified_before, modified_after
	* p-usage.texi: Notes on query-pr qualifiers --arrived-before,
	--arrived-after, --modified-before, modified-after.
	
Fri Oct 24 08:33:31 EDT 1997 Mike Sutton <mike_sutton@dayton.saic.com>

        * cmds.c: Corrected the print of db locked message when
          lock fails.

        * edit.c: Corrected the date checking of the date required
	  field.

Mon Oct  6 17:00:00 1997  Abe Feldman  <feldman@cyclic.com>

	* pr.c: (read_pr) Unformatted text new has a space at the beginning
	of each line, indicating that is is "quoted text".  If there is no
	"description" field, unformatted text is stored in pr[DESCRIPTION].

Fri Sep 26 16:00:00 1997  Abe Feldman  <feldman@cyclic.com>

	* file-pr.c: Changed log messages and "punt" function call
	  to mention default category
	* gnats.texi: added references to default category
	* p-admin.text: added description of how to set a default category

Sun Sep 21 21:20:00 1997  Abe Feldman  <feldman@cyclic.com>

	* config.c.in: Added call to CN_OPT to create default_category
	variable, to be read in from config file
	* gnats.h: added extern char *default_category
	* file-pr.c: (gnats) Changed from hard-coded "pending" default
	category to default_category variable
	* pr.c: Changed default value of category entry in PR data structure
	from PENDING constant to default_category variable string

1998-04-08  Brendan Kehoe  <brendan@cygnus.com>

	* pr-addr.c (main): Only accept r->alias as a possibility if it's
	a character we can use.  Specifically, not a space.

Mon Mar 23 18:14:02 1998  Eric Mumpower  <nocturne@cygnus.com>

	* client.c (client_init): Cache the return value from our
	effort to authenticate via kerberos, for possible use in
	error-reporting later.
	(remember_krb_auth_ret): global variable for simple cacheing
	(get_reply): Give more useful errors if access is denied and
	kerberos-authentication failed previously

	* gnats-el.in (gnats::handle-results): Recognize krb4-auth errors
	and 'error them	with a succinct error message.
	(gnats:summ-pr, gnats:net-view-pr): Likewise.
	(gnats:network-server): Default to networked gnats protocol via
	GNATS_SERVER rather than defaulting to local gnats.

	* Makefile.in (gnats.el): Substitute the configure-defined
	GNATS_SERVER into the configured copy of gnats.el

1997-11-26  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* pr-age.c (report_age): Give an error if the PR doesn't exist.

1997-10-09  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* Makefile.in (getdate.c): Use an explicit `-o getdate.c'
	rather than play games with bison and byacc's different options.

1997-09-18  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* cmds.c (GNATS_edit): New local variable UNLOCKP.  Only unlock the
	PR if writing it succeeded.
	(qualify): Only go thru for a particular pattern until we make a
	match; once we do, move on to the next argument.

1997-09-15  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnats-el.in (gnats:net-view-pr): Pass a NIL first arg to
	view-mode-enter, since emacs 20.1 changed it to expect a list.
	This will work with both 19.* and 20.*. 

Mon Aug 18 14:00:58 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* Makefile.in (VERSION): Up to 3.104.  I forgot to modify this for
	3.103.

	* contrib/tkgnats: Update to tkgnats-2.0b5.
	
	* configure.in: Add checks for -lkrb5 and -lcom_err.
	* configure: Regenerated.

	* Makefile.in (install-tools-bin, install-gnats-bin): Fix paths to
	use libexecdir instead of libdir.

	* contrib/check-db.sh: Put binaries in LIBEXECDIR, not LIBDIR.

Thu Aug  7 12:16:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* Made 3.103 beta release.

Wed Jul 30 12:16:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* PROBLEMS: Mention that we need to pick a new port other than
	1529, which is already taken.

Tue Jul 29 20:09:02 1997  Ken Raeburn  <raeburn@cygnus.com>

	* configure.in: Don't override supplied krb4 pathname on BSD.
	Build mk_auth only if it's not available in libraries, and do it
	by defining EXTRA_OBJS rather than adding to LIBS.  Now CNS can be
	used on BSD.
	* Makefile.in (EXTRA_OBJS): New variable.
	(LIBOBJS): Include it.
	(LIBSRC): Add mk_auth.c.

	* Makefile.in (install-gnats-arch-indep): Print correct mkcat
	pathname.

Wed Jul 23 14:33:18 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>

	Fix from Brian White <bcwhite@verisim.com>.
	* mkdist.sh: Handle a file in the dist directory being gzipped.

	Fix from Brian White <bcwhite@verisim.com>.
	* contrib/delete-pr/delete-pr.sh (GNATS_ROOT, LIBDIR, VERSION):
	Adjust to use `xFOOx' instead of `@FOO@'.
	* contrib/delete-pr/README: Adjust.

Thu Jul 17 10:43:38 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* configure: Regenerated.

Thu Jul 17 10:31:41 1997  David J. MacKenzie  <djm@catapult.va.pubnix.com>

	* Makefile.in, at-pr.sh, edit-pr.sh, gnats-el.in, gnats.texi,
	nedit-pr.sh, man/Makefile.in, man/gnats.man, man/mkcat.man,
	man/rmcat.man: Use the modern standard file system layout
	(libexec, share, etc. instead of putting non-libraries in lib).

	* client.c, cmds.c, configure.in: Make it compile with the BSD Kerberos.
	* mk_auth.c: New file from CNS containing functions not
	present in BSD Kerberos. 

	* configure.in: Don't assume "m4" is GNU m4.

	* file-pr.c: Fix a compiler warning.

	* gnats.texi, p-admin.texi, p-inst.texi, p-usage.texi, fields.texi:
	Clean up a few formatting errors, duplicated text, typos, etc. Add
	a few missing examples.  Document the new file system layout.

Tue Jul 15 11:28:18 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* Makefile.in (install-tools-arch-indep): Use
	$(srcdir)/../mkinstalldirs instead of `$(INSTALL) -d'.
	(install-gnats-arch-indep): Likewise.
	(install-gnats-bin): Likewise.

	Fix from "Jonathan I. Kamens" <jik@cam.ov.com>.
	Make it possible to separately install the architecture-dependent
	pieces for the main server on one machine, and the independent
	pieces for the clients.
	* Makefile.in (install-arch-dep, install-tools-arch-dep): New
	dependencies.
	(install-tools): Add install-tools-arch-indep.
	(install-tools-arch-indep): New rule.
	(install-tools-bin): Move the elisp installation up into indep.
	(install-gnats, install-gnats-arch-dep): New dependencies.
	(install-gnats-arch-indep): New rule, installing the elisp and data
	files.
	(install-gnats-bin): New rule, installing the binaries.

	Fix from "Jonathan I. Kamens" <jik@cam.ov.com>.
	* files.h (struct responsible_entry): Add AUTHENTIC member.
	* files.c (find_responsible): Set it.  Initialize the FULLNAME
	field to an empty string instead of a null string.
	(get_responsible_address): Set/clear it as appropriate.
	* gnats-el.in (gnats::real-pr-addr): Give `-s' to pr-addr.
	* pr-addr.c (long_options): Add -s/--strict.
	(main): Set local STRICT if it's there, and only show the addr if
	!STRICT or the AUTHENTIC field is set.
	(usage): Add -s/--strict.

	Fix from "Jonathan I. Kamens" <jik@cam.ov.com>.
	* configure.in: Add checks for libdes425 and libcrypto, for krb5
	vs krb4 compatability.
	* configure: Regenerated with autoconf 2.12.

	* nquery-pr.c (usage): Add -P/--port, and mention -H, both with
	and without GNATS_RELEASE_BASED.

	Fix from "Jonathan I. Kamens" <jik@cam.ov.com>.
	* mkcat.sh (CATEGORIES): Use `cp /dev/null' instead of touch to
	create and zero out each of the dist/categories file and the
	GNATS_SITE file.

	Fix from "Jonathan I. Kamens" <jik@cam.ov.com>.
	* contrib/check-db.sh (PATH): Don't use $GNATS_ROOT/gnats-bin anymore.

Sun Jun  8 17:34:50 1997  Ken Raeburn  <raeburn@raeburn.org>

	* sub-type.c (long_options): Must end with null option.  Add
	new --help/-h option.
	(usage): New argument, exit status to use.
	(main): Remove short options from getopt string that aren't really
	handled.  Add 'h' support.  Be consistent about passing argument
	to usage function.
	* pr-mail.c: Likewise.
	(usage): Fix typo.

	* query.h: Rename "host_name" from "name", and add var "port".
	All definitions and uses changed.
	* npr-edit.c (long_options): New option --port/-P.
	(main): Handle it (currently numeric only).
	* nquery-pr.c (long_options): New option --port, no short form.
	(main): Handle it (currently numeric only).
	* client.c (client_init): Use port if positive, otherwise call
	getservbyname or fall back to hardcoded value.

	* npr-edit.c: Reduce network delays in check_pr:
	(n_to_validate): New variable.
	(do_field): Increment it, don't call get_reply.
	(finish_field_validations): Call get_reply n_to_validate times.
	(net_check_pr): Call finish_field_validations.  Call do_field for
	date-required instead of open-coding it here.

	* cmds.c (GNATS_auth) [HAVE_KERBEROS]: Don't do fflush on stdout
	just before another printf; it's likely to make for more packets.

	* client.c (client_exit): Use fclose, not close, to flush buffered
	output.

Thu Jun  5 17:32:00 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* getclose.c (failed_dates): New variable.
	(procdate): Also check for t == -1 for bad date fmts.  Set FAILED_DATES.
	(long_options): Add -v/--verbose.
	(do_stat): Print the name of what we're reading if VERBOSE.
	(main): Handle it and FAILED_DATES.
	(version): Add usage.

Tue May 20 12:46:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* npr-edit.c (do_field): Make parms unsigned char*.

	* internal.c (lock_gnats): Take out daemon msg about it being locked.
	(unlock_gnats): Make int return type, giving -1 if it's not locked,
	0 otherwise.  Take out daemon msg.
	* gnats.h (unlock_gnats): Change prototype.
	* cmds.c (GNATS_{lkdb,undb}): Give the message here.

Fri May 16 18:24:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* Makefile.in (VERSION): Up to version 3.102.

	* query-pr.c (usage): Mention -R/--restricted.
	* nquery-pr.c (usage): Likewise.

	* contrib/cern-wwwgnats: Import CERN wwwgnats 2.0 from the URL
	http://wwwcn1.cern.ch/~lovell/gnats.html.

Thu May 15 10:58:18 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* man/nquery-pr.man: New file.
	* nquery-pr.c (version): Fix name.

	* gnats-el.in (gnats-mode-map): Add `C-c C-y' for changing severity,
	and `C-c C-p' for changing priority.
	(gnats:severity-change-from-to): New fn.
	(gnats::update-priority): New fn.
	(gnats::fields): Add Severity and Priority, to both put entries in
	the audit trail.
	* p-usage.texi: Document them.
	* TODO: these audit trail entries should be implemented in edit-pr.sh.

	* contrib/tkgnats: Update to tkgnats-2.0b4.

Tue May  6 12:18:18 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* query-pr.c (usage): Mention --arrived-before and --arrived-after.
	* nquery-pr.c (usage): Likewise.  Get rid of --quarter and
	--keywords for non-release-based case.

	* qvariable.c (required_{before,after}) [GNATS_RELEASE_BASED]:
	Renamed from just BEFORE and AFTER, to match the option and
	make it clearer.
	* query.h (required_{before,after}) [GNATS_RELEASE_BASED]: Rename
	decls.
	* query.c (pr_matches) [GNATS_RELEASE_BASED]: Change uses.
	* cmds.c (GNATS_{bfor,aftr,rset}) [GNATS_RELEASE_BASED]: Change uses.
	* nquery-pr.c (required_{before,after}_string)
	[GNATS_RELEASE_BASED]: Renamed from BEFORE_STRING and AFTER_STRING.
	(ask_about) [GNATS_RELEASE_BASED]: Change use.
	(main) [GNATS_RELEASE_BASED]: Likewise.
	* query-pr.c (main) [GNATS_RELEASE_BASED]: Likewise.

Mon May  5 13:36:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* pr.c (read_pr): Double the BUFFER_SIZE and UNFORMATTED_SIZE each
	time, rather than just increase it by BUFSIZ.

	* headers.c (read_header): Don't leap out if we see a `>'.

Sat May  3 18:31:51 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* Makefile.in (config): Fix bug in direct of GNATS_USER.

Tue Apr 22 14:26:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>

	Pointed out by Brian Abernathy <cba@wscoe1.atl.hp.com>.
	* getclose.c (long_options): Add -V/--version.
	(main): Accept it.
	(usage): Mention it.
	(version): New function.
	* pr-age.c (long_options): Add -V/--version.
	(main): Accept it.
	(usage): Mention it.
	(version): New function.
	* pr-stat.c (long_options): Add -V/--version.
	(main): Accept it.
	(usage): Mention it.
	(version): New function.
	* gnatsd.c (long_options): Add -V/--version.
	(main): Accept it.
	(usage): Mention it.
	(version): New function.

Mon Apr 14 16:28:04 1997  Ian Lance Taylor  <ian@cygnus.com>

	* Makefile.in (INSTALL): Change install.sh to install-sh.

Mon Apr  7 14:28:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* files.c (find_responsible): Zero out ARRAY, so if it's missing
	the alias field in the submitters file, we don't end up with
	garbage.  Use NUM_RESPONSIBLE_FIELDS, not NUM_SUBMITTER_FIELDS.

Thu Jan 23 06:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>

	Make install inside the gnats directory work.
	* Makefile.in (INSTALL): Put back to `$(srcdir)/../install.sh -c'.
	(SUB_INSTALL{,_DATA}): Define.
	(FLAGS_TO_PASS): Pass those instead of INSTALL and INSTALL_DATA.

	* cmds.c (usage): Do a lot of cleanup, and put in the missing commands.

	Add testing for arrival dates.  This needs to be done w/ the value
	indexed to have it go at any decent speed.  
	* query-pr.c (cmds): Add -b/--arrived-before and -a/--arrived-after.
	(main): Use them.
	* nquery-pr.c (cmds, main): Likewise.
	(arrived_{before,after}_string): New vars.
	(ask_about): Send the commands.
	* gnatsd.h (GNATS_{abfr,araf}): Add decls.
	* cmds.c (GNATS_{abfr,araf}): New fns.
	* gnatsd.c (cmds): Add them to the list.
	* query.c (date_compare): Add fourth argument CONVERT_P.  Do get_date on
	SDATE if this is true.
	(pr_matches): Add arg to date_compare.
	(do_pr_internal): Check and compare arrived_{before,after}.  Add
	arg to date_compare.
	* man/query-pr.man: Document the new options.

	Get rid of this ridiculous need for an empty start_data fn everywhere.
	* query.h (start_data): Delete decl.
	* file-pr.c, getclose.c, pr-age.c, pr-stat.c, query-pr.c
	(start_data): Delete fns.
	* cmds.c (start_data): Delete fn.
	(started): Deleted var.
	(do_query): Call reset_started now, instead of clearing STARTED.
	(GNATS_lock): Delete call to start_data.
	* query.c: Remove the global variables.  Include pcodes.h for
	CODE_PR_READY.
 	(print_pr): Put equivalent of start_data code inside here.
	(started): Move static variable here.
	(reset_started): New fn that does nothing but zero it out.
	* gnatsd.h (CODE_*): Move macros into pcodes.h, and include it.
	* pcodes.h: New file.
	* Makefile.in (gnatsd.h): Add dependency on pcodes.h.
	(LIBSRC): Add qvariable.c.
	(LIBOBJ): Add qvariable.o.
	* qvariable.c: New file w/ global vars from query.c.

	* nquery-pr.c: Turn on -o/--outfile.
	(full_report, sql_format): Delete unused vars.
	* query.h (outfile): Declare here now.
	* query-pr.c: Not here.
	* lists.c (get_gnats_file): Rename OUTFILE to OUTF.

	* Makefile.in (LIBGNATS): Delete useless variable.  Change all
	references to just use libgnats.a.
	(all-tools): Do our work on a tmp copy.

	* query-pr.c (cmds): Add the -D/--debug option, to match nquery-pr.
	(main): Use it (really just a no-op right now for compatibility).
	* nquery-pr.c (cmds): Get rid of bogus -E/--entire option.
	(main): Take out the case for it.
	(entirety): Delete global var.

	* query.h (before, after): Move to within #ifdef GNATS_RELEASE_BASED.
	(arrived_before, arrived_after): Add decls.
	* query.c (arrived_before, arrived_after): Define variables.
	(do_pr_internal): Compare them.
	(before, after): Move to within #ifdef GNATS_RELEASE_BASED.
	* gnatsd.c (cmds): Move BFOR and AFTR cmds to within #ifdef
	GNATS_RELEASE_BASED.
	* gnatsd.h (GNATS_{bfor,aftr}): Wrap decls to within #ifdef
	GNATS_RELEASE_BASED.
	* cmds.c (GNATS_{bfor,aftr}): Move definitions to within #ifdef
	GNATS_RELEASE_BASED.
	(GNATS_rset): Move setting of BEFORE and AFTER inside #ifdef
	GNATS_RELEASE_BASED.
	* nquery-pr.c ({before,after}_string): Likewise.
	(ask_about): Move use of them to within #ifdef GNATS_RELEASE_BASED.
	(main): Move use of -u and -U to within #ifdef GNATS_RELEASE_BASED.
	* query-pr.c (main): Likewise.

Thu Dec 26 12:10:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* query-pr.c (long_options): #if 0 arrived-{before,after} for now.

Tue Dec 10 17:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnats-el.in (gnats::pr-addr): Wrap the user's name with quotes if
	it's got a period in it.

Mon Dec  9 13:07:45 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* query-pr.c (long_options): Add -A/--release to the list.
	(main): Deal with it.
	(usage): Add -A and --release.
	* nquery-pr.c (long_options): Add -A/--release to the list.
	(release): New global variable.
	(ask_about): Send `RLSE %s'.
	* query.c (do_pr_internal): Compare against RELEASE.
	(release): New global variable.
	* gnatsd.c (cmds): Add RLSE command.
	* cmds.c (GNATS_rlse): New function.
	(GNATS_help): Add RLSE to the help response.
	* gnatsd.h: Add decl.
	* query.h (release): Add extern decl.
	* p-usage.texi: Document -A/--release.

	* query-pr.c (long_options): Add -y/--synopsis to the list.
	(main): Deal with it.
	(usage): Add -y and --synopsis.
	* nquery-pr.c (long_options): Add -y/--synopsis to the list.
	(synopsis): New global variable.
	(ask_about): Send `SYNP %s'.
	* query.c (do_pr_internal): Compare against SYNOPSIS.
	(synopsis): New global variable.
	* gnatsd.c (cmds): Add SYNP command.
	* cmds.c (GNATS_synp): New function.
	(GNATS_help): Add SYNP to the help response.
	* gnatsd.h: Add decl.
	* query.h (synopsis): Add extern decl.
	* p-usage.texi: Document -y/--synopsis.

	* query-pr.c (usage) [GNATS_RELEASE_BASED]: Add `Q:' and `K:' to
	the list.
	* nquery-pr.c: Remove --arrived-before/--arrived-after bits for
	now, since they aren't doing anything yet.

Fri Dec  6 10:53:43 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* file-pr.c (append_report): Cast the string-constant first
	argument of APPEND_STRING to `(char*)', to deal with compilers
	that think of it as an array type.

	* headers.c (read_header): Redeclare local var LINE to be created
	with xmalloc, rather than using an array.

Mon Dec  2 12:11:13 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* Makefile.in (VERSION): Up to version 3.101.

	* contrib/scripts: New set of stuff from Brian Abernathy
	<cba@wscoe1.atl.hp.com>.

	* contrib/elisp: New dir.
	* contrib/elisp/gnats-admin.el: New file from roger.hayes@sun.com.

	* edit.c (modify_pr): Use GNATS_TIME_LENGTH instead of 30 for the
	date buffer.
	* file-pr.c (run_atpr): Likewise instead of STR_MAX.
	(notify_responsible): Likewise.
	(append_report): Likewise.
 	(GNATS_TIME_LENGTH): Move definition from here...
	* gnats.h (GNATS_TIME_LENGTH): ...to here.

	* gnatsd.c (match): Call tolower on each character, to force the
	comparison of the hostnames to be case-insensitive.

	* queue-pr.c (main): Use strlen ("/gnats-queue") instead of 11.
	* internal.c (write_index): Likewise for "/gnats-adm/indXXXXXX"
	instead of 20.
	(write_index): Likewise for "/gnats-adm/" instead of 10.

Thu Nov 14 10:48:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* queue-pr.c (fork_gnats): Redecl local SAFE_ENV as static.

Thu Nov  7 06:38:25 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnatsd.c (Argify): Make sure *cp is non-nil before we try to
	check it for flags.  Otherwise, we attempt to dereference what is
	now a null pointer with bogus commands. 

	Let npr-edit do locking and unlocking of GNATS.
	* gnatsd.c (cmds): Add LKDB and UNDB commands.
	* cmds.c (GNATS_lkdb, GNATS_undb): New functions.
	(GNATS_help): Add LKDB and UNDB to the help message.
	* gnatsd.h (GNATS_lkdb, GNATS_undb): Add decls.
	* npr-edit.c (main, case LOCKDB): Send LKDB.
	(main, case UNLOCKDB): Send UNDB.
	* internal.c (unlock_gnats): If IS_DAEMON, say when it's already
	unlocked or when unlocking it is finished.  Also say if it's not
	locked at all.  Use PROGRAM_NAME in the errors.
	(lock_gnats): Likewise.

	* gnats-el.in (gnats::find-pr-buffer): New function.
	(gnats:edit-pr): If we already have a buffer for a given PR, switch
	to it instead of trying to lock it.
	(gnats::handle-results): Only give the message, not the error.
	(gnats::pr-being-edited): Delete error condition.

	* npr-edit.c (do_field): New function, dealing with the value of a
	particular PR field---which could be null.
	(net_check_pr): Use it.  Handle the responsible field being null.
	* cmds.c (GNATS_resp): Say "responsible entry" instead of "name"
	for the error message.

Thu Oct 31 15:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	Add `getclose', which will show which PRs closed between certain dates.
	* getclose.c: New file.
	* Makefile.in (all-tools): Add getclose.
	(DISTFILES): Add getclose.c.
	(install-tools-bin): Add getclose.
	(uninstall): Delete it.
	(doclean): Add getclose.
	(getclose): Add rule.
	(getclose.o): Add dependencies.

Mon Oct 28 12:49:45 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnatsd.c (match): Should force default of failure if the line
	doesn't match the string in P. 

	* gnats-el.in (gnats::unlock-all-buffers): Force GNATS:RUN-IN-BACKGROUND
	to be nil before we do the forced unlocking of remaining buffers.

Mon Oct 28 12:45:29 1996  Jonathan I. Kamens  <jik@cam.ov.com>

	* edit.c (modify_pr) (GNATS_RELEASE_BASED): Don't dereference a
 	null pointer if the PR doesn't have a "Date-Required" field in it.

Mon Oct 28 12:11:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* Makefile.in (VERSION): Forgot to boost to 3.100. (Was made
	available on October 2, 1996.)

Fri Sep 27 15:02:42 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* internal.c (write_index): Adjust to allocate 20 for the filename.

Thu Sep 19 19:14:30 1996  Eric Mumpower  <nocturne@flotsam.cygnus.com>

	* configure.in: I changed the configure algorithm here to assume
 	that if a libkrb.a is found in the specified $KRB4 directory, that
	it is preferred to any libkrb.a that may be present in the
	system library directories.
	* configure: Regenerated.
	
Mon Sep 16 16:25:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	Problem pointed out by Tom Schutter <tom@platte.com>.
	* configure.in (HOESTNAME): Don't set anymore.
	(_h): Init with "`(hostname || uname -n) 2>/dev/null | sed 1q`".
	* configure: Regenerated.

Thu Sep  5 14:18:01 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* Makefile.in (VERSION): Up to version 3.99.

	* PROBLEMS: New file.

	* file-pr.c (GNATS_TIME_LENGTH): Define to 50.
	(gnats): Use it for arrival_time instead of 30.

	* contrib/wwwgnats/wwwgnats.shar: New version by Karl Berry.
	Retrieved from http://www.tug.org/gnats/.
	* contrib/wwwgnats/{README.html, libgnats.pl, wwwgnats.pl}: Remove
	old version.

Tue Aug 27 14:19:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* pr.c (write_pr): Define macro MAYBE_NL, and use it for MultiText
	fields.

Mon Aug 26 11:55:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* mkdist.sh (all): Take out send-pr.elc for default rule.

	* index.c (create_index_entry) [GNATS_RELEASE_BASED]: Also check
	that TIM is non-nil value.
	* internal.c (write_index) [GNATS_RELEASE_BASED]: Avoid garbage
	values of date_required field.
	* query.c (date_compare): Return 1 if VAL is a zero value, meaning
	that the date field is unset.

	* pr.c (read_pr): Free the old value of the multitext field before
	we go ahead and replace it with what's in the BUFFER.  Likewise
	for freeing before dup'ing value of L.

	* gnats-el.in (gnats::start-background): Make sure we have a
	trailing newline in the stuff sent to PROC before we send EOF.

	* gnatsd.c (FLAG_ONE_ARG): Define.
	(cmds): Set it for ORIG, CLSS, SUBM, TEXT, MTXT, BFOR, AFTR, and
	VDAT.
	(cmds) [GNATS_RELEASE_BASED]: Likewise for QRTR and KYWD.
	(Argify): Add third arg Command CP.  Add a little sanity to use
	FLAG_ONE_ARG properly.
 	(main): Pass &CP down into Argify.  Instead of doing strncasecmp
	on each of CP, just see that CP is non-null.
	* cmds.c (GNATS_orig, GNATS_clss, GNATS_auth): Check the nargs, then
	just copy the args into its var.
	(GNATS_bfor, GNATS_aftr): Don't bother using full_date, instead let
	FLAG_ONE_ARG do the trick.
	(GNATS_qrtr, GNATS_kywd) [GNATS_RELEASE_BASED]: Likewise.
	(full_date): Remove unneeded function.
	* gnatsd.h (GNATS_qrtr, GNATS_kywd) [GNATS_RELEASE_BASED]: Add decls.

	* cmds.c (started): Make it static.
	(do_query): Init STARTED to zero before looking at the args,
	instead of clearing after hit was set.
	* query.c (started): Remove unused extern decl.

Wed Aug 21 08:34:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* configure.in: If $prefix is NONE, use $ac_default_prefix for
	setting of GNATS_ROOT.
	* configure: Regenerate.

	* gnats-el.in (gnats:unlock-buffer): Undo change of June 26, 1995,
	to make the most recent edited PR go into the `*edited-pr*'
	buffer when GNATS:KEEP-EDITED-BUFFERS is nil.

	* gnats-el.in (gnats::handle-results): Add EXIT-STATUS argument,
	flagging when we see an unknown error.
	(gnats::handle-pr-edit): Pass RESULT down as that arg.
	(gnats::handle-check-pr): Likewise.
	(gnats::handle-file-pr): Likewise.
	(gnats::handle-unlock-pr): Likewise.

	* Makefile.in (install-info): Use basename on $I.

	* file-pr.c (notify_responsible): Make sure REPLY_TO is really a
	null string, to see if we want to put the From: header in there.

	Get rid of a variety memory leaks and minor buglets. 
	* gnats.h (free_index, free_index_entry): Add decls.
	* pr.h (struct index_entry): Add BUF field.
	* index.c (free_index, free_index_entry): New functions.
	(next_index_entry): Set p->buf to BUF.
	(get_index): Rename INDEX_CHAIN to CURRENT_CHAIN.
	* edit.c (modify_pr): Init INDEX_CHAIN, PATH, OLD_PATH, and
	LOCK_PATH to NULL.  Make S a char*, using it instead of just using
	s->number.  Init new_index->buf to NULL.  Call free_index and
	free_index_entry in a variety of places where we otherwise return
	or exit because of an error.  Rename INDEX_CHAIN to CURRENT_INDEX.
	(check_pr): Call free_category once we've checked it.  Likewise
	call free_submitter and free_responsible.
	(lock_pr): Rename stat BUF to SBUF.
	* files.c (find_submitter): Free array[3].
	(find_category): Zero out CPTR before we use it.
	(find_responsible): Free ARRAY before we return.
	(get_responsible_address): Free responsible->alias, then set it to
	a copy of the key for both cases.
	* file-pr.c (gnats): Call free_responsible, and free the
	RESPONSIBLE ptr at the end.
	(gnats): Rename stat BUF to SBUF.
	(run_atpr): Rename PIPE to P.
	(append_report): Rename local CC to NEW_CC.
	* internal.c (write_index): Adjust allocation of PATH and TMPFILE
	to only happen when we need it to, and only allocate TMPFILE to be
	L_tmpnam if HAVE_MKTEMP isn't set.  Stop using PATH_MAX for this.
	Free TMPFILE if opening it failed.  Free PATH before punting about
	renaming the temp index.  Free both PATH and TMPFILE before we
	leave.  Rename TMPFILE to WORKFILE.
	* nquery-pr.c (usage): Rename param STAT to S.
	* gen-index.c (usage): Rename param STAT to S.
	* gnatsd.c (allowed): Rename local ACCESS to ACC.
	* cmds.c (check_locked): Rename param PR to P.
	(GNATS_auth): Delete local unused array USER.
	* query-pr.c (usage): Rename param STAT to S.
	* client.c (client_init): Delete unused local var LREALM.

	* file-pr.c (free_category, free_submitter): Move from here...
	* files.c (free_category, free_submitter): ...to here.
	* globals.h (free_category, free_submitter): Put decls here.

	* Makefile.in (QUEUE_DIR): Remove defunct definition.
	(GNATS_DEFS): Remove QUEUE_DIR from the defs passed down.

	* edit.c (check_pr) [case GNATS_RELEASE_BASED]: Only try to parse
	the date in D if it's non-null.

	* gnats-el.in (gnats::start-background): Put the value of PR into a
	buffer-local GNATS:::CURRENT-PR before creating the ARGS for unlocks.

	* cmds.c (GNATS_mlpr): Only use responsible->alias if responsible
	is non-null.  Free RESPONSIBLE before we unify_addrs, instead of
	after we say end of list.
	(GNATS_resp): Free RESPONSIBLE when we're done.

	* gen-index.c (do_category): Free PATH before we return.

	* client.c (get_reply) [case CODE_GREETING]: Free R before we
	read in the next reply.
	(client_init): Free R after getting CODE_OK, et al. 

Tue Aug 20 10:46:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnats-el.in: Only require 'env if it's emacs19.
	(gnats::start-background): Only try to set PROCESS-ENVIRONMENT if
	we're using emacs19.

	Fix from "Jonathan I. Kamens" <jik@cam.ov.com> to work w/ emacs18.
	* gnats-el.in (gnats:kill-buffer): No longer make BUF optional,
	instead prompt them for it.  Adjust use of get-buffer instead of
	current-buffer, to avoid killing the wrong one.

	* Makefile.in (INSTALL): Make sure we get the full path for this.

Mon Aug 19 12:44:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* file-pr.c (check_if_reply): Adjust PAT to catch `Re[2]: ...'.
	Adjust offset into start and end to use the value of this pattern.

Thu Aug 15 10:55:21 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* query-pr.c (usage) [!GNATS_RELEASE_BASED]: Don't mention
	--required-before or --required-after.
	* nquery-pr.c (usage) [!GNATS_RELEASE_BASED]: Likewise.

	Fix from Brian Abernathy <cba@wscoe1.atl.hp.com>.
	* query.c (pr_matches): Use strcasecmp for closed case.

Fri Aug  9 10:22:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* edit.c (modify_pr) [GNATS_RELEASE_BASED]: Remember to set the
	date_required field.

Thu Aug  8 17:02:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* Makefile.in (VERSION): Up version to 3.98.

	* gnats-el.in (gnats:gnats-mode): Don't make it interactive.

Thu Jul 18 10:43:48 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	Allow users to use GNATS in the foreground as before, if they want.
	* gnats-el.in (gnats:run-in-background): New variable.
	(gnats::handle-unlock-pr): Renamed from gnats::unlock-pr-sentinel.
	(gnats:unlock-pr, gnats:unlock-pr-force): Pass 'gnats::handle-unlock-pr.
	(gnats::handle-pr-edit): Renamed from gnats::edit-pr-sentinel.  Use
	switch-to-buffer instead of display-buffer if we don't want
	gnats:run-in-background.
	(gnats::pr-edit-background): Pass 'gnats::handle-pr-edit.
	(gnats::handle-check-pr): Renamed from gnats::check-pr-sentinel.
	(gnats::check-pr-background): Pass 'gnats::handle-check-pr.
	(gnats::mail-PR-changed): Return the mail buffer being used.
	(gnats::finish-filing): New local RETBUF, set to the value returned
	by gnats::mail-PR-changed.  Give that back to its caller.
	(gnats::handle-file-pr): Renamed from gnats::file-pr-sentinel.
	Return RETBUF.
	(gnats::file-pr-background): Pass 'gnats::handle-file-pr.  Switch to
	RETBUF returned by gnats::start-background.
	(gnats:submit-pr): Only call bury-buffer if gnats:run-in-background.

	* queue-pr.c (main): Move checking of gnats_root and setting of
	queue_dir to be after the call to configure().

Mon Jul 15 15:00:23 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	Fix switching between GNATS types.
	* gnats-el.in (gnats:::{query-pr, nquery-pr, query-regexp}): Define
	vars.
	(gnats:net-view-pr): Use gnats:::nquery-pr and gnats:::query-regexp.
	(gnats:change-type): Set the new vars.
	(gnats:query-pr): Use gnats:::nquery-pr and gnats:::query-pr.
	(gnats:summ-pr): Likewise, and use gnats:::query-regexp.

Wed Jun 26 12:10:43 1996  Jason Molenda  (crash@godzilla.cygnus.co.jp)

	* Makefile.in (VPATH, INSTALL_PROGRAM, INSTALL_DATA, bindir,
	libdir, statedir, datadir, mandir, infodir, includedir): Use
	autoconf-set values.
	(docdir): Removed.
	* configure.in (AC_PREREQ): autoconf 2.5 or higher.
	(AC_PROG_INSTALL): Uncomment.
	* configure: Regenerated.
	* man/Makefile.in (VPATH, bindir, libdir, datadir, mandir, 
	infodir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use 
	autoconf-set values.
	(oldincludedir, docdir): Removed.

Wed Jun 19 11:35:02 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* queue-pr.c (queue_dir): Add definition.
 	(main): Set queue_dir based on current value of gnats_root.
	(fork_gnats): Pass `-d gnats_root' to file-pr.
	* config.h (queue_dir): Remove decl.
	* config.c.in (queue_dir): Remove CN_OPT.
	* config.c: Regenerate.
	* configure.in (QUEUE_DIR): Remove subst/setting/echo of it.
	* configure: Regenerate.

Fri Jun 14 08:36:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* files.c (get_responsible_address): Always accept the responsible
	name, even if it doesn't have a passwd entry.
	* file-pr.c (append_report): Report not getting a responsible address.

Thu Jun 13 08:31:16 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* client.c (free_reply): Cast R to char* for xfree.
	* pr-age.c (report_age): Cast T to char* for xfree.

	* index.c (find_pr_category): Return NULL at the end.

	* cmds.c (get_text): Delete decl of fopen.

	* gnats.h (safe_exit): Add decl.
	* nquery-pr.c (safe_exit): Delete decl.
	* sub-type.c (safe_exit): Likewise.

	* gnatsd.h (client_init, client_exit): Move decls from here...
	* gnats.h: ... to here.

	* configure.in: Check for netdb.h.
	* configure: Regenerate with autoconf 2.8.
	* autoconf.h.in: Regenerate.
	* gnatsd.h [HAVE_NETDB_H]: Include <netdb.h> for gethostbyname decl.

	* Makefile.in (regex.o): Don't depend on $(srcdir)/gnats.h.

	* gnats.h (get_date): Add prototype.
	* query.c (sql_time): Delete decl of get_date.
	* pr-age.c (report_age): Delete decl of get_date.

	* gnatsd.h (get_reply): Move prototype from here...
	* gnats.h (get_reply): ... to here.
	* nquery-pr.c (get_reply): Remove prototype.

	* globals.h (find_category): Fix prototype, was `find_categories'.
	* gnats.h (check_index): Add prototype.
	* gnatsd.h (server_reply, read_server): Remove decls, only used in client.c.

	* cmds.c (name_verify): #if 0 fn definition.

	* internal.c (lock_gnats): Use `%d', not `%s', for error number.

	* client.c (client_init): Delete unused var H.
	* cmds.c (GNATS_mlpr): Delete unused var LIST.
	* npr-edit.c (main): Delete unused vars I and PWP.
	* pr.c (check_enum_types): Delete unused vars P and P2.

	* query.c (date_compare): Abort if neither case is met.

	* gen-index.c (main): Make return type `int'. 
	* main.c (main): Likewise.
	* npr-edit.c (main): Likewise.
	* nquery-pr.c (main): Likewise.
	* pr-age.c (main): Likewise.
	* pr-edit.c (main): Likewise.
	* pr-mail.c (main): Likewise.
	* pr-stat.c (main): Likewise.
	* gnatsd.c (main): Likewise.
	* query-pr.c (main): Likewise.
	* queue-pr.c (main): Likewise.
	* sub-type.c (main): Likewise.

	Patch from Uwe Block <blocku@genias.de>.
	* query-pr.c (main): Add `L:' to getopt_long string.
	* nquery-pr.c: Likewise.

Thu Apr  4 11:59:28 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnats-el.in (gnats::mail-PR-changed-mhe-setup): Instead of
	MH-SEND, use MH-SEND-OTHER-WINDOW,
	(gnats::finish-filing): Fix to unlock the PR Buffer, not the mail
	buffer.

Wed Apr  3 16:07:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	Make edit-pr throw the stuff into the background, popping back up
	when it's done.
	* gnats-el.in (gnats::pr-being-edited): Set up the error condition.
	(gnats:submit-pr): Rewrite to only start up gnats::check-pr-background.
	(gnats::pr-edit, gnats::check-pr, gnats::file-pr): Deleted functions.
	(gnats:current-pr, gnats:newfile, gnats:::pr-buffer,
	gnats:::do-file-pr, gnats:::force): New variables.
	(gnats::handle-results, gnats::start-background): New functions.
	(gnats::pr-edit-background, gnats::pr-edit-sentinel): New functions.
	(gnats::check-pr-background, gnats::check-pr-sentinel): New functions.
	(gnats::file-pr-background, gnats::file-pr-sentinel,
	gnats::finish-filing): New functions.
	(gnats:unlock-pr-force, gnats:unlock-pr): Rewrite to use the
	start-background fn.
	(gnats::unlock-pr-sentinel): New function.
	(gnats:net-view-pr): Add (require 'view).  Need to REWRITE this and
	the summary fns!
	(gnats:edit-pr): Rewrite to just use gnats::lock, everything else is
	now done by gnats::handle-results.

Tue Apr  2 17:00:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnats-el.in (gnats::pr-edit): Replace MIN and MAX with
	SEND-BUFFER.  If that's true, use (point-min) and (point-max).
	(gnats::check-pr): Change call.
	(gnats::file-pr): Likewise.
	(gnats:unlock-pr-force): Fix call.

Fri Mar 29 13:30:23 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* npr-edit.c (net_check_pr) [GNATS_RELEASE_BASED]: Make sure
	there's a DATE_REQUIRED value before we check its contents being
	non-zero.

Tue Mar 12 15:02:48 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnats-el.in (gnats::tr): Clean up to use string-to-char, rather
	than match-beginning.  From Mark Eichin <eichin@cygnus.com>.

Wed Mar  6 12:18:09 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* npr-edit.c (net_check_pr): Make sure we have a date required
	before we validate it.
	* cmds.c (GNATS_vdat): Check that we got a date before trying to
	validate it.

	* index.c (create_index_entry) [GNATS_RELEASE_BASED]: Fix typo, time_t.
	* edit.c (check_pr) [GNATS_RELEASE_BASED]: Add decl for locals T and D.

	* file-pr.c (reply_to_submitter): Say "at your report", not "at
	your bug".

Tue Feb 20 17:48:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* files.c (init_responsibles): Clean up to deal with responsible
	files that have missing entries. 

	* gnats-el.in (gnats::tr): Clean up to not die on "[" and "]".

	* config.h (ACCESS_FILE): Take off leading slash.

Fri Feb 16 16:28:21 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* query.c (print_pr): Free the time after we've printed it.

Wed Feb 14 12:38:43 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* nedit-pr.sh: New file.
	* Makefile.in (all-tools): Add nedit-pr.
	(nedit-pr): New rule.
	(install-tools-bin): Install nedit-pr.
	(uninstall): Remove nedit-pr.
	(doclean): Likewise.

Tue Feb 13 15:57:34 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* Makefile.in (config, at-pr, mkcat, rmcat, mkdist, edit-pr,
	mail-query, gnats.el): Make these quiet.
	* man/Makefile.in (SRCS1, SRCS8, SRCSL): Likewise.

	Add functionality for GNATS to be release-based, by configuring it
	with the configure flag `--with-release-based'.
	* configure.in, configure: Take the new flag.
	* acconfig.h (GNATS_RELEASE_BASED): Add undef.
	* autoconf.h.in: Regenerate.
	* pr.h (PR_Name) [GNATS_RELEASE_BASED]: Add QUARTER, KEYWORDS, and
	DATE_REQUIRED.
	(PR_Type): Add Date.
	(Index) [GNATS_RELEASE_BASED]: Add date_required.
	({QUARTER,KEYWORDS,DATE_REQUIRED}_STRING) [GNATS_RELEASE_BASED]: Define.
	* pr.c (init_pr): Make ARRIVAL_DATE be Date type.
	(init_pr) [GNATS_RELEASE_BASED]: Set QUARTER, KEYWORDS, and
	DATE_REQUIRED.
	* query.c (before, after): Define.
	(quarter, keyword) [GNATS_RELEASE_BASED]: Define.
	(date_compare): New function.
	(pr_matches): Check before and after against the arrival date.
	(pr_matches) [GNATS_RELEASE_BASED]: Check before and after against
	the date required instead.
	(do_pr_internal) [GNATS_RELEASE_BASED]: Also check for quarter and
	keyword searches.
	(print_pr) [GNATS_RELEASE_BASED]: Write QUARTER and KEYWORDS.
	* nquery-pr.c (quarter, keywords) [GNATS_RELEASE_BASED]: Define.
	(before_string, after_string): Define.
	(long_options) [GNATS_RELEASE_BASED]: Add quarter and keywords
	flags.  Add required-before and required-after flags.
	(long_options): Otherwise, add arrived-before and arrived-after flags.
	(ask_about) [GNATS_RELEASE_BASED]: Add QRTR and KYWD cmds.
	(ask_about): Add BEFOR and AFTR cmds.
	(main) [GNATS_RELEASE_BASED]: Add Q and K options.
	(usage) [GNATS_RELEASE_BASED]: Add the --quarter and --keywords flags.
	* cmds.c (GNATS_qrtr, GNATS_kywd) [GNATS_RELEASE_BASED]: New
	functions.
	(full_date, GNATS_bfor, GNATS_aftr, GNATS_vdat): New functions.
	(GNATS_rset): Also reset before and after.
	(GNATS_rset) [GNATS_RELEASE_BASED]: Also reset quarter and keywords.
	(GNATS_help) [GNATS_RELEASE_BASED]: Add QRTR and KYWD.
	* edit.c (modify_pr) [GNATS_RELEASE_BASED]: Do DATE_REQUIRED.
	(check_pr) [GNATS_RELEASE_BASED]: Check DATE_REQUIRED.
	* index.c (create_index_entry) [GNATS_RELEASE_BASED]: Also include
	the date required in the index.
	(next_index_entry) [GNATS_RELEASE_BASED]: See the date required field. 
	* internal.c (write_index) [GNATS_RELEASE_BASED]: Add the date
	required field.
	* npr-edit.c (net_check_pr) [GNATS_RELEASE_BASED]: Send a VDAT w/
	the DATE_REQUIRED field.
	* gnatsd.h (GNATS_bfor, GNATS_aftr, GNATS_vdat): Add decls.
	(GNATS_qrtr, GNATS_kywd) [GNATS_RELEASE_BASED]: Add decls.
	* gnatsd.c (cmds) [GNATS_RELEASE_BASED]: Add QRTR and KYWD.

	* config.c.in: Put missing fclose here too.

	* file-pr.c (append_notify): Clean up code to not skip the last
	notification entry in the categories file.

	* mkdist.sh (FILES): Add categ.texi, fields.texi, s-usage.texi,
	states.texi, and version.texi.
	(send-pr.elc): Add rule to the Makefile we create.
	(lispdir): Install everything in $(prefix)/lib/emacs/site-lisp.

	* Makefile.in (domostlyclean): Also delete *.cps.
	(dodistclean): Also delete config.cache and gnats.info*.
	(dorealclean): Delete TAGS and version.texi, not *info.
	(install-tools-bin): Don't install with write permission.
	(install-gnats-bin): Likewise.

	* file-pr.c (check_if_reply): Don't quote the period in the PAT
	character class.

	* cmds.c (GNATS_bfor, GNATS_aftr): Make sure we got a date.

Fri Jan 19 11:57:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnats-el.in (gnats::try-responsible-completion): Set
	completion-ignore-case to t before we complete on the name.

Tue Jan  9 17:56:16 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gen-index.c (main): Remember to close the outfile.

	* query-pr.c (main): Say we couldn't read the index if the chain
	is null.
	* pr-age.c (main): Likewise.
	* pr-stat.c (main): Likewise.

Tue Jan  9 14:19:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* files.c (find_responsible): Remember to free PATH.

	* client.c (dupfd): Add decl.
 	(client_init): Use it.
	(client_exit): Close it.
	* nquery-pr.c (ask_about): Remember to free BUF before we leave.

	* pr.c (read_pr): Remember to free BUFFER also for non-full queries.

	* config.c (configure): Remember to close the config file.

	* client.c (free_reply): New function.
	(get_reply): Make sure to free the reply when we're done.
	(get_reply, case CODE_INFORMATION): Free the reply before we get
	the info, and free each additional bit of info for REPLY_CONTs.

Mon Jan  8 19:39:51 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* pr-age.c (report_age): Free the timediff after we've printed it.
	Always free the path when we're done.

	* pr.c (verify_enum): New function, based on code from
	check_enum_types.
	(check_enum_types): Call it.
	* gnats.h (verify_enum): Add decl.

	* cmds.c (check_locked): New function, based on code from GNATS_edit.
	(GNATS_edit): Use it.

	* cmds.c (GNATS_unlk): Return right after chk_nargs, and bring that
	block out into the function instead.
	(GNATS_mlpr, GNATS_mlct, GNATS_catg, GNATS_conf, GNATS_svty,
	GNATS_stat, GNATS_prio, GNATS_subm, GNATS_text, GNATS_mtxt): Likewise.

	* gnatsd.c (GNATS_*): Delete decls.
	* gnatsd.h (GNATS_*): Add them here as extern w/ PARAMS.

	* cmds.c (current_pr): Define.
	(daemon_pr): Set current_pr to the path if it was set.
	(do_query): Pass 1 as print arg to daemon_pr.
	(GNATS_lock): Likewise.

	* gnatsd.c (GNATS_bfor, GNATS_aftr): New functions.
	(cmds): Add BFOR and AFTR.
	* gnatsd.h (GNATS_bfor, GNATS_aftr): Declare.
	* cmds.c (GNATS_rset): Clear before and after.
	* pr.h (PR_Type): Add Date type.
	* pr.c (field_value): If the field is Date, return NULL.
	(init_pr): Make >Arrival-Date: Date type, not Text.
	* query.h (before, after): Declare.
	* query.c (before, after): Define.

	* gnatsd.c (cmds): Add VDAT.
	(GNATS_vdat): Add decl.
	* cmds.c (GNATS_vdat): Handle VDAT.
	(full_date): New function.

	* client.c (get_reply): Deal with CODE_INVALID_DATE.
	* gnats-el.in (gnats::pr-edit): Add invalid date message.
	(gnats::invalid-date): Add invalid date error.
	* gnatsd.h (CODE_INVALID_DATE): Define.

Wed Nov 15 11:09:43 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnats-el.in (gnats:change-type): Rewrite to allow the type to be
	passed as a parameter, not just interactively set.  Fix it to not
	be case sensitive.

Wed Nov  8 18:04:03 1995  Brendan Kehoe  <brendan@beauty.cygnus.com>

	* gnats-el.in (gnats:net-view-pr): Use view-mode-enter if it's defined.

Wed Oct 25 14:50:12 1995  Per Bothner  <bothner@kalessin.cygnus.com>

	* Makefile.in (diststuff):  Also make 'info'.

Tue Oct 17 16:52:17 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnats-el.in (gnats::get-header-using-mail-fetch-field): Use
	re-search-forward instead of search-forward-regexp.

Mon Oct 16 14:15:47 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnats-el.in (gnats-summary-mode-map): Check if we're emacs 19
	before calling suppress-keymap.
	(gnats:summary-redisplay): Call buffer-flush-undo for emacs 18.
	(gnats:summ-pr): Likewise.  Say that summary mode only works with 19.
	(string-to-number): Defun to call string-to-int if we're emacs 18.
	(gnats:::format-max-width): Only use abs if we're emacs 19.

Fri Oct 13 17:47:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* Makefile.in (VERSION): Up to 3.97.

Wed Oct  4 13:58:11 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* cmds.c (GNATS_rset): Clear ORIGINATOR and CLASS after we've freed
	them.

Fri Sep 22 15:00:41 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* index.c (check_index): Don't exit if stat failed.

Thu Sep 21 18:22:12 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	Make the daemon reload the index if necessary when given a RSET.
	* index.c: Include gnatsd.h.
 	(index_mtime): New variable with the mod time of the index.
	(index_filename): New variable with the name of the index.
	(stat_index): New function to check the modification time of the index.
	(open_index): Use it.
	(check_index): New function.
	* gnats.h (index_mtime): Add var decl.
	(stat_index): Add function decl.
	* cmds.c (GNATS_rset): Also run clean_pr, clean_header, and
 	check_index.  Reword the response message.

Thu Sep 14 13:56:12 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* Makefile.in (VERSION): Up to 3.96.

	* gnats-el.in (gnats:summ-pr): Only run nquery-pr if gnats:network-server.
	Ignore the results of --print-path.	

	Add Ken Raeburn's support for doing an emacs-based PR summary.
	We require emacs 19 now.
	* gnats-el.in (GNATS:::PRs, GNATS::options, gnats:::limited-fields,
	gnats::summary-sort-function, gnats::summary-format-alist,
	gnats::format-string, gnats-summary-mode-map): New variables.
	(gnats:::fieldval): New subst.
	(summ-pr): New fset.
	(gnats:::prompt-for-pr-number, gnats:summary-edit,
	gnats:summary-view, gnats:summary-quit, gnats:summary-revert,
	gnats:::parse-summary-format, gnats:::format-max-width,
	gnats:summary-redisplay, gnats-summary-mode, gnats:summ-pr): New
	functions.

Wed Sep 13 12:37:30 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* configure.in (CF): We need to do `. ${CF}', to make the
	variables take effect.

Tue Sep  5 13:23:56 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnats-el.in (gnats::mail-PR-changed): Change order to we actually
	get to use what we put in CC and TO.

Tue Aug 22 23:26:29 1995  Ken Raeburn  <raeburn@kr-laptop.cygnus.com>

	* gnatsd.h (GNATS_KRB4_PRINCIPAL_NAME): Use gnats_user, not
	GNATS_USER.

	* Makefile.in (client.o): Add dependencies.

	* gnats.h: Include libiberty.h.
	(xmalloc, xrealloc, basename): Don't declare.

Fri Aug 11 09:32:35 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	Add the ability to change the username of the GNATS user.
	* configure.in: Accept new option `--with-gnats-user=name'.  Subst
	GNATS_USER.
	* configure: Regenerate.
	* config.c.in (gnats_user): Declare.
	* config.c: Regenerate.
	* gnats.h (gnats_user): Add extern decl.
	* Makefile.in (GNATS_USER): Add decl.
 	(GNATS_DEFS): Add -DGNATS_USER.
	(install-tools-bin): Refer to GNATS_USER.
	(install-gnats-bin): Likewise.
	(config): Also emit GNATS_USER.
	(at-pr): Substitute it.
	* at-pr.sh: Declare and use GNATS_USER.
	* file-pr.c (notify_responsible) [!DONT_USE_RESENT]: Use gnats_user.
	* internal.c (punt): Likewise.
	* misc.c (open_mail_file): Likewise.
	* gnatsd.h (GNATS_KRB4_PRINCIPAL_NAME): Use GNATS_USER.
	* queue-pr.c (safe_env): Take out of global scope.
	(fork_gnats): Instead, move in here and set USER=foo by hand based
	on gnats_user.

	* cmds.c (GNATS_resp): Re-enable verifying the RESP argument.

Thu Aug 10 13:49:32 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* mkdist.sh: Don't shift after IFS is reset.

Wed Aug  9 10:49:44 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* mkdist.sh (install): Create infodir.

	* configure.in: Put back in handling of --with-gnats-root.
	* configure: Regenerate.

Fri Aug  4 12:16:44 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* cmds.c (GNATS_help): Add RSET.

Thu Aug  3 12:16:39 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* Makefile.in (VERSION): Up to 3.95.

	* cmds.c (qualify): Move the check of SEARCHING.

	* gnats-el.in (gnats:::types): Add definition.
	(gnats:change-type): New function.
	(gnats-change-type, change-gnats): Add fsets.

	* client.c (client_exit): Don't do get_reply after QUIT, we may
	have already been closed out.

	* index.c (open_index): Only emit the error message if !IS_DAEMON.
	* pr-age.c (is_daemon): Add definition to 0.
	* query-pr.c (is_daemon): Likewise.
	* gen-index.c (is_daemon): Likewise.

	* Makefile.in (config.c): Don't depend on Makefile.

	* client.c (get_reply): Handle CODE_FILE_ERROR.

	* gnats-el.in (gnats:change-root): New function.
	(change-gnats, gnats-change-root): New fets.

	* configure.in: Add --with-gnats-port and --with-gnats-service.
	* configure: Regenerate.
	* config.c.in (gnats_server_port): Set to GNATS_SERVER_PORT.
	(gnats_service): Set to GNATS_SERVICE.
	* config.c: Regenerate.
	* Makefile.in (GNATS_SERVER_PORT, GNATS_SERVICE): Add decls.
	(GNATS_DEFS): Pass them.
	(install-tools-bin, install-gnats-bin): Do chown/chmod if root or gnats.
	* gnatsd.h (GNATS_SERVER_PORT, GNATS_SERVICE): Take out definitions.
	* query.h (gnats_service, gnats_server_port): Add extern decls.
	* client.c (client_init): Use gnats_server_port and gnats_service
	instead of the macros.

Wed Jul 26 18:29:32 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* mkdist.sh: Take off trailing asterisk matching --release.  Add a
	shift after setting IFS.

Wed Jul 26 10:51:37 1995  Fred Fish  <fnf@cygnus.com>

	* configure.in:  Test for -lgen, needed for syslog on Unixware 2.0.
	* configure:  Regenerated with autoconf 2.4.
	* Makefile.in (Makefile):  Make dependant on config.status, so
	a "make" will cause config.status and Makefile to be regenerated
	if configure is updated.

Mon Jul 24 09:08:29 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	Add RSET command, to clear out searching criteria.
	* gnatsd.c (cmds): Add RSET/GNATS_rset.
	(GNATS_rset): Add decl.
	* cmds.c (GNATS_rset): New function.

	* cmds.c (qualify): If the PR matches, drop its path in place here.
	(verify): Deleted function.
	(do_query): Don't call verify.  Say that no PRs matched if none
	qualified.

	* query.c (get_category): Delete alternate sprintf, we leave if
	CATEGORY was null.

	* config.c.in: Don't include stdio.h or string.h.
	* config.c: Regenerate.

	* regex.c (re_match_2): Don't do arithmetic if STRING1 is null.

	* client.c (read_server): Only go 2 back on RECVLINE and check for
	a linefeed if we've got a second character.

Sun Jul 23 15:48:46 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* getdate.[ch]: Regenerate.

Sun Jul 23 15:43:47 1995  Jeff Law  (law@snake.cs.utah.edu)

	* getdate.y: Include <ansidecl.h> to get various ansi/traditional
	C compatability macros.

Sat Jul 22 01:21:29 1995  Jeff Law  (law@snake.cs.utah.edu)

	* Makefile.in (lists.o): Add missing dependency on pathmax.h.

Fri Jul 21 15:01:12 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* file-pr.c (append_report): Allocate LINE dynamically, not auto.
	Free it after we've closed the input file.

Tue Jul 18 12:06:24 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	In the lock for a PR, say what locked it.
	* edit.c (lock_pr): New arg PROCESSID.  Print it into the lock if
	it's set.  Use fgets when reading who locked it, not fscanf.
	* gnats.h (lock_pr): Update prototype.
	* cmds.c (daemon_lock_pr): New arg PROCESSID, passed into lock_pr.
	(GNATS_lock): Pass third arg into daemon_lock_pr, allowing the old
	version of just the number and username.
	* client.c (get_reply, case CODE_ERROR): Move up to the same as
	CODE_LOCKED_PR, so we say what the error was.
	* edit-pr.sh: Run pr-edit with --process set.
	* gnats-el.in (gnats::lock): Pass in our PID, if 'emacs-pid is set;
	only say "emacs18" if it isn't.
	(gnats:unlock-pr-force): Don't use --host=, just --host.
	(gnats:unlock-pr): Likewise.
	(gnats:query-pr): Likewise.
	(gnats::check-pr): Likewise.
	* npr-edit.c (long_options): Add -p/--process.
	(main): New variable PROCESSID, setting w/ the argument.
	(main, case LOCK): Pass it if it's set.
	(usage): Update usage.
	* pr-edit.c (long_options, main, usage): Likewise.
	(main): Pass PROCESSID into lock_pr.

Mon Jul 17 07:35:07 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* configure.in: Only run ${CF} if it's there; use /bin/sh or
	CONFIG_SHELL, not `.'.
	(HOESTNAME): Put it back.
	* configure: Regenerate.

	* Makefile.in (VERSION): Up to 3.93.

	* file-pr.c (gnats): Set all three fields, don't leave alias blank.
	Make sure the responsible field was non-null.
	(append_report): Set the LAST_MODIFIED field.

	* Makefile.in (config.c): Depend on the Makefile.

Fri Jul 14 18:28:32 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* cmds.c (GNATS_resp): Don't check the responsible given to us,
	since it may be an old one that's not in either list.

Fri Jul 14 18:10:16 1995  Brendan Kehoe  <brendan@cygnus.com>

	* file-pr.c (gnats): If we got a null responsible field, just go
	with what we were given for the PERSON, since we don't want to
	make not having things listed in the responsibles file be painful.

	* files.c (find_responsible): Return 0 only on success; otherwise
	return -1.

Fri Jul 14 16:01:02 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* configure.in: Delete setting of HOESTNAME.
	* configure: Regenerate.

Thu Jul 13 12:17:07 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnatsd.c (main): Make sure they give us the space between the
	command and its arguments.

	* cmds.c (GNATS_auth): Say what host had authentication fail.

	* gnats-el.in (gnats:gnats-mode): Also call gnats::set-submitters.
	(gnats::mail-PR-changed): CC anyone listed in the notify field for
	a submitter, so they can see all traffic related to that ID.

	* gnats-el.in (gnats:unlock-buffer): Only ask to unlock the PR if it
	hasn't been unlocked already.

	* file-pr.c (gnats): Don't put name in parenthesis for Responsible name.
	(append_notify): Also check that responsible->key is non-nil.

	* file-pr.c (append_report): Cast 0 to time_t for call to time.
	(gnats): Expand arrival_time to 30 from 26.  Use strftime to set
	the arrival date, so it'll match the `>Last-Modified:' field.

	* file-pr.c: Include query.h.
	(check_if_reply): Use get_category to look up the PR based on its
	number, not accepting the category they told us.
	(start_data): New null function.

Wed Jul 12 19:07:44 1995  Ken Raeburn  <raeburn@cygnus.com>

	* Makefile.in (getdate.c): Pass "-d" so y.tab.h gets created.

	* client.c (client_init) [HAVE_KERBEROS]: Prefix authentication
	error message with program name.  Use strerror instead of perror.

	* cmds.c (GNATS_auth) [HAVE_KERBEROS]: Don't include ticket
	encoding in error message; that was for debugging only.

Wed Jul 12 11:55:03 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* Makefile.in (VERSION): Update to 3.92.

	* contrib/wwwgnats: Add March 15th release from Dan Kegel
	(dank@alumni.caltech.edu).

	* gnats-el.in (gnats:edit-pr): Give a message that we're fetching
	the PR.

	* Makefile.in (EMACS): Define variable to use ../emacs19/src/emacs if
	it's there.
	(gnats.elc): Use that instead of just `emacs'.

Mon Jul 10 13:18:18 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnats.h: Include pwd.h here.
	* client.c, cmds.c, files.c, npr-edit.c: Not here.

	* gnatsd.h: Include things like netinet/in.h here.
	* gnatsd.c, client.c, cmds.c: Not here.

	* query.h: Don't include gnatsd.h here.  Move client.c prototypes
	to gnatsd.h.
	* gnatsd.h: Put client.c prototypes here.
	* client.c, cmds.c, gnatsd.c: Include gnatsd.h here.

	* Makefile.in (VERSION): Update to 3.91.

	* client.c (get_reply, case CODE_INVALID_RESPONSIBLE): Handle case.
	(get_reply): Exit non-zero on codes we can't understand.
	* cmds.c (GNATS_mlpr): Use CODE_INVALID_RESPONSIBLE
	(GNATS_resp): Check the responsible address we're given.
	* edit.c (check_pr): Use get_responsible_address, not find_responsible.
	* files.c (find_responsible): Make it static.
	* globals.h (find_responsible): Delete decl.

Fri Jul  7 22:37:40 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* edit.c (modify_pr): Adjust date format for last-modified.

Fri Jul  7 21:45:51 1995  Brendan Kehoe  <brendan@rtl.cygnus.com>

	* gnats-el.in (gnats:unlock-pr): Fix list creation if we want to
	attach the host.
	(gnats:unlock-pr-force): Likewise.
	(gnats::check-pr): Likewise.

Fri Jul  7 10:40:53 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* pr-edit.c (main): Don't exit if we got no args.

	* gnats-el.in (gnats::lock): Pass --host=gnats:network-server to npr-edit.
	(gnats::check-pr): Likewise.
	(gnats::file-pr): Likewise.
	(gnats:unlock-pr): Likewise.
	(gnats:unlock-pr-force): Likewise.
	(gnats:query-pr): Likewise to nquery-pr.
	(gnats:net-view-pr): Likewise.

	Add `>Last-Modified:' field, to track when PRs are edited/changed.
	* pr.h (PR_Name): Add LAST_MODIFIED value.
	(LAST_MODIFIED_STRING): Define to `>Last-Modified:'.
	* pr.c (init_pr): Set LAST_MODIFIED name and type.
	* edit.c (modify_pr): Set the Last-Modified field just before we
	write it out. N.B.: We don't for SQL.
	* query.c (print_pr): Also write out last modified.
	* Makefile.in (edit.o, npr-edit.o, query.o): Also depend on pr.h.

	* gnatsd.conf: New file.

	* Makefile.in (install-gnats-bin): Install gnatsd in
	$(libdir)/gnats.  Put sample gnatsd.conf in gnats-adm if necessary.

	* configure.in: Update other messages to use AC_MSG_*.
	* configure: Regenerate.

	* gnatsd.c (allowed): Only allow i < 3.

	* configure.in: Also check for mktemp.
	* configure: Regenerate.
	* autoconf.h.in: Regenerate.
	* cmds.c (get_text) [!HAVE_MKTEMP]: Declare new var NAME, copying
	it into PATH after calling tmpnam.
	* internal.c (write_index) [!HAVE_MKTEMP]: Likewise.
	* queue-pr.c (drop_msg) [!HAVE_MKTEMP]: Likewise.

	* cmds.c (GNATS_mlpr): Add missing CODE_ERROR arg.

	* gnatsd.c (main): Move checking of the index, and give a message
	before we exit if it failed.

	* Makefile.in (LIBSRC): Add edit.c, getdate.c, internal.c,
	query.c, version.c.
	(LIBOBJS): Similar for .o files.
	(SOURCES, OBJECTS): Take them out of these.
	(pr-age, pr-edit, query-pr, nquery-pr, gnatsd, queue-pr, pr-addr,
	pr-age, pr-mail, npr-edit, pr-stat, gen-index): Update dependencies.

	* internal.c (unlock_quit): Add SIG argument, to avoid warnings.
	* main.c (unlock_death): Likewise.

	* getdate.y, getdate.c: Update files.
	* getdate.h: New file.
	* Makefile.in (getdate.c): Update rule to also move getdate.h.

	* queue-pr.c (run_gnats): Just call closedir.
	* gen-index.c (do_category): Likewise.
	* gnats-dirs.h: Delete defs related to CLOSEDIR_VOID.
	* autoconf.h.in (CLOSEDIR_VOID): Delete decl.
	* configure.in: Take out AC_FUNC_CLOSEDIR_VOID.
	* configure: Regenerate.

	* configure.in: Add AC_ARG_WITH mentions of the --with options.

Wed Jul  5 15:18:51 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* query.c (print_pr, FORMAT_SQL): Use field_value, to avoid nulls.

	* config.c.in (def_release): New, set to DEFAULT_RELEASE.
	* config.c: Regenerated.
	* Makefile.in (GNATS_DEFS): Also define DEFAULT_RELEASE.

	* configure.in (DEFAULT_RELEASE): Init to unknown.

	* cmds.c (do_query): Don't say end of list in here, since we may
	have told them it was a bogus one beneath lookup_pr_path.

	* query.c (get_pr): No need to call clean_pr, we do it inside
	read_pr.
	* cmds.c (verify): Set the AV variable to the full path, rather
	than having daemon_pr end up asking yet again for the path.

Wed Jul  5 08:04:32 1995  Brendan Kehoe  <brendan@cygnus.com>

	* cmds.c (GNATS_catg): Don't verify the category, it kills the
	ability to use a regexp.

Mon Jul  3 09:10:49 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* cmds.c (get_text): Free BUF and PATH when proper.
	(get_text, case PR_timeout): Jump to DIE.

	* client.c (tohex): Don't specify the length for the constant array.
	* cmds.c (get_text): Just allocate PATH instead of trying to use
	WORKNAME locally (PATH_MAX can be an expression, which is invalid
	as the array size on some systems).  Only allocate BUF after we
	know we're going to use it.

	* Makefile.in (GNATS_DEFS): Add definition of GNATS_SERVER.
	* configure.in: Check for --with-gnats-server.
	* configure: Likewise.

	* headers.c (header_value): Cast return of strdup.
	* pr.c (field_value): Likewise.
	* client.c (server_reply): Likewise.
	* cmds.c (GNATS_resp, GNATS_catg, GNATS_conf, GNATS_svty, GNATS_stat,
	GNATS_prio, GNATS_subm, GNATS_text, GNATS_mtxt): Likewise.
	* gen-index.c (main): Likewise.

	* Makefile.in (config.status): Add rule to reconfigure if the
	configure script has changed.

	* btime.c (get_response_time): Declare SECONDS to be time_t.
	* npr-edit.c (usage): Add missing newline.

Fri Jun 30 11:40:27 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* cmds.c (unify_addrs): Renamed from `sanitize'.  Actually write
	code for it now, sorting and unifying the list.
	(addr_cmp): New function.
	(GNATS_mlpr): Change usage of unify_addrs.  Make sure we free each
	after we print it.

	* headers.c (raw_header_value): New function.
	(header_value): Use it, consing up a null if we need to.
	* cmds.c (GNATS_mlpr): Insert anyone listed in the `X-GNATS-Notify:'
	header.
	(GNATS_edit): Don't give an error about a bad PR anymore; we do
	that beneath lookup_pr_path.

	* gnats.h (raw_header_value): Add decl.

	* cmds.c (GNATS_mlpr): Free PATH when we're done.

	* gnats-el.in (gnats::get-header): Move decl above gnats:submit-pr.

	* cmds.c (GNATS_mlpr): Use lookup_pr_path and get_pr.  Make sure we
	end ADDRS with a null.

	* gnats-el.in (gnats:net-view-pr): Only rename the buffer if it
	doesn't have a slash in it.

	* gnats-el.in (gnats::rename-buffer): New function.
 	(gnats:net-view-pr): Call it to rename the buffer to the category
	and id, not just the number.
	(gnats:gnats-mode): Replace the code with that call.

	* query.c (get_category): Use the INDEX_CHAIN if we have it,
	rather than re-read the index.  Speeds up a lot of things.

	* gnatsd.h (CODE_GNATS_LOCKED): Define.

	* internal.c (is_gnats_locked): New function.
	* gnats.h (is_gnats_locked): Add decl.
	* cmds.c (GNATS_edit): Call it before we say it's ok to send us
	anything.
	* client.c (get_reply): Handle CODE_GNATS_LOCKED.
	* gnats-el.in (gnats::cannot-lock): Define error.
	(gnats:submit-pr): Add ellipsis.
	(gnats::pr-edit): Catch when we can't create the lock file.
	
	* internal.c: Include gnatsd.h.
	(is_daemon): Add decl.
	(lock_gnats): Make return value int.  Emit daemon errors if
	IS_DAEMON is true.  Give the error in the message.
	(unlock_gnats): Don't exit if IS_DAEMON.

	* main.c (is_daemon): Define.
	* queue-pr.c (is_daemon): Likewise.

	* gnats-el.in (gnats::pr-edit): Recognize the error that we can't
	create the lock file.
	(gnats::cannot-lock): Add error.

	* gnats.h (lock_gnats): Fix return value.
	* gnatsd.h (CODE_GNATS_LOCKED): Declare.
	* cmds.c (GNATS_edit): New label editout; go there if locking
	fails, don't keep going.

	* cmds.c (GNATS_edit): Turn back on the code to remove GIVEN.

	* pr-age.c (report_age): Only use get_pr, not it and do_pr_internal.
	* pr-stat.c (do_stat): Likewise.
	* query-pr.c (query_pr): Only use do_pr_internal, not it and get_pr.

	* query.c (get_pr): Delete EXISTP argument.
	(do_pr_internal): Delete third arg EXISTP.
	(print_pr): Delete third arg to get_pr.
	(do_pr): Likewise to do_pr_internal.
	* pr-age.c (report_age): Remove third arg to get_pr and
	do_pr_internal.
	* cmds.c (lookup_pr_path): Use fopen instead of get_pr.
	(daemon_pr): Delete third arg to get_pr.
	* query.h (get_pr): Likewise.
	* pr-age.c (report_age): Likewise.
	* query.c (do_pr_internal): Likewise.
	* query-pr.c (query_pr): Likewise.
	* pr-stat.c (do_stat): Likewise.

	* gnats-el.in (gnats::mail-PR-changed): New arg NOTIFY.  Push it
	onto the CC list if it's set.
	(gnats:submit-pr): Pass any value for "X-GNATS-Notify" to it.
	* headers.h (X_GNATS_NOTIFY): Add decl.
	* headers.c (init_header): Give it default of `X-GNATS-Notify:'.
	* Makefile.in (file-pr.o, npr-edit.o, query.o): Depend on headers.h.

Thu Jun 29 15:16:06 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnats-el.in (gnats:unlock-pr-force): Don't be interactive. 
	(gnats:unlock-buffer): Put the leading dots back in, duh.
	(gnats::delete-file): New function.
	(gnats:unlock-buffer): Use it instead of doing concat repeatedly.
	(gnats:net-view-pr): Refer to ID, not PR.
	(gnats:keep-sent-messages): Don't refer to vm-keep-sent-messages.

	* gnats-el.in (gnats::pr-edit): New arg FORCE.
	(gnats::pr-edit): Recognize "PR is not locked", and only signal of
	FORCE is nil.
	(gnats::unlock-all-buffers): Pass T to FORCE.
	(gnats::kill-buffer-hook): Likewise when killing it.
	(gnats:kill-buffer): Likewise.
	(gnats-mode-map): Make `C-c C-q' call gnats:unlock-buffer-force.
	(gnats:unlock-pr-force): New function, passing T to FORCE in
	gnats::pr-edit.
	(gnats:unlock-buffer): Call gnats:unlock-pr-force.
	(gnats::unlock-all-buffers): Likewise.

	* client.c (get_reply): Don't try to get the PR number.

	* gnats-el.in (gnats::get-list-from-file): Add a period between BN
	and FILENAME.  New arg DESC, used in the Parsing line.
	(gnats:unlock-buffer): Don't use leading periods on the suffix for
	eac file.
	(gnats::set-responsibles, gnats::set-categories,
	gnats::set-submitters): Take off the leading period, passing name
	along with the file.
	(gnats::reset-variables): New function.

Wed Jun 28 08:41:25 1995  Brendan Kehoe  <brendan@cygnus.com>

	* gnatsd.c (cmds): Set FLAG_NEED_AUTHORIZATION on LCAT, LSUB, and
	LRES.

Tue Jun 27 11:58:10 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnats-el.in (gnats::query-pr-default-options): Don't add --host
	for the network one.

Mon Jun 26 08:18:00 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnats-el.in (gnats:net-view-pr): New function.
	(gnats:view-pr): Use it when appropriate instead of view-file.

	* Makefile.in (prefix, exec_prefix): Fix settings.
	* man/Makefile.in (prefix, exec_prefix): Likewise.
	(Makefile): Add rule.

	* gnatsd.c (allowed) [HAVE_KERBEROS]: Set FOUND as well.
	(start_connection): Don't bother setting HOST_VERIFIED anymore.
	(main): Check KERBEROS_HOST before complaining about
	authentication.  Don't complain about using HELO.
	* cmds.c (host_verified): Removed decl.
	(GNATS_helo): Change saying we're not needed anymore.
	* client.c (client_init): Don't write HELO.
	
	* Makefile.in (lists.o): Add dependencies.

	* gnats-el.in (gnats::vmish-restore-mail-buffer): Take argument BUF.
	(gnats::vmish-rename-mail-buffer): Likewise.
	(gnats::vmish-mail): Pass it after doing the get-buffer here.
	(gnats::rw): Move definition above gnats::pr-edit, where we use it. 
	(gnats::mode-name): Add definition.

	* gnats-el.in (gnats:edit-pr): Put the PR number in the name of the
	`*edit-pr*' buffer.
	(gnats:unlock-buffer): Likewise for `*edited-pr*' buffer.
	(gnats::get-list-from-file): Save gnats:::backupname before we
	change to the grok buffer.
	(gnats::vmish-mail-other-window): Make BUF local to here.
	(gnats::vmish-mail): And here.
	(gnats::vmish-rename-mail-buffer): Not here.

Sun Jun 25 19:40:22 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnats-el.in (gnats::vmish-rename-mail-buffer): Make BUF a local
	variable.
	(gnats::vmish-mail-other-window): Remove unneeded BUF.
	(gnats::vmish-mail): Likewise.

Fri Jun 23 08:07:17 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* gnats-el.in (gnats:gnats-mode): Don't set the backupname here.
	(gnats::pr-edit): Delete arg NETBUF; don't use it.  Adjust to
	recognize both messages about a non-existant PR.
	(gnats::lock): Delete arg NETBUF.
	(gnats:unlock-buffer): Delete the lists as well if we're doing the
	network one.
	(gnats::set-responsibles): If it's the network one, get the list
	that we transferred over rather than using the responsible file.
	(gnats::set-categories): Likewise for categories.
	(gnats::set-submitters): Likewise for submitters.
	(gnats::get-list-from-file): Use the backupname rather than
	gnats-adm stuff if it's the network one.
	(gnats:edit-pr): Declare NEWFILE as a full-level local var.  Fixup
	the condition-case to deal with both fairly well.  Most important:
	set PERMANENT-LOCAL on gnats:::backupname, so the kill of all local
	vars in gnats::gnats-mode doesn't wipe it out.

	* gnats-el.in (gnats::lock): Add --get-lists to the network run.
	(gnats::set-responsibles): Pass `.res' to get-list-from-file if
	doing the network.
	(gnats::set-categories): Likewise for `.cat'.
	(gnats::set-submitters): Likewise for `.res'.
	(gnats::get-list-from-file): Use gnats:::backupname and the suffix
	if we've got a network server.
	(gnats:unlock-buffer): Delete the other files as well.

	* Makefile.in (VERSION): Boost to 3.90.

	* lists.c: New file.
	* Makefile.in (LIBSRC): Add lists.c.
	(LIBOBJS): Add lists.o.
	* gnats.h (get_gnats_file): Add decl.
	* query-pr.c (main): If we asked for a list, call get_gnats_file.
	* npr-edit.c (long_options): Add -g/--get-lists.
	(main): Handle it.
	(get_list): New function.

Thu Jun 22 07:56:32 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* cmds.c (GNATS_auth): Fix some argument passing.
	* query-pr.c (long_options): Add --list-categories,
	--list-responsible, --list-submitters.
	(main): Deal with j, k, and l in the getopts.
	(usage): List them.
	* nquery-pr.c: Likewise.
	(list_format): Define this here, since we don't use query.o.
	(ask_about): Send LCAT/LRES/LSUB to the server. 
	* query.c (list_format): Define variable.
	* query.h (LIST_CATEGORIES, LIST_SUBMITTERS, LIST_RESPONSIBLE):
	Define.
	(list_format): Add extern decl.
	* gnatsd.c (cmds): Add LRES and LSUB.
	* cmds.c (GNATS_lres, GNATS_lsub): New functions.
	(noargs): New function to say the command takes no arguments.
	(GNATS_nocl): Use it.
	(GNATS_help): Add LRES and LSUB.

	* Makefile.in (install-tools-bin): Don't install npr-edit as
	setuid gnats, since it doesn't need to be.

	* gnats-el.in (gnats:gnats-mode): Only do things on
	gnats:::backupname if it's non-nil.
	(gnats:view-pr, gnats:edit-pr): Don't dive after the category if
	gnats:network-server is set; we don't really need to go after it
	anyway.  In gnats:edit-pr, set gnats:::backupname here if we're
	doing the network stuff; set it to nil otherwise.

	* npr-edit.c (main): Default result to 1, not 0.  Don't exit if we
	didn't get any arguments.  Check OUTFP, not FP, for -o.

	* gnats-el.in (gnats::lock): Add `-o gnatsXXXXX' if we're doing the
	network one.
	(gnats:submit-pr): Clear gnats:::pr-locked after filing it, if it's
	the network.

	* client.c (outfp): The file to print the results to; stdout by
	default.
	(read_server): Use it.
	(get_reply, case CODE_INFORMATION): Likewise.
	* query.h (outfp): Add decl.

	* npr-edit.c (long_options): Add -o/--outfile.
	(main): Recognize it.

	* gnats-el.in (gnats::pr-edit): Also don't kill it if NETBUF is true.

	* client.c (get_reply, case CODE_LOCKED_PR): Cut off \n.

	* cmds.c (GNATS_edit): Use chk_nargs.

	* npr-edit.c (main): Don't try to lock/unlock GNATS itself in here.
	(net_check_pr): Call init_gnats.

	* gnats-el.in (gnats::pr-edit): Recognize npr-edit as well.  Only
	check that the file exists if we're not using the network.
	(gnats::lock): Add optional arg NETBUF, passing it into gnats::pr-edit.
	(gnats:edit-pr): Add optional arg NETBUF.  Shift things around if
	we're doing the network stuff, and pass the buffer into gnats::lock. 

	* client.c (PUNT): Only print it if debug is set.
	(get_reply, case CODE_LOCKED_PR): Notice when they're locked.

	* gnats-el.in (gnats::pr-edit): Run npr-edit if gnats:network-server
	is set.

	* client.c (client_exit): Flush servread.
	(safe_exit): Call client_exit.
	(get_reply, case CODE_PR_NOT_LOCKED): Recognize the result and say
	that it was locked.

	* npr-edit.c: New file; network version of pr-edit.c.
	* Makefile.in (npr-edit, npr-edit.o): New rules.
	(install-tools-bin): Install npr-edit.  Also make it setuid gnats.
	(uninstall): Uninstall npr-edit too.
	(doclean): Also remove npr-edit.

	* cmds.c (get_text): Don't set the umask to 0.
	* gnatsd.c (main): Likewise.

	* gnatsd.h (CODE_PR_NOT_LOCKED): Declare.
	* cmds.c (GNATS_edit): Check to make sure that the PR is locked
	before we agree to edit it.  Don't lock it here.
	(GNATS_lock): Pass the second arg to daemon_lock_pr.
	(daemon_lock_pr): New arg W, passed to lock_pr instead of "GNATS
	daemon".

	* nquery-pr.c (main): Add `H:' to the getopt args.

	* pr-edit.c (main): Give usage if they didn't give us any
	arguments.  Add `LU' to getopt args.

	* gnats-el.in (gnats:network-server): Add variable.
	(gnats::query-pr-default-options): Add --host if
	gnats:network-server is true.
	(gnats:query-pr): Run nquery-pr if gnats:network-server is true. 

	* cmds.c: Flush after some printfs that then wait for input other
	than what we do in main.
	(get_text): Return NULL, don't exit.

	* gnatsd.h (CODE_INVALID_RESPONSIBLE): Define.
	* cmds.c (get_text): Finish creation and use of the tmp file.
	(GNATS_edit): Also remove `given'.  Reorganize the code a bit.

	* edit.c (check_pr): Adjust code for the daemon.
	(modify_pr): Rename var `outfile' to `prfile'.
	(check_pr, lock_pr, unlock_pr): Likewise.

Wed Jun 21 09:21:44 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* cmds.c (GNATS_helo): Also mention what host connected when we say
	that the given hostname was denied.
	(GNATS_auth): Put srvtab in gnats-adm, not in gnats_root.

Tue Jun 20 14:20:16 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* client.c (get_reply): Deal with getting REPLY_CONT replies for
	GREETING.

	* gnatsd.c (main): Have syslog note when a command is attempted
	without authentication turned on.

	* gnatsd.c (start_connection): Tell them they need to use
	authentication if kerberos_host is true.
	(allowed) [HAVE_KERBEROS]: Set kerberos_host to 1.
	(main): Set host_verified and client_authorized if not_inetd.
	
	* gnatsd.c (kerberos_host) [HAVE_KERBEROS]: Add definition.
	(main) [HAVE_KERBEROS]: Zero out kerberos_host and client_authorized.
	* cmds.c (kerberos_host): Add decl.

Thu May  4 13:52:30 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* aclocal.m4: Use AC_MSG_RESULT for checking of `diff -u'.
	* configure: Regenerate.

	* cmds.c (GNATS_subm): Don't check the submitter, it may be a regexp.

Mon May  1 11:07:04 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* configure.in: Add AC_FUNC_CLOSEDIR_VOID.
	* configure: Regenerate.
	* autoconf.h.in: Regenerate using autoheader.

	* gnats-dirs.h: Redo using better approach.

	* acconfig.h: New file, doing undef of HAVE_KERBEROS.
	* autoconf.h.in: Regenerate using autoheader.

	* gnatsd.c (client_authorized): Only declare if HAVE_KERBEROS.
	(main): Only complain about not having authorization if HAVE_KERBEROS.
	* cmds.c (client_authorized) [HAVE_KERBEROS]: Add extern decl.

Fri Apr 28 15:05:17 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* configure.in: Define HAVE_KERBEROS if the krb library check
	succeeded.  Move the setting of KRBINCLUDE up.  Don't check for
	alloca.h in AC_HAVE_HEADERS, since we added AC_ALLOCA.

	* autoconf.h.in: Cleanup, moving things around and adding a few.

	* config.c.in (gnats_root): Initialize with NULL, not 0.
	(configure): Use xfree instead of free.
	(string_extract_double_quoted): Likewise.
	* config.c: Generate new one.

	* configure.in: Add AC_ALLOCA.  Try for connect before going for
	nsl and socket.  Add a messages that we're checking for krb.h.
	* configure: Generate new one.

	* Makefile.in (KRBINCLUDE): Add setting.
	(INCLUDEDIR): Add KRBINCLUDE.

	* gnatsd.c (client_authorized): Declare.
	(FLAG_NEED_AUTHORIZATION): Define.
	(struct _command): Add `flags' field.
	(cmds): Add FLAG_NEED_AUTHORIZATION to QURY, SUMM, FULL, SQLF,
	LOCK, EDIT, UNLK, MLPR, MLCT, MLSU, TYPE, RESP, CATG, ORIG, and
	SUBM.
	(get_name): Fix order of args to strcpy.
	(main): Check FLAG_NEED_AUTHORIZATION before doing the action.

	* cmds.c (MAXLINE): Delete decl.
	(GNATS_auth): Don't define GNATS_KRB4_PRINCIPAL_NAME.
	(GNATS_auth) [HAVE_KERBEROS]: Rewrite.

	* client.c (get_reply) [case CODE_NO_KERBEROS]: Give a
	Kerberos-specific error.
	(tohex, hexdigit, fromhex): New functions.
	(client_init) [HAVE_KERBEROS]: Rewrite.

	* gnatsd.h (GNATS_KRB4_PRINCIPAL_NAME, GNATS_KERB4_VERSIONID): Define.

Mon Apr 17 18:09:24 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* mail-query.sh: Add `set -f' as we get going.

Wed Apr 12 20:54:50 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* configure.in: Use stuff in autoconf 2.3, changing things
	where necessary.  Added AC_SUBST of HAVE_KERBEROS.
	* configure: Generated new one.

Wed Mar 22 12:17:45 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* cmds.c (GNATS_helo): Say what we think the hostname is when we
	deny the connection.

	* client.c (reply): Put definition here.
	* sub-type.c (serv_write, serv_read): Remove definitions, they're
	in client.c.
	(gnats_server): Remove decl, it's in query.h.
	* nquery-pr.c (serv_write, serv_read, gnats_server): Remove decls.
	(reply): Remove definition.
	* pr-mail.c (reply): Remove definition.

Mon Feb 20 11:21:11 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* cmds.c (GNATS_help): Mention TYPE.

Thu Feb 16 00:04:20 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnatsd.c (basename): Delete decl, it's in gnats.h.

Wed Feb 15 15:48:28 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnatsd.c (start_connection): Use LOG_INFO, not LOG_NOTICE.
	* cmds.c (GNATS_helo): Only use LOG_INFO priority for verified
	hostnames; still use LOG_ERR for denied hostnames.

	* gen-index.c (next_category): Check for EOF first, then allocate
	the variables.  Create new label RETRY, to grab the next line, and
	change all gotos to choose that instead of NO_ENTRY.
	(catfile): New variable.
	(long_options): Recognize -c/--catfile.
	(get_categories): Use it if it's set.
	(usage): Mention the new arg.

	* gnatsd.c: Don't include errno.h, it's in gnats.h.

	* gnats.h: Include stdarg.h or vararg.h here.
	* internal.c, misc.c: Not here.

	* btime.c, file-pr.c, nquery-pr.c, query-pr.c: Don't include
	time.h, it's in globals.h.

	* client.c, edit.c, file-pr.c, files.c, gen-index.c, headers.c,
	internal.c, main.c, nquery-pr.c, pr-edit.c, pr-mail.c, pr.c,
	gnatsd.c, query-pr.c, queue-pr.c, sub-type.c: Don't try to include
	sys/types.h, it's in gnats.h.

	* edit.c, internal.c, pr-edit.c, pr.c, file-pr.c: Don't include
	sys/stat.h, it's in gnats.h.

	* client.c, cmds.c, edit.c, file-pr.c, files.c, gen-index.c,
	globals.h, headers.c, main.c, misc.c, nquery-pr.c, pr-addr.c,
	pr-edit.c, pr-mail.c, pr.c, gnatsd.c, query-pr.c, queue-pr.c,
	sub-type.c: Don't include stdio.h here, it's in gnats.h.

	* gnats.h: Include signal.h here.
	* file-pr.c, index.c, internal.c, main.c, misc.c, gnatsd.c: Not here.

	* file-pr.c, headers.c, pr.c: Don't include limits.h, it's in
	pathmax.h.

	* gnats.h: Include getopt.h here.
	* edit.c, main.c, nquery-pr.c, pr-addr.c, pr-age.c, pr-edit.c,
	pr-mail.c, pr-stat.c, gnatsd.c, query-pr.c, queue-pr.c, sub-type.c:
	Don't include it in here.

	* gnats.h [HAVE_SYSLOG_H]: Include syslog.h here.
	* edit.c, file-pr.c, files.c, headers.c, internal.c, main.c,
	misc.c, pr-edit.c, pr.c, gnatsd.c, queue-pr.c, resp-lookup.c: Not
	in these.

	* gen-index.c, queue-pr.c, main.c: Don't include unistd.h in here.

	* globals.h: Don't include files.h, gnats.h already does.

	* gnats.h: Include pathmax.h here.
	* cmds.c, edit.c, file-pr.c, files.c, gen-index.c, index.c,
	internal.c, misc.c, pr-age.c, pr-edit.c, pr-stat.c, gnatsd.c,
	query-pr.c, query.c, queue-pr.c: Not here.

	* globals.h: Don't include pr.h or headers.h, gnats.h does.
	* file-pr.c: Don't include headers.h.
	* headers.c: Likewise.

	* globals.h (basename): Delete decl, it's in gnats.h.

	* gnats.h: Include regex.h here; don't try for rx.h.
	* gnatsd.c, file-pr.c, query.c, query-pr.c: Not here.

	* edit.c, globals.h, main.c, pr-edit.c: Don't try to include
	<ansidecl.h> here, it's in gnats.h.

	* cmds.c (GNATS_helo): Note to syslog for a successful or
	unsuccessful connection.

Mon Feb 13 00:20:28 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* getdate.y (const) [!__GNUC__]: Undef if we aren't using gcc.
	* getdate.c: Regenerated.

	* Makefile.in (file-pr.o): Also depend on gnats.h.
	(getdate.c): Expect 10, not 9, conflicts.

	* gnats.h: Add stuff to handle alloca.
	* autoconf.h.in (HAVE_ALLOCA_H): Add undef.
	* configure.in: Look for alloca.h.
	* configure: Generated new one.

	* pr.c (read_pr): Call clean_pr before reading it in.

	* cmds.c (GNATS_lcat): New function, to give the list of available
	categories.
	* gnatsd.c (cmds): Add LCAT.
	(GNATS_lcat): Add decl.
	(GNATS_help): List the command.

	* cmds.c, config.c, file-pr.c, files.c, gen-index.c, headers.c,
	index.c, internal.c, main.c, misc.c, queue-pr.c, resp-lookup.c:
	Don't need to include globals.h, it's in gnats.h.
	* pr.c: Doesn't need to include either globals.h or pr.h.

	* index.c (index_chain): Put the decl in here.
	* globals.h (index_chain): Add extern decl.
	* pr-age.c, pr-stat.c, gnatsd.c: Not in these.

	* pr-edit.c (basename): Don't need the decl in here.

	* gnatsd.c (version_string): Don't need decl, it's in globals.h.
	* gen-index.c, nquery-pr.c, pr-addr.c, pr-edit.c, pr-mail.c,
	query-pr.c, sub-type.c: Likewise.

	* files.c (find_category): Renamed from `find_categories'.
	* cmds.c, edit.c, file-pr.c: Change callers.

	* internal.c (add_to_index): Wipe out BUF before we try to write
	to it.
	* files.c (find_responsible): Also check of PERSON is a null string.

	* files.c (get_responsible_address): Make sure the alias is set if
	we want to see if it's defined to be a null.

Sun Feb 12 23:28:15 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* cmds.c: Also include sys/param.h for MAXHOSTNAMELEN.

Tue Feb  7 15:31:32 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* files.c (init_responsibles): Zero out the path before writing to
	it.

	* query.c (get_category): Close the file before we may return.

	* query-pr.c (main): Say no PRs matched here.
	(query_pr): Not here.

	* edit.c (check_pr): Cut off the name in parenthesis.

	* file-pr.c (arg_quote): Do 2*(strlen + 1).

	* Makefile.in (install-info): Depend on gnats.info.
	(install-gnats-bin): Tell them to run mkcat.

	* mkdist.sh (lispdir): Set to site-lisp.
	(all): Depend on send-pr.elc.
	(install): Install send-pr.el*.
	(clean): Also remove install-sid, and remove send-pr.el*.

	* client.c (client_init): Say what host we're connecting to.

	* configure.in: Only try for Kerberos stuff if they used
	--with-kerberos.

	* gnats-el.in (gnats::mode-name): Add declaration before fset.
	(gnats-mode): Do fset with unquoted mode-name.
	(gnats:gnats-mode): Use unquoted mode-name.
	(gnats::unlock-all-buffers): Likewise.
	(make-auto-save-file-name): Make a method of `gnats::'.  Rewrite a bit.

	* files.c (find_responsible): No longer static.  Rewrite to accept
	an argument of a Responsible*.  Return an int to match the other
	find_* routines.
	(get_responsible_address): Use new method for find_responsible.
	* globals.h (find_responsible): Add decl.

	* headers.c (read_header): Return int; give -1 if we're at the
	EOF, otherwise return 0.
	* file-pr.c (append_report): Use the return value of read_header.
	* gen-index.c (do_category): Likewise.
	* main.c (main): Likewise.
	* query.c (get_pr): Likewise.
	* gnats.h (read_header): Change declaration.

	* pr-edit.c (main): Don't lock/unlock if we're just doing CHECK.

	* gnats.h: Include globals.h.
	* globals.h (pr): Declare `pr' here.
	* pr-age.c (pr): Don't declare here.
	* pr-stat.c (pr): Likewise.
	* query-pr.c (pr): Likewise.
	* query.c (pr): Likewise.

	* edit.c (check_pr): Verify the category, submitter, and
	responsible as well.

Thu Feb  2 13:05:04 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnatsd.c (main): If we're not running as inetd, set current_host
	to be myname.
	* gnatsd.h (CODE_AUTH_TYPE_UNSUP): Declare.

	Add support for Kerberos.
	* autoconf.h.in (HAVE_KERBEROS): Declare.
	* configure.in: See if we have Kerberos.
	* configure: Generate new one.
	* client.c [HAVE_KERBEROS]: If declared, include the right files.
	(get_reply): Recognize CODE_NO_KERBEROS with CODE_NO_ACCESS.
	(client_init) [HAVE_KERBEROS]: Do AUTH and Kerberos setup.
	* cmds.c [HAVE_KERBEROS]: If declared, include the right files.
	(GNATS_auth) [HAVE_KERBEROS]: Deal with Kerberos authentication.

	* client.c: Also include sys/param.h, since MAXHOSTNAMELEN under
	SunOS4 is in there.

	Force them to use HELO, and verify what they told us is true.
	* gnatsd.c (current_host): Add decl.
	(start_connection): Set CURRENT_HOST.
	(host_verified): New variable.
	(main): Use fprintf, not printf.
	* query.h (current_host): Add decl.
	* cmds.c (GNATS_helo): Call name_verify, and complain if it doesn't
	match what they gave us.
	(name_verify): New function.
	(host_verified): Add decl.

	* gnatsd.h (get_line): Add decl.
	(CODE_LOCKED_PR): Add decl.
	* gnats.h (clean_pr): Add decl.
	* cmds.c: Include globals.h.
	(chk_nargs): Add decl.  Make it static.
	(GNATS_edit): Delete vars P and STATUS.
	(GNATS_mlpr): Delete vars I and PERSON.
	* Makefile.in (cmds.o): Depend on globals.h
	* file-pr.c (free_responsible): Don't declare it here.
	* globals.h (free_responsible): Declare it here.
	* edit.c (lock_pr): Give CODE_LOCKED_PR for locked files.
	* sub-type.c: Include query.h instead of gnatsd.h.
	(main): Delete unused var ARG.
	(sockfd): Delete variable decl.
	(MAXLINE): Delete decl.
	* client.c (client_exit): If debug is set, tell how we're saying QUIT.

	* gnatsd.h (CODE_HELLO): Add declaration.
	* cmds.c (GNATS_helo): Use it.
	(get_reply): Listen to CODE_HELLO.
	* client.c (client_init): Find out our hostname and say HELO.
	(get_reply): Handle CODE_NO_ACCESS.

	* cmds.c: Include netdb.h, not sys/param.h.
	(GNATS_helo): Use fprintf, not printf.
	(GNATS_quit): Likewise.
	(chk_nargs): Likewise.

	* query-pr.c (query_pr): Just say that no PRs matched.

	* index.c (find_pr_category): Make local category static, and
	initialize it to 0 before we go into the loop.

	* Makefile.in (all-tools): Don't depend on pr-stat.
	(install-tools-bin): Don't install it.
	(uninstall): Don't try to remove it.

Mon Dec 19 13:56:09 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* Makefile.in (DISTFILES): Add pr-stat.c.
	(all-tools): Add pr-stat as a dependency.
	(pr-stat, pr-stat.o): Add rules.
	(doclean, uninstall): Add pr-stat.

	* pr-stat.c: New file.

Wed Nov  9 12:27:52 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* client.c (get_reply): Give the name of the category or submitter
	that they asked about, but didn't exist.

	* cmds.c (GNATS_mlsu): Use CODE_INVALID_SUBMITTER, not CODE_ERROR.

Tue Nov  8 14:16:49 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* file-pr.c (check_if_reply): Cast xfree args to char*. 
	* gnatsd.c (Argify): Likewise.
	* gen-index.c (next_category): Likewise.

	Move common client stuff into one file.
	* client.c: New file.
	* Makefile.in (sub-type, pr-mail, nquery-pr): Depend on client.o.
	* query.h: Include gnatsd.h.
	(MAXLINE): Put decl in here.
	(server_reply, read_server, get_reply, safe_exit, client_init,
	client_exit): Add decls.
	(gnats_server, serv_write, serv_read, sockfd): Likewise.
	* pr-mail.c: Include query.h.
	* Many files: Just include query.h, not that and gnatsd.h.
	* sub-type.c, nquery-pr.c, pr-mail.c, pr-age.c: Move stuff into
	client.c.  Replace stuff with calls to client_init and client_exit.
	* nquery-pr.c, pr-age.c, pr-mail.c, sub-type.c: Take out unistd/string
	includes, they're in gnats.h. 
	(serv_write, serv_read, sockfd): Make extern.
	(name): Make global extern.
	* gnats.h [HAVE_STRING_H || STDC_HEADERS]: Add checks for index and
	rindex.

	* files.c (get_adm_record): Use strncasecmp, not strncmp.

	* sub-type.c: New file to find the type of a submitter.
	* cmds.c (GNATS_type): New function.
	* gnatsd.c (cmds): Add TYPE.
	(GNATS_type): Add decl.
	* Makefile.in (DISTFILES): Add sub-type.c.
	(sub-type): New rule.
	(all-tools): Build it.
	(install-tools-bin): Install sub-type.
	(uninstall): Delete it.
	(doclean): Likewise.

Wed Oct 19 09:49:22 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* edit-pr.sh (pr): Say the PR wasn't in the index, not just `file
	not found'.
	(debug_print): Declare variable to let you see where things are going.

Tue Oct 18 13:12:16 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnatsd.c (GNATS_unlk): Free PATH after we've unlocked it.

	* query-pr.c (xmalloc, basename): Delete decls, since they're in
	gnats.h.

	* headers.c (clean_header): New method to wipe out the VALUE
	entries.  No need to reset the NAME in every one.
	(init_header): Take it out of here.
	(read_header): Call clean_header instead.
	* pr.c (clean_pr): New method to do the same for the PR entry.
	(init_pr): Taken it out of here.
	* query.c (get_pr): Call clean_pr instead of init_pr.
	* gnats.h (clean_header, clean_pr): Add decl. 

	* cmds.c (verify): Call xfree instead of free.
	(daemon_pr): Likewise.
	(GNATS_edit): Likewise.
	(GNATS_orig): Likewise.
	(GNATS_clss): Likewise.
	* config.c (configure): Likewise.
	(string_extract_double_quoted): Likewise.
	* edit.c (lock_pr): Likewise.
	(unlock_pr): Likewise.
	* file-pr.c (run_atpr): Likewise.
	(check_if_reply): Likewise.
	(notify_responsible): Likewise.
	(append_report): Likewise.
	(free_submitter): Likewise.
	(free_category): Likewise.
	* files.c (free_responsible): Likewise.
	* gen-index.c (do_category): Likewise.
	(next_category): Likewise.
	(get_categories): Likewise.
	* headers.c (set_continued_header): Likewise.
	* index.c (create_index_entry): Likewise.
	(next_index_entry): Likewise.
	(open_index): Likewise.
	* pr.c (read_pr): Likewise.
	* query-pr.c (query_pr): Likewise.
	* gnatsd.c (Argify): Likewise.
	* query.c (do_pr): Likewise.
	* queue-pr.c (run_gnats): Likewise.
	* gnatsd.c (Argify): Call xmalloc instead of malloc.

	* headers.c (lookup_header): Return -1 right away if STRING is
	null; only check its length once.

	* pr.c (read_pr): Make sure we free UNFORMATTED if we don't end up
	using it.  Only alloc space for BUFFER and UNFORMATTED after we
	know we're going to be able to look at a file.

Mon Oct 10 10:26:46 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* contrib/prmon: Match *.K and *.U, not "*.K" and "*.U".

Thu Oct  6 15:24:12 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* misc.c (get_next_field): If the line ends with a newline, take
	it off.

	* pr-addr.c (long_options): Put null entry at the end.

Wed Oct  5 13:41:40 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	Enable remote editing of PRs.
	* cmds.c (get_text): New function to read a PR in from the link.
	(GNATS_edit): Actually do everything.
	(lookup_pr_path): New function.
	(verify): Use lookup_pr_path.
	(daemon_pr): Likewise.  Only look the PR's path up if we aren't
	already being given one.
	* gnatsd.h (MsgType): Put decl here.
	* gnatsd.c (MsgType): Not here.
	(is_daemon): Add 1 definition.
	(main): Set up the umask.
	* edit.c: New file.
	* pr-edit.c (modify_pr, check_pr, lock_pr, unlock_pr, get_path): Move
	the methods into there.  Add support for checking IS_DAEMON.
	(is_daemon): Add 0 definition.
	* gnats.h: Add decls for stuff in edit.c.
	(CODE_NO_INDEX, CODE_FILE_ERROR): Declare.
	(is_daemon): Add extern decl.
	* Makefile.in (gnatsd, pr-edit): Reference edit.o.
	(gnatsd): Now add internal.o. 

	* Makefile.in (install-tools-bin): Also install nquery-pr.

Wed Oct  5 12:21:04 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* mkdist.sh (FILES): Add INSTALL and MANIFEST.

	* gnats-el.in (gnats::mail-PR-changed): Set DEFAULT-DIRECTORY before
	switching buffers.
	(gnats::real-pr-addr): Likewise, before call-process.
	(gnats::pr-edit): Likewise, before running COMMAND.

Thu Sep 29 18:39:44 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* configure: Generate a new one using the LISPDIR fix from aclocal.m4.

Wed Sep 28 13:24:47 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* cmds.c (do_query): Don't talk about PRs coming, since start_data
	does that for us now.

	* query.c (print_path): Define it here.
	* nquery-pr, query-pr: Not in these.

	* nquery-pr.c (main): Don't accept -P/--print-path for network queries.

Tue Sep 27 13:13:05 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* query.c (print_pr): Send the emacs fmt if PRINT_PATH is set.
	* query.h (print_path): Declare here.

Fri Sep 23 13:01:52 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* nquery-pr.c (get_reply): Say that no PRs matched.
	* query.c (print_pr): Call start_data here.
	(do_pr): Not here.
	* query-pr.c (query_pr): Say no PRs matched if !FOUND and P is
	null.

	* query.c (regcmp) [USE_RX]: Cast 1 to char*.
	(regfind) [USE_RX]: Likewise.

	* pr-age.c: Include getopt.h.
	(business_time): Declare.
	(long_options): define.
	(main): Run down the arglist.
	(usage): Give new arglist.

	* cmds.c (sanitize): New function, to avoid many repeated
	addresses for MLPR, et al.
	(GNATS_mlpr): Print out the results of calling sanitize.

	* Makefile.in (all-gnats): Build gnatsd.  Removed config-send-pr,
	since it's brought in by all-tools.
	(all-tools): Build nquery-pr.

	* pr-mail.c (get_reply, case CODE_INFORMATION): Take off the
	linefeed in what we receive.

Tue Sep 20 12:25:20 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* query-pr.c (main): Set, don't OR, the different FORMATs.

	* query.c (class): Declare.
	(do_pr_internal): Look at the CLASS of the PR if asked.
	* query-pr.c (long_options, usage): Add -L.
	* nquery-pr.c (class): Declare.
	(long_options, usage): Add -L.
	(ask_about): Send the CLSS command if asked.
	* cmds.c (GNATS_clss): Add function.
	(GNATS_help): Add CLSS command.
	* p-usage.texi (Searching criteria): Document -L/--class.
	* gnatsd.c (cmds): Recognize CLSS.
	(GNATS_clss): Add decl.

	* gnats-el.in (gnats::mail-reply-using-mhe): Look for the
	`Reply-To:' header before FROM to set REPLY-TO.

Mon Sep 19 15:21:03 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* pr-age.c: New file.
	* Makefile.in (DISTFILES): Add pr-age.c.
	(all-tools): Also build pr-age.
	(install-tools-bin): Add pr-age and pr-mail.
	(uninstall): Delete them.
	(doclean): Likewise.
	(pr-age.o): Add dependencies.

	* cmds.c (outfile, skip_closed, quiet): Deleted.
	(outfile): Add extern decl.
	* gnatsd.c: Include query.h.
	(originator, text_search, m_text_search, searching): Deleted.
	(main): Set QUIET here, and check if INDEX_CHAIN is null.
	* query-pr.c (outfile, originator, text_search, m_text_search,
	searching, skip_closed, quiet): Deleted.
	(outfile): Add extern decl.
	(main): Same change as for gnatsd.c.
	* query.c (text_search, m_text_search, searching, skip_closed,
	quiet, originator): Decls moved into here.
	(outfile): Extern changed to decl here.

	* pr-edit.c (usage): Fix name.

	* cmds.c (GNATS_*): Use `=', not `|=', for FORMAT_*.

	* gnats.h (basename, xrealloc, xmalloc, xfree): Add decls here.
	* globals.h (xmalloc, xrealloc, xfree): Removed.

	* cmds.c (GNATS_mlpr, GNATS_mlct, GNATS_mlsu): Don't emit spaces
	after the CODE_INFORMATION.
	(GNATS_subm): Complain if there's no such submitter.
	(GNATS_catg): Likewise for category.
	* gnatsd.h (CODE_INVALID_SUBMITTER): Define.
	* nquery-pr.c (get_reply): Handle CODE_INVALID_SUBMITTER.
	(GNATS_mlpr): Remember to emit a period at the end of the line.
	* pr-mail.c (get_reply): Likewise.

	* gnatsd.h (Reply): Add decl.  Add TYPE field.
	* nquery-pr.c (Reply): Take it out of here.
	(REPLY_CONT, REPLY_END): Declare types.

	* pr-mail.c: New file.
	* Makefile.in (pr-mail): Add rule.
	(all-tools): Add pr-mail.
	(DISTFILES): Add pr-mail.c.

	* nquery-pr.c (get_reply): Handle CODE_INFORMATION.

	* query.c (get_pr): Look at ~FORMAT_FULL to give READ_PR.

	* cmds.c (GNATS_mlpr): Use submitter.contact only if it's set.
	Same for category.notify.
	(GNATS_full, GNATS_summ, GNATS_sqlf): Just set QUERY_FORMAT, don't do
	an or on it.

Tue Sep 13 11:50:27 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* cmds.c (verify): New arg SILENT; only emit the error if !SILENT.
	(do_query): Don't be silent.
	(GNATS_mlpr): Do be silent.

	Support getting the list of folks to email about a given PR,
	category, or submitter.
	* cmds.c (GNATS_mlpr, GNATS_mlct, GNATS_mlsu): New functions.
	(GNATS_help): Mention the MLPR, MLCT, and MLSU commands.
	* gnatsd.c (cmds): Replace MAIL with MLPR, MLCT, and MLSU. 
	* file-pr.c (free_responsible): Moved from here...
	* files.c: To here.

	* cmds.c (chk_nargs): Declare arg AC, and add arg WHAT, giving
	that to the printfs.
	(GNATS_*): Give appropriate arg to chk_nargs.

	* query.c (get_pr): Use P, not PR, for its argument.
	* query.h (start_data): Add extern decl.
	* Makefile.in (query.o): Add dependency on query.h.
	(query-pr.o): Likewise.

	* query.c (outfile): Add extern decl.
	(print_pr): Move function to here.
	* query-pr.c (print_pr): From here.
	(found_match): Deleted.
	(main): Don't set it.
	* cmds.c (print_pr): And from here.
	* query.h (print_pr): Add decl.

	* query.c (get_pr): Add function, with EXISTP (unused right now)
	and SILENT arguments.
	(do_pr_internal): Call get_pr with QUIET as the SILENT argument.
	* query-pr.c (get_pr): Removed.
	(quiet): Add decl.
	(print_pr, query_pr): Pass QUIET down into get_pr.
	(query_pr): Say if we couldn't find the PR.
	* cmds.c: Likewise.
	* query.h (get_pr): Add decl.

	* query.h: New file.
	* nquery-pr.c, cmds.c, query.c, query-pr.c: Include it.
	* gnats.h (FORMAT_REG, FORMAT_SUMM, FORMAT_FULL, FORMAT_SQL,
	query_format, Sql_Types, originator, text_search, m_text_search,
	skip_closed, searching): Move decls from here to query.h.
	(disbar, sql_types, sql_time, make_path, numeric, regcmp, regfind,
	get_category, pr_matches, check_text, do_pr, do_pr_internal): Likewise.

	* Makefile.in (gnatsd.o, cmds.o): Add dependencies.

	* query.c (query_format): Declare.
	* query-pr.c (full_report, sql_format, summary): Deleted.
	(get_pr): Check the FORMAT_FULL bit.
	(print_pr): Use them.
	(main): Set and check the bits instead of the variables.  Use
	local FORMATS to see if they chose more than one.
	* cmds.c (query_format): Delete.
	(get_pr): Check the FORMAT_FULL bit.
	(print_pr): Use the new format bits.
	(GNATS_qury, GNATS_summ, GNATS_full, GNATS_sqlf): Set their bits.
	* nquery-pr.c (full_report, sql_format, summary): Deleted.
	(query_format): Add decl, since we don't use query.c.
	(skip_closed): Add decl.
	(ask_about): Check the bits now.
	(main): Same as in query.c.
	* gnats.h (FORMAT_REG, FORMAT_SUMM, FORMAT_FULL, FORMAT_SQL): Declare.
	(query_format): Add extern decl.

	* query.c: New file.
	* Makefile.in (query-pr, gnatsd): Add query.o.
	(query.o): Add dependencies.
	* query-pr.c, cmds.c (sql_types, sql_time): Moved to query.c.
	(Sql_Types): Move typedef to gnats.h.
	(case_fold, regcmp, regfind): Move regexp stuff to query.c.
	(get_category, disbar, pr_matches, check_text): Others moved to
	be in query.c.
	(net_do_pr_internal, do_pr_internal): Glommed into one do_pr_internal, 
	adding the EXISTP argument to the query-pr one.
	* gnats.h: Add decls for new fns in query.c.
	(Sql_Types): Added typedef.
	(originator, text_search, m_text_search, skip_closed, program_name,
	searching): Add extern decls.
	* globals.h (program_name): Deleted decl.

	* cmds.c (start_data): New function; emit the fact that things are starting.
	* query-pr.c (start_data): New function; don't do anything for the
	normal one.
	* query.c (do_pr): Call start_data.

	* cmds.c (net_print_pr): Renamed to print_pr.
	(daemon_pr): Call that instead.

	* gnatsd.c (cmds): Add SQLF command.
	(GNATS_sqlf): Add decl.
	* cmds.c (GNATS_sqlf): New function.
	(QueryType): Add type `Sql'.
	(sql_types, sql_time, disbar): New functions.
	(get_pr): Also tell read_pr if M_TEXT_SEARCH was set.
	(net_print_pr): Print out SQL format.
	(GNATS_help): Mention SQLF.
	* nquery-pr.c (ask_about): Give the SQLF command if SQL_FORMAT is set.
	* Makefile.in (nquery-pr, gnatsd): Add `getdate.o'.

	* nquery-pr.c (GNATS_SERVER_PORT): Don't define, it's in gnatsd.h now.

Fri Sep  9 09:37:17 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* config.c (gnats_root): Init with NULL, not 0.

Thu Sep  8 12:51:53 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* file-pr.c (append_report): Also include the `Cc:' header in the
	message appended.  Initialize CC and SUBJECT with a space, in case
	they weren't included in the message.

Thu Sep  1 14:26:06 1994  Jason Merrill  (jason@deneb.cygnus.com)

	* edit-pr.sh (Subject): Use "Re: g++/1234" format so
        check_if_reply can deal.

Fri Aug 26 17:19:12 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* cmds.c (GNATS_auth): New function.
	(GNATS_help) [HAVE_KERBEROS]: Mention the AUTH command.
	* gnatsd.c (cmds): Add AUTH command.
	(GNATS_auth): Add decl.
	* gnatsd.h (CODE_NO_KERBEROS): Declare.

Wed Aug 10 09:33:27 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnatsd.h (GNATS_SERVICE): Define to be "support".
	(GNATS_SERVER_PORT): Define this here.
	* nquery-pr.c (main): Use it instead of "gnats".
	(GNATS_SERVER_PORT): Don't define it here.

	* gen-index.c (usage): New arg STAT.
	(main): Use it.

	* gnatsd.c: Include <arpa/inet.h>.
	(main): Set return value to void, not int.
	(match): Return 1 if we matched it all the way through.

	* pr-addr.c (main): Add extern decl of basename.

	* nquery-pr.c (ask_about): Delete unused arg SOCKFD.
	(main): Don't give it one.
	(server_reply): Delete unused var SAVE.

	* gnats.h (close_mail_file): Add extern decl.

	* file-pr.c (check_if_reply): Delete unused argument FP.
	* main.c (main): Don't pass one to it here.
	* globals.h (check_if_reply): Or mention it here.

	* cmds.c (qualify): Note if the PR was FOUND here.

	* gnats.h: Include ctype.h here.
	* file-pr.c, nquery-pr.c, query-pr.c: Not in these.

	* query-pr.c (query_pr): Set local variable FOUND as appropriate,
	to exit non-zero if we found no matches.

	* cmds.c (net_do_pr_internal): Use regfind, not regcmp.
	* query-pr.c (do_pr_internal): Likewise.

	* cmds.c (GNATS_help): Add missing CODE_INFORMATION for SUBM.

	* gen-index.c (get_categories): Free the path after we've gotten
	the list of categories.

	* pr.c (read_pr): Remember to reset MULTI_TEXT if we've found a
	new field.
	(read_pr): For Enum types, kill anything from a space on, since we
	only expect a single word.

Fri Aug  5 16:41:35 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* queue-pr.c (run_gnats): Skip files named `core', emitting a
	message about it along the way.

Tue Aug  2 08:30:01 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* cmds.c (GNATS_help): Mention ORIG.

	* nquery-pr.c (usage): Add --skip-closed to the list.

	* nquery-pr.c (ask_about): Send the originator.
	* cmds.c (GNATS_orig): Accept the full name, with spaces in it.

	* headers.c (header_name, header_value, set_header): Don't need to
	check for name < 0.
	* pr.c (field_value, set_field): Likewise.

	* nquery-pr.c: Include unistd.h and string.h/strings.h.
	(bzero, bcopy): Define.

	* nquery-pr.c (safe_exit): For now, don't look for a reply.

	* nquery-pr.c (get_reply): Call safe_exit when the PR is invalid or
	unreadable.  Rewrite their error messages to match query-pr.
	(safe_exit): Flush the read before sending QUIT, to get its real reply.

	* cmds.c (do_query): Only emit the trailing newline pair after the PR's
	been emitted if it wasn't a full report, since that would just be an
	extra one.

	* nquery-pr.c (read_server): Remove PRELIM argument.
	(get_reply): Don't pass it in here.

	Handle the server's gift a bit better, and only emit \n, not \r\n.
	* nquery-pr.c (serv_read, serv_write, sockfd): New global variables.
	(send_command, writen, readline): Deleted functions.
	(server_reply): Delete argument SOCKFD.
	(read_server): Likewise.
	(safe_exit): Likewise.
	(get_reply): Likewise.  Change use of server_reply.  Flush the server
	before trying to read from it.
	(ask_about): Use fprintf and SERV_WRITE, not send_command.
	(safe_exit): Likewise.
	(main): Likewise.
	(struct Reply): Delete member LEN.
	(server_reply): Don't set it.

	* misc.c (ret): New variable.
	(init_network): New function, used if necessary.
	(init_gnats): Call init_network.
	* pr.c (doret): Control if just \n should be emitted, or both \r \n.
	(write_pr): Use RET.
	* gnatsd.c (main): Set DORET.
	* gnats.h (init_network): Add decl.

	* nquery-pr.c (get_reply): Remove DOEXIT argument.
	(safe_exit): Set DOING_EXIT once, so we know what's going on.

	* gnatsd.c (searching): Add declaration.
	* cmds.c (searching): Add extern decl.
	(pr_matches): Check !SEARCHING in addition to !S.
	(qualify): New function, to do searching among the list they gave us.
	(verify): Check that av[i] is non-null before trying to do anything
	with it.
	(do_query): Call qualify before verify.  If we didn't get a match, for
	whatever reason, make sure we say so.
	(GNATS_resp, GNATS_catg, GNATS_conf, GNATS_svty, GNATS_stat, GNATS_orig,
	GNATS_prio, GNATS_subm, GNATS_nocl, GNATS_text, GNATS_mtxt): Set SEARCHING.

Wed Jul  6 16:08:58 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* cmds.c (get_pr): We don't need to call init_header anymore,
	since it's now called inside read_header.
	(myname): Add extern decl.
	(regcmp): Don't let regfree try to free case_fold, as in regfind.

	* gnatsd.c (allowed, match): New functions to add some modicum of
	security for the daemon. 
	(start_connection): Check if they're allowed to have a connection.
	* config.h (ACCESS_FILE): Add definition.

Thu Jun 23 20:03:00 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnatsd.c (main): Make MYNAME global.
	* cmds.c (GNATS_helo): Say who we are with the greeting.

	* gnatsd.c (GNATS_help): Update the info for TEXT/MTXT.

	* nquery-pr.c (xrealloc): Add decl.

	Implement support for text searches via the daemon.
	* gnatsd.c (SEAR, MSRC): Look for TEXT and MTEXT instead.
	(main): Call re_set_syntax to init the regexp searches.
	* nquery-pr.c (searching): Deleted var.
	(text_search, m_text_search): New variables.
	(ask_about): Send the `TEXT' and `MTXT' commands.
	(main): Don't set SEARCHING variable.  Enable -t and -m setting
	M_TEXT_SEARCH.
	* cmds.c (regfind, check_text, net_do_pr_internal): Add functions.
	(net_do_pr): Call net_do_pr_internal, not get_pr directly, so we
	can see if we're doing text searches.
	(GNATS_sear, GNATS_msrc): Rename to GNATS_text and GNATS_mtxt.

	* cmds.c, gnatsd.c: Don't include the regex stuff here.
	* gnatsd.h: Include it here.

Fri Jun 17 15:10:35 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnatsd.c (get_name): Declare HOST arg as a pointer.  Copy the
	name into BUF only after we know how long it will need to be.
	Give memcmp the correct address for comparing the hostname against
	possible ones which we have found.

Thu Jun 16 14:02:25 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnatsd.c (start_connection): Rewrite to pay attention to things.
	(get_name): New function.
	(do_command): Deleted function.
	* gnatsd.h (CODE_NO_ACCESS): Define.

	* gnatsd.c (main): Don't worry about SIGCLD/SIGCHLD.  Do ignore
	SIGPIPE, though, since read will tell us all about it.

	* cmds.c (GNATS_help): New function.
	* gnatsd.c (cmds): Add GNATS_help to the list.
	* gnatsd.h (CODE_INFORMATION): Added.

	* cmds.c (get_pr): Don't refuse confidential PRs this way.

Fri Jun 10 11:53:36 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)

	* nquery-pr.c (main): If gethostbyname fails, print an error
	message rather than dumping core.

Wed Jun  8 12:56:25 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnatsd.c (GNATS_skcl): Deleted declaration.
	(cmds): Use NOCL/GNATS_nocl instead.
	* cmds.c (GNATS_nocl): Renamed from GNATS_skcl.
	* nquery-pr.c (ask_about): Send NOCL instead of SKCL.

	* Makefile.in (doclean): Delete nquery-pr and gnatsd as well.

	* pr-edit.c (xmalloc): Remove decl, since it's in gnats.h now.

	* nquery-pr.c (main): If we didn't get any arguments, give the
	usage.  Only init the index variable if we're going to be doing
	anything in here.
	(long_options, usage): Accept -E/--entire instead.
	* query-pr.c (main): Likewise.
	* man/query-pr.man: Don't talk about no options showing you the
	entire database.  (Nobody's really liked that, anyway.)

Tue Jun  7 13:12:57 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* cmds.c (skip_closed): New variable.
	(pr_matches): Pay attention to --skip-closed.
	(GNATS_skcl): New function.
	* gnatsd.c (GNATS_skcl): Add decl.
	(cmds): Add GNATS_skcl.

	* misc.c (read_string): Undo previous change, we do want the newline.

	* gnats.h (xmalloc): Add declaration.

	* configure.in: Also look for -lnsl for Solaris to go with -lsocket.

	* configure.in: Look for sys/select.h.
	* autoconf.h.in: Added HAVE_SYS_SELECT_H.
	* gnatsd.c (HAVE_SYS_SELECT_H): If defined, include sys/select.h to
	get the typedef of `fd_set'.

	* gnatsd.c, nquery-pr.c, gnatsd.h: New files for the network server.
	* Makefile.in (nquery-pr, gnatsd, nquery-pr.o): New rules.
	(query-pr): Re-order dependencies a bit. 
	(GNATS_SERVER): New user-definable variable.
	(GNATS_DEFS): Define GNATS_SERVER.
	* configure.in (GNATS_SERVER): Added.
	* config.c.in (GNATS_SERVER): Define.
	* configure, config.c: Generated new ones.

Mon May 23 11:35:51 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gen-index.c (do_category): Close the directory when we're done,
	to keep from running out of space.  Also adjust some errors being
	printed out so they mention the name of the program that's giving
	them.

Mon May  2 19:17:24 1994  Jason Merrill  (jason@deneb.cygnus.com)

	* mail-query.sh (PATH): Don't expect the environment to contain a
	reasonable PATH.

Tue Apr 19 13:18:53 1994  Jason Molenda (crash@sendai.cygnus.com)

	* misc.c (read_string): if the string ends with \n, remove the
	\n.

Fri Apr 15 16:41:00 1994  Jonathan I. Kamens  (jik@cam.ov.com)

	* gnats-el.in (gnats::get-header-using-mail-fetch-field): New
	function which only searches the header, not the entire body of
	the PR.

Wed Apr  6 18:39:00 1994  Jason Merrill  (jason@deneb.cygnus.com)

	* mail-query.sh: Initialize $to and $args to ""

Wed Apr  6 17:19:18 1994  Cheryl Bien  (bien@aero.org)

	* edit-pr.sh: Put quotes around $usage.

Fri Mar 25 15:26:27 1994  Jason Merrill  (jason@deneb.cygnus.com)

	* file-pr.c (arg_quote): Make sure that we're not allocating 0
	bytes.

Fri Mar 18 11:49:28 1994  Jason Merrill  (jason@deneb.cygnus.com)

	* pr-edit.c (modify_pr): If the match is on PR #1, modify
	index_chain.

Mon Mar 14 11:59:13 1994  Jason Molenda  (crash@sendai.cygnus.com)

    Sun 13 Mar 94 18:37:22 1994  Cheryl Bien (bien@aero.org)

             * at-pr.sh: Check DEBUG_MODE to see if == `1' instead of 
               checking non-zeroness.

Thu Mar  3 15:24:24 1994  Jason Molenda  (crash@sendai.cygnus.com)

    Thu Mar  2 15:25:37 1994  Kevin Kells (kells@ise.ch)

             * misc.c (get_token):  Allow tokens to be just ``token:'' intead
             of ``token: ''.

Thu Mar  3 12:47:26 1994  Jason Merrill  (jason@deneb.cygnus.com)

	* queue-pr.c: Remove definition of queue_dir.

	* config.h: Add declaration for queue_dir.

	* Makefile.in (QUEUE_DIR): New make variable.
	(GNATS_DEFS): Add QUEUE_DIR.

	* configure.in: Set up QUEUE_DIR.

Tue Mar  1 10:19:52 1994  Jason Molenda  (crash@sendai.cygnus.com)

        * gen-index.c (usage):  add newline at end of usage message.

Mon Feb 28 15:14:13 1994  Jason Merrill  (jason@deneb.cygnus.com)

	* main.c (main): Only call configure() once.

	* getdate.y: Remove workaround for old bison bug that breaks new
	bison code.

Thu Feb 24 08:02:54 1994  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (gnats::tr): Regexp-quote the from character.

Fri Feb  4 15:58:31 1994  Jason Merrill  (jason@deneb.cygnus.com)

	* queue-pr.c (main): -d now sets gnats_root.

	* Makefile.in (GNATS_DEFS): Define X_GNATS_ROOT rather than GNATS_ROOT.

	* config.c.in (configure): Check environment variable GNATS_ROOT,
	macro X_GNATS_ROOT.  Add QUEUE_DIR variable.

Fri Feb  4 15:49:42 1994  Jonathan I. Kamens (jik@security.ov.com)

	* file-pr.c (append_report): Don't mess with the memory allocated
	by set_field.

	* mkdist.sh (FILES): Replace send-pr.man with send-pr.1

Fri Jan 28 14:16:51 1994  Jason Merrill  (jason@deneb.cygnus.com)

	* xmalloc.c (xmalloc): Don't abort on xmalloc (0).

Mon Jan 17 15:29:32 1994  Jason Merrill  (jason@deneb.cygnus.com)

	* man/Makefile.in (SRCSL): Subst in $(prefix).

Thu Jan 13 11:29:37 1994  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (gnats::query-pr-default-options): Add space at end.

	* p-admin.texi (Default behavior): Fix typo.

	* p-inst.texi (Aliases): Add missing "s.

Mon Jan 10 17:24:52 1994  Jason Merrill  (jason@deneb.cygnus.com)

	* configure.in: Clean up.

	* p-inst.texi (Installing utils): Fix calling syntax for crontab.

Fri Jan  7 12:56:22 1994  Jason Merrill  (jason@deneb.cygnus.com)

	* query-pr.c (main): If get_index fails, exit(1).

Thu Jan  6 18:29:00 1994  Jason Merrill  (jason@deneb.cygnus.com)

	* file-pr.c (notify_responsible): Fix Resent-Cc and
	Resent-Reply-To fields.

	* mail-query.sh: Fix oopses.

	* aclocal.m4: Remove all macros but AC_DIFF_OPT,
	include ../send-pr/aclocal.m4

	* gnats-el.in (gnats:bury-edited-prs): New variable to control burying
	of edited PRs.
	(gnats:unlock-buffer): Use it.

Wed Jan  5 14:12:33 1994  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (gnats::vmish-rename-after-send): Copy code for retaining
	N sent mail buffers from VM 5.35.
	(gnats::kept-mail-buffers): New variable.
	(gnats:keep-sent-messages): New option.

    Wed Jan  5 14:12:33 1994  Jonathan I. Kamens  (jik@security.ov.com)

	     * file-pr.c, files.c, index.c, internal.c, main.c, misc.c, pr.c:
	     Fix memory leaks.

	     * file-pr.c, gnats.h, internal.c, main.c, misc.c: Clean up mail
	     usage.

	     * files.c, misc.c, pr.c: Clean up use of get_next_field.

	     * file-pr.c (create_report): Fix comment.

	     * headers.c (read_header): Eat trailing newlines.

	* Makefile.in (install-info): Fix installs from source dir.

	* query-pr.c (regcmp, regfind): Don't let regfree try to free
	case_fold.

	* mail-query.sh: Add helpful messages.

	* gnats-el.in (gnats:gnats-mode): Fix documentation string.

	* pr-edit.c (usage): Add --lockdb and --unlockdb options.

	* p-admin.texi (mkdist): Update usage information.

	* mkdist.sh: Support --submitter option, reorganize usage.

	* getdate.y: Update.

	* aclocal.m4 (AC_LISPDIR): New macro.

	* configure.in: Use it.

	* Makefile.in (TEXINPUTS): Also search $(srcdir).
	(various): Don't bother removing target first.
	(config.c): Use $@.
	(version.texi): Don't use $@.
	(lispdir): Use @LISPDIR@.

    Wed Jan  5 14:17:39 1994  Tim Mason <timm@ig.co.uk>

	* edit-pr.sh: Fix logic for sending notification.		

Tue Dec 14 15:39:32 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* index.c (find_pr_category): Make buf static.

Fri Dec 10 11:49:15 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* Version 3.2

Mon Dec  6 16:39:33 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* version 3.01.10

	* mail-query.sh: Use MAIL_AGENT, put $(bindir) first on path.

	* Makefile.in (mail-query): Support that.

	* getdate.c: Generate a new one.

Wed Dec  1 14:25:19 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* version 3.01.9

	* man/Makefile.in: Fix clean targets.

	* Makefile.in: Fix clean targets.

Tue Nov 30 11:22:07 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* file-pr.c (run_atpr): Quote any ' characters in the arguments.
	(arg_quote): Fn to do that.

	* Makefile.in (mkdist): Remove VERSION subst.

	* mkdist.sh (install): Fix ($ typo.
	(send-pr): Fix sed delimiters, remove VERSION subst.
	(send-pr.1): Remove rule.
	(send-pr.el): Add datadir subst, remove VERSION.

	* query-pr.c (long_options): --multitext takes an option.

	* configure.in (GNATS_ROOT): Fix default.

Fri Nov 26 02:15:20 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* config.c.in (configure): Don't use a number for the length of
	gnats-adm/config, since it can change.

Tue Nov 23 13:37:56 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (gnats::get-pr-category): If we get a false match on the
	category number, don't loop indefinitely.

Mon Nov 22 00:26:08 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* file-pr.c (PAT): Allow 0-9 in category name.

	* gnats-el.in (gnats::real-pr-addr): Return nil if arg is "".

Fri Nov 19 12:17:34 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* config.c.in (safe_strtok): A strtok which never returns NULL.
	(configure): Use it.

	* Makefile.in: Change XTRAFLAGS to LDFLAGS.
	(install-gnats-bin): Don't show ***s when there's no error.

Tue Nov 16 14:11:48 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* edit-pr.sh (checking): Massage psychotic shells.

Fri Nov 12 16:20:44 1993  Jason Merrill  (jason@deneb.cygnus.com)

	Fri Nov 12 16:08:23 1993  "Jonathan I. Kamens" (jik@security.ov.com)

	* pr-edit.c (main): Add -L and -U options to lock and unlock the
	entire database.

	Fri Nov 12 16:04:51 1993  Jim Meyering  (meyering@idefix.comco.com)

	* Makefile.in: Tweak for short-name systems, use temp files
	to avoid leaving targets in incomplete state.

	Fri Nov 12 15:48:01 1993  "Jonathan I. Kamens" (jik@security.ov.com)

	* edit-pr.sh: Use hostname for pr-edit --lock.

	Wed Nov 10 20:23:55 1993  Jason Molenda  (crash@cygnus.com)

	* edit-pr.sh: Don't try to call pr-addr on the originator of the PR.

Wed Nov 10 11:43:40 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* most all: Make gcc -Wall happier.

	* configure.in: Add AC_HAVE_LIBRARY(malloc) for IRIX.

	* headers.c (read_header): Overhaul to handle PR fields in headers
	better and clean up ugly code.

Tue Nov  9 11:45:47 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* query-pr.c (regfind): Dynamically allocate fastmap.

	Thu Nov  4 11:33:05 1993  Jim Meyering  (meyering@idefix.comco.com)

	* query-pr.c: Add decls for xmalloc and basename.
	(disbar): Return str, parenthesize assignment in condition.

	* pr.c (read_pr): Make sure that array indices are unsigned char.

	* pr-edit.c: Add decls for basename and xmalloc.
	(main): Lose cast of basename retval.
	(main): Initialize fname to NULL.

	* gnats.h (SKIP_WHITE_SPACE): Parenthesize macro arg, make sure that
	array index is unsigned char.

	* Makefile.in (mostlyclean): Also remove *.aux files.

	* headers.c (read_header): Remove unused `received' var.

Wed Nov  3 13:47:47 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* Makefile.in (install-gnats-bin): Deal with not running as root or
	gnats.
	(install-tools-bin): Ditto.

Tue Nov  2 11:43:58 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (gnats:view-pr): If already loaded, look at beginning
	of PR.

	* pr-edit.c (check_pr): Fix up output.

	* pr-addr.c (main): Accept options.

	* file-pr.c (gnats): Use key for responsible field, not alias.

	* gnats-el.in (gnats::real-pr-addr): Call the C pr-addr program
	if the responsible party can't be found in the file.
	(gnats::bm): (buffer-substring (match-beginning x) (match-end x)).
	(gnats::pr-edit): All functions that use the pr-edit binary call this
	now.

	* files.c (get_responsible_address): Check the responsible file
	first, and fill in the alias field if necessary.

	* Makefile.in (install-gnats-bin): Break up installation of
	examples and config file.
	(config): Update.
	(GNATS_DEFS): Include BINDIR, B*_*
	Add entries for business hours stuff

	* configure.in: Add business hours stuff.

	* config.h: Remove #defines of business hours, BINDIR

	* config.c.in: Add bindir.

	* edit-pr.sh: Also look in $VISUAL for editor.

Mon Nov  1 10:05:10 1993  Jeffrey Osier  (jeffrey@thepub.cygnus.com)

	* gnats/*.texi, send-pr/*.texi, gnats/man/*.man:  up to date.

Sun Oct 31 22:17:26 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* file-pr.c (run_atpr): Remove gnats_root from before BINDIR.

	* queue-pr.c: Ditto.

Fri Oct 29 11:27:23 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* internal.c (lock_gnats): Wait 10 seconds for the lock to go away
	before dying.

	* query-pr.c (main): Don't allow -d before -R.

	* internal.c (unlock_gnats): If no lock, don't exit, just return.
	(block_signals): Don't ignore signals, just trap them.
	(unblock_signals): More signals.
	(unlock_quit): Like unlock_death, but quieter.

	* mail-query.sh: Strip leading space from headers.

	* gnats-el.in (gnats::fields): Add "mistaken".
	Allow local usernames as completions for responsible field.

Wed Oct 27 18:49:57 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* Makefile.in (gnats.info): Fix.
	(gnats.dvi): Fix.

Wed Oct 27 17:08:29 1993  Jeffrey Osier (jeffrey@cygnus.com)

	* gnats-usage.texi, gnats-install.texi, gnats-admin.texi:
		New Doc Structure (names will change shortly)
	* gnats.texi:  updated

Wed Oct 27 15:58:44 1993  Jeffrey Osier (jeffrey@cygnus.com)

	* Makefile.in:  fix dvi and info targets

Tue Oct 26 14:03:04 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* main.c (long_options): Disable -m option

	* gnats-el.in (gnats:kill-buffer): Kill the right buffer

	* configure.in: Change gnats-root to gnats-db

	* *: Change $(GNATS_ROOT)/gnats-dist to $(datadir)/gnats/dist

	* Makefile.in (config): Include SUBMITTER field
	(install-gnats-bin & others): Change GNATS_ROOT to libdir

	* pr-edit.c (usage): Update usage
	(main): standardsify -V and -h options

Mon Oct 25 17:46:01 1993  Jason Merrill  (jason@rtl.cygnus.com)

	* edit-pr.sh (mail_to): Put back calls to $PR_ADDR

Thu Oct 21 15:40:48 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (gnats::rw): Don't check retval; call-process-region
	non-deterministically returns 1 or 0 when called on /bin/false
	under 19.19.  Rrrrrrrrrrgh.

	* query-pr.c (query_pr): If numeric argument & searching, don't
	keep looking for another matching PR after you've found one.
	Output a \n after printing out a PR in all cases.
	(main): Don't output \n's.

Wed Oct 20 11:43:25 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* Makefile.in (TEXINPUTS): Fix $(srcdir) references
	(gnats.dvi): Add TEXINPUTS=$(TEXINPUTS)

	* configure.in (MAIL_AGENT): Also look in /usr/ucblib.

	* pr-edit.c (main): Block signals earlier and unblock them later.
	I've locked GNATS twice because of this bug.

	* Makefile.in (uninstall): Don't use {}

	* files.c (find_responsible): Zero out new Responsible struct.

	* pr-addr.c (main): Make it work.  It never worked before.

	* edit-pr.sh (old_resp): Avoid infinite loop on less intelligent
	seds.  Make the recipient decision actually work.  Remove $HOSTNAME
	bunk.

	* misc.c (open_mail_file): Use "w" mode for popen, not "w+".

	* query-pr.c (check_text): Fix logic.

	* file-pr.c (append_report): If a PR mysteriously acquires an
	invalid Submitter field, cope.

Tue Oct 19 15:42:20 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* mkdist.sh: Change libdir to datadir, subst it into send-pr.

	* gnats-el.in (gnats::lock): Don't show trailing ^J in errors.
	(gnats::lock): Add case for existence of gnats.lock.
	(gnats::pr-addr): Don't require use of responsible file.
	(gnats::getpwnam): New function.
	(gnats::get-responsible-from-passwd): New function.
	(gnats::user-name-p): New function.

Tue Oct 19 14:36:52 1993  Jeffrey Osier  (jeffrey@thepub.cygnus.com)

	* Makefile.in:  relocated TEXINPUTS to be more globally useful

Mon Oct 18 16:15:16 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* edit-pr.sh (MAIL_AGENT): Add quotes.
	(old_resp, new_resp): Strip out spaces again.
	(reply_to): Go back to old way of determining since $#%^&* AIX sed
	doesn't deal with labels on the command line.

	* query-pr.c (do_pr): Make return value reasonable.

	* files.c: Remove duplicate #include of "pathmax.h".

	* file-pr.c: Remove duplicate #include of <sys/types.h>.

	* configure.in: Don't assume that sendmail will be found.

	* aclocal.m4 (AC_FIND_PROGRAM): Don't use AC_PROGRAM_CHECK.

	* Makefile.in: makedepend.

Sat Oct 16 01:32:06 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* query-pr.c: Change -t option to -m, add -t option for searching
	Text fields.
	(do_pr_internal): Fix idiot bug.
	(regfind): Don't exit if re_search dies.
	(query_pr): Fix another idiot bug.

Fri Oct 15 14:49:52 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* Makefile.in (install-tools-bin): Allow (partial) installation
	as normal user.  pr-edit must still be installed as root.

	* configure.in: Lose AC_GCC_TRADITIONAL.

Thu Oct 14 22:14:32 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* query-pr.c: Add some code to use Rx package, but don't actually
	use it -- GNU regex is faster on sample queries I tried.
	(pr_matches): Deal with skip_closed.
	(regfind): Use a fastmap.
	(do_pr): Farm out the checks to do_pr_internal.
	(query_pr): Clean up code, make -t work with list of PRs.
	(main): Remove RE_DOT_NEWLINE from syntax, since it causes re_match_2
	to become very unhappy when trying to match something like "f.*xyzzy"
	against a 1MB string which contains an f, but no xyzzy.

	* mkcat.sh: Give an accurate error message if $DATADIR/gnats doesn't
	exist.

	* files.c (find_submitter): Zero out submitter struct before
	assigning to parts of it.

	* Makefile.in (install-tools-bin): Also create $(datadir)/gnats,
	so it's there for mkcat.

Wed Oct 13 11:54:15 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* misc.c: Change MAIL_AGENT to mail_agent

	* configure.in (MAIL_AGENT): Look for sendmail

	* edit-pr.sh: Use MAIL_AGENT.

	* config.h: Add decl for mail_agent.

	* Makefile.in (all-tools): Put gnats.elc back.
	(gnats.elc): Use send-pr-el.in instead of send-pr.el.

	* config.c.in: Add MAIL_AGENT, lose unions which were confusing gcc.

	* at-pr.sh (MAIL_AGENT): Use.

	* aclocal.m4 (AC_FIND_PROGRAM): New macro.

	* Makefile.in (MAIL_AGENT): New var.
	(GNATS_VARS): Include MAIL_AGENT.
	(GNATS_DEFS): Ditto.
	(config): ".
	(at-pr):  Use MAIL_AGENT.
	(edit-pr): ".
	(mkcat): Change LIBDIR to DATADIR.
	(rmcat): ".

	* mkcat.sh: Put category list in $(datadir).

	* rmcat.sh: Ditto.

	* gnats-el.in (gnats::mail-PR-changed): Use gnats::make-temp-name.
	(gnats:gnats-mode): Ditto.
	(gnats::tmpdir): New variable, containing $TMPDIR or /tmp.
	(gnats::make-temp-name): Use gnats::tmpdir for location.

	* mkdist.sh: Install man page properly, substitute variables properly,
	install things with the proper mode.

	* xmalloc.c (xfree): New function, doesn't free null pointer.

	* headers.c (init_header): Stem memory leak.
	(header_value): Use strdup so that no one tries to realloc a
	string constant.
	(set_header): Stem memory leak.

	* pr.c (init_pr, field_value, set_field): Ditto.

	* configure.in (SUBMITTER): Set to '$(GNATS_SITE)'.

Tue Oct 12 13:53:24 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* aclocal.m4: Remove AC_PARSEARGS and AC_NOTICE now that Autoconf
	1.6 has been released.

	* queue-pr.c (run_gnats): Remove gnats.lock if file-pr broke and left
	it behind.

	* xmalloc.c: Use abort() instead of error(), so that it gets caught
	in file-pr.
	
	* gen-index.c, pr-edit.c, queue-pr.c: umask (022)

	* error.c: Lose
	
	* Makefile.in: Lose error.c, add GNATS_INSTALL to GNATS_VARS,
	move gnats.elc creation to install time (kludge)

	* internals.c (gnats_locked): New function

	* query-pr.c: Use RE_SYNTAX_POSIX_EXTENDED | RE_BK_PLUS_QM.  Promise
	I won't change it anymore.

Fri Oct  8 15:17:48 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* query-pr.c: Add text_search variable, which holds the
	regexp to search for.
	(long_options): Add --text, -t options
	(get_pr): Call init_pr before read_pr
	(regfind): Like regcmp, but uses re_search
	(check_text): Check all MultiText fields & Synopsis field for
	text_search
	(do_pr): Call check_text
	(main): Set text_search on -t option, use RE_SYNTAX_POSIX_BASIC
	(i.e. sed syntax) rather than the variant of egrep I was using
	before.
	(usage): Document -t and --text options.

	* gnats-el.in (gnats:unlock-buffer): Error, rather than message, on
	abort so that kill-buffer doesn't go ahead and kill it anyway.
	(gnats:query-pr): Work under Emacs 18

Tue Oct  5 10:47:46 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* edit-pr.sh: Wrap things in double quotes

Mon Oct  4 12:32:44 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in: Wrap call-process calls in gnats::rw, which simulates
	a numerical return value for Emacs 18.
	(mh-insert-fields): autoload

Fri Oct  1 15:05:22 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* Makefile.in (VERSION): Bump to 3.01.5

Thu Sep 30 14:49:44 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (gnats:unlock-buffer): Set 'e' key in unlocked PR buffer
	to edit the PR again
	(gnats::mail-PR-changed): Fix logic error

Tue Sep 28 12:59:39 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* rmcat.sh: Fix dumb bug, massage Solbourne SunOS bdamage

	* man/Makefile.in (uninstall): Now does something

	* Makefile.in (gnats.elc): New target
	(uninstall): Now does something

	* config.c.in: Add fields for business hours config.

	* btime.c: Move business hours config from here
	(get_response_time): Fix stupid mistake

	* config.h: Add declarations for business hours configuration

Mon Sep 27 17:05:57 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* globals.h: Remove the response buffer from the get_response_time
	prototype.

	* file-pr.c (gnats): Lose the response_time variable.

	* btime.c (get_response_time): Overhaul...hopefully it works now.

	* mkdist.sh (install): The man page is named send-pr.man.

Fri Sep 24 13:19:13 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* pr.c (read_pr): Don't stop reading the pr when you hit the
	Organization field.

	* gnats-el.in (gnats::tr): New function, does basically the same
	thing as tr(1)
	(make-auto-save-file-name): Redefine global function so that
	buffers with /'s in their names can be auto-saved.
	(gnats::fields): Copy send-pr::fields by printing it to a string
	and reading it back.  Is there a better way?

Mon Sep 20 13:17:36 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* btime.c (get_response_time): Make 't' static and copy the output
	of localtime() into it so that it is not written over by the ctime()
	call later in the function.

Thu Sep 16 14:51:59 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (gnats::mail-PR-changed-mail-setup): Fix typo
	(gnats::get-pr-category): Ditto

Tue Sep 14 16:49:13 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (gnats:gnats-mode): Kludge to avoid errors when
	trying to autosave buffer
	(gnats::pr-addr): Make it work
	(gnats::get-alist): Optimize further
	(gnats::get-list): Ditto

	* edit-pr.sh (reply_to): Clean up sed script somewhat

	* config.c.in: Disable ANSI initializers until gcc is fixed

	* Makefile.in (OBJECTS): Add regex.o

	* file-pr.c (check_if_reply): Use a regular expression

	* aclocal.m4: Make AC_PARSEARGS match next version of autoconf

Mon Sep 13 15:47:18 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* pr-edit.c (main, others): Made return values reasonable

Fri Sep 10 16:39:31 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (gnats::vmish-mail-other-window): Rename mail buffer
	to something more informative, kludgily working around sendmail.el's
	refusal to support multiple mail buffers in an intelligent way
	(gnats::vmish-rename-after-send): Indicate that it's been sent
	(gnats::generate-new-buffer-name): Brought back
	(gnats::mail-reply-using-mail): Fixed get-char/get-line typo
	Support Apparently-To: header
	(gnats::mail-other-window-using-mhe): Made consistent with mail version
	(gnats::mail-reply-using-mhe): Support Apparently-To:
	(gnats:view-pr): Make emacs 18 happy; don't rename the buffer in
	view-hook.
	(gnats:view-pr): Don't pollute general view-mode-map

Thu Sep  9 14:04:08 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* man/Makefile.in (INSTALL): Explicitly set

	* configure.in: Don't call AC_PROG_INSTALL

	* Makefile.in (TAGS): Also grab ../send-pr/send-pr-el.in
	(install-gnats-bin): Depend on ../install.sh
	(INSTALL): Explicitly set

	* query-pr.c (regcmp): Support case folding

	* config.m4: Conform to ANSI initializer rules (hmph)

	* gnats-el.in (gnats::get-pr-category): Massive speedup from using
	search-forward rather than re-search-forward
	(gnats::get-alist): Ditto
	(various): Be more precise with kill-buffer

Wed Sep  8 14:07:03 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* Makefile.in (TAGS): Include headers and elisp in tags file

	* query-pr.c (sql_types): ignore case

	* gnats-el.in (gnats::get-list-from-file): Be informative, use
	gnats::get-alist
	(gnats::get-alist): New function, loads all information rather than
	just first field
	(gnats::pr-addr): Use gnats::responsibles rather than program
	(various): avoid use of files
	(gnats::update-responsible): Set responsible field for new category
	(gnats::category-responsible): Return person responsible for cat
	(gnats::no-such-category): new error condition

Fri Sep  3 14:10:07 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* man/Makefile.in: Lose duplicated code

	* main.c (main): Lose -m option, deal with -f failure

	* file-pr.c (notify_responsible): Remove chaff

	* Makefile.in (all): Use a make variable for all & install
	Put $(datadir) in config file
	Move directory creation stuff into separate targets
	Lose duplicate code
	Collapse man page targets

	* gnats-el.in (gnats::isme): New function
	(gnats::mail-PR-changed): Proper checking for sending mail to me

Thu Sep  2 13:59:49 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* queue-pr.c (fork_gnats): Return process exit status

	* headers.c (init_header): Remove trailing space from SM_FROM header

	* gnats-el.in (gnats:unlock-buffer): Use gnats:keep-edited-buffers
	(gnats::mail-functions): Change to list
	(gnats:view-pr): Handle viewing PR that's being edited

	* config.c.in (configure): Allow repeated calls

	* configure.in: Support --with-gnats-root

	* aclocal.m4: Fix AC_PARSEARGS

Wed Sep  1 13:22:32 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* at-pr.sh (RESP_ADDR): Support DEBUG_MODE

	* gnats-el.in (gnats::fields): Mess with fields more
	(gnats::submitters): Added variable

Tue Aug 31 12:12:29 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (gnats::fields): Move all values and defaults into
	this monolithic table.
	Change most instances of gnats::find-field to gnats::field-contents
	(gnats::change-field-and-update-audit-trail): Lose
	(gnats::update-audit-trail): Create, reference in gnats::fields

	* queue-pr.c (run_gnats): If file-pr exits with status 2, rename
	to a dot file (so it will be ignored in future)	and notify gnats-admin.

	* main.c (unlock_death): Punt

	* various: Change some exit(1)s to exit(2) or exit(3) to be more
	informative.

	* pr.c (read_pr): Recognize non-multitext fields inside a multitext
	field -- Organization comes early.  Check whether a new field is 
	the same as the current one.

	* file-pr.c (append_report): Prepend all correspondence with a blank
	space so that PRs submitted that way don't mess things up.

Fri Aug 27 08:34:32 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (gnats::get-list-from-file): Use insert-file-contents

	* Makefile.in (install-gnats): Install gen-index

	* gnats-el.in (gnats:view-pr): Type 'e' to edit the currently viewed
	PR, update mode line

	* pr.c (read_pr): Don't process non-multitext fields inside
	a multitext field.  Don't process multitext fields more than once.

	* gnats-el.in (gnats::mail-PR-changed): Smarter detection of me
	(gnats::mail-PR-changed): Fix notification of resp&state changes
	together
	(gnats::mail-PR-changed-mail-setup): Send from same window
	(gnats::mail-PR-changed-mhe-setup): Ditto
	(gnats:unlock-buffer): Always bury buffer

Thu Aug 26 11:26:48 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (gnats::query-pr-history): New variable
	(gnats:view-pr): New logic for error message
	(gnats:edit-pr): Ditto.
	(gnats:query-pr): Use query-pr-history

	* various: Check for "" rather than NULL returns from 
	{field,header}_value.

	* pr.c (field_value): Always return a string, "" if nothing else.

	* headers.c (header_value): Ditto.

	* Makefile.in: Fix various typos, add missing defaults
	(queue-pr): Link in version.o
	(version.texinfo): Renambe to version.texi

	* query-pr.c (main): Add 'restricted' option for use with mail
	server -- user is not allowed to redirect output, look at a
	different root directory, or view confidential PRs.  For best results,
	use as first argument.

	* misc.c (open_mail_file): If in debug mode, mail to gnats_admin
	and stick another set of headers onto the beginning of the message.

	* config.c.in: Add definition of debug_mode

	* config.h: Ditto

	* Makefile.in (mail-query): Add target
	(lispdir): Use $(datadir)/emacs/lisp.

	* mail-query.sh: Real simple mail server for query-pr

	* file-pr.c (check_if_reply): Deal with re:cat/num subject headers

	* queue-pr.c (main): Add -V option.

	* main.c (main): Print help messages to stderr.

	* globals.h (MAIL_AGENT): Use -oi rather than -i, which doesn't
	exist.

Wed Aug 25 12:00:53 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (gnats::get-pr-category): Use insert-file-contents
	instead of insert-file

Tue Aug 24 12:10:55 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (gnats:addr): Add definition
	(gnats-mode-map): Bind ^C^T to gnats:category-change-from-to
	(gnats:mail-reply): Handle prefix argument that using-mail version
	looks for
	(gnats::mail-reply-using-mail): Don't be interactive
	(gnats::mail-reply-using-mhe): Ignore argument
	(gnats::push): Move to send-pr-el.in
	(gnats::mail-PR-changed): Mail PR changes to bugs, handle addresses
	better
	(gnats::mail-PR-changed-mail-setup): If mail-other-window returns nil,
	abort PR submission
	(gnats:category-change-from-to): Create
	(gnats:view-pr):	Rename buffer to include category
	(gnats:edit-pr): Remove useless progn's
	Fix error conditions
	Switch to other window if desired PR is there	

	* internal.c (punt): Put two newlines after Subject line so that
	buggy sendmails don't think that "pr-edit:" is another header
	line.

	* Makefile.in (config): Don't put LIBDIR in the config file, since
	it is shared across architectures.
	Change default for GNATS_ROOT to $(statedir)/gnats/gnats-root

	* configure.in: ditto

Sun Aug 22 01:00:59 1993  Jason Merrill  (jason@rtl.cygnus.com)

	* edit-pr.sh (reply_to): More Fun with sed(1) to handle continuation
	lines, avoid use of grep when not needed.

	* headers.c (read_header): Handle continuation lines beginning with
	a space, not just a tab.

Fri Aug 20 11:36:14 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* edit-pr.sh (reply_to): Fun with sed(1).
	Notify originator of state changes.

	* README: Fix acronym

	* gnats.h: Take bzero back out

Thu Aug 19 14:58:29 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (gnats::mail-reply-using-mail): Make uninteractive
	(gnats::mail-other-window-using-mail): ditto
	(gnats::mail-reply-using-mhe): Ignore single arg
	(gnats:mail-reply): Accept arg, pass to subroutine
	(gnats:category-change-from-to): Do completing update of category
	initially bound to C-c C-t
	(gnats::mail-PR-changed): Redo address generation

	* Makefile.in (GNATS_VARS): Add SUBMITTER to list

	* gnats-el.in (gnats::mail-PR-changed): Mail diffs to bugs

	* query-pr.c (regcmp): Use re_match rather than re_search
	Use memset rather than bzero

Wed Aug 18 13:51:56 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* pr.h (PR_Name): Put FIX before AUDIT_TRAIL so edit-pr.sh doesn't
	get confused

	* regex.h: #define const if not __STDC__

	* btime.c, pr-addr.c, pr-edit.c, resp-lookup.c: #include "config.h"

	* man/Makefile.in: Change @GNATS_*@ to xGNATS_*x
	man/*.man: ditto

	* gnats-el.in (gnats:unlock-buffer): Only bury buffer if it's displayed
	Only delete file if it exists

	* configure.in: Add section for determining subset of tools to build

	* man/Makefile.in (VPATH): Replace @srcdir@ with $(srcdir)
	(man1ext, man8ext): Add, use per GNU coding standards
	(all): Replace $(GNATS) with @GNATS_ALL@
	(install): Replace $(GNATS) with @GNATS_INSTALL@
	(install-tools-man): Change to install-tools

	* Makefile.in (config): Add $(libdir)
	(gnats.el): Don't subst $(bindir) or $(GNATS_ADDR)
	(install-tools-man): Remove
	(FLAGS_TO_PASS): Remove $(GNATS)
	(GNATS): Remove
	(all): Replace $(GNATS) with @GNATS_ALL@
	(install): Replace $(GNATS) with @GNATS_INSTALL@
	(install-tools): Replace install-tools-man with install-man

	* gnats-el.in: Reorganize namespace (put stuff under gnats:)
	Move duplicated functions, variables into ../send-pr/send-pr-el.in
	(require 'send-pr)
	Make gnats-mail customisation stuff table-driven
	Nuke backups stuff
	(gnats::state-following): Make dotted
	(gnats::check-pr): Don't save-excursion for the whole function
	Use defsubst for some of the smaller functions

	* aclocal.m4: Add modified AC_NOTICE and AC_PARSEARGS macros
	(based on Autoconf 1.5 versions)

	* configure.in: Use AC_INIT

Mon Aug 16 11:18:11 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in: Change some defconsts to defvars to users can set,
	say, GNATS-ROOT beforehand
	Fix string-match syntax
	Lose gnats-dont-reply-to-names; we want replies to be CC'd to `bugs'

	* query-pr.c (usage): Fix it

	* mkcat.sh: Always create new categories files for send-pr

	* misc.c (get_next_field): Change `delim' from char to int

	* gnats.h: Change proto for get_next_field to char*, char*, int

	* gnats-el.in (query-pr): Use -d option

	* pr.c (check_enum_types): Only check up to first space in value
	(to accomodate duplicate (NUM))

	* gnats-el.in (gnats-unlock-buffer): If not in buf, go there.
	(gnats-mode-kill-buffer-hook): Force unlock, to avoid having
	to answer yes twice about killing a modified PR.
	(gnats-unlock-buffer): Add &optional force argument

Fri Aug 13 15:08:59 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* query-pr.c (print_pr): Add calls to disbar() in sql output routines
	to avoid outputting '|'s inside fields
	(regcmp): Wrapper for regexp routines
	(pr_matches): Use regcmp rather than strcmp
	(main): Set up regex syntax
	(query_pr): Use regcmp for the number
	(main): Always get index
	(numeric): Is it a number or a pattern?

Wed Aug 11 12:36:24 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* configure.in: Protect []'s in expr lines from m4

	* pr.h (PR_Name): Add FIX to enum, add FIX_STRING #define (PR 1310)

	* pr.c (read_pr): Change check of specific categories to ignore if
	prune is true to check for pr[i].datatype == MultiText
	(init_pr): Add values for >Fix: field (PR 1310)

	* main.c (main): Catch SIGHUP, SIGTERM, SIGINT, and SIGQUIT, too.
	(unlock_death): Uncatch them.

	* gnats-el.in (gnats-submit-pr): Changing the state to the same state
	is interesting to the customer.  Don't unlock the PR until mail
	has been sent.

	* headers.c (read_header): Call init_header() (PR 2711)

Tue Aug 10 12:07:45 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (query-pr): Use BINDIR to specify the location of the
	query-pr binary

	* file-pr.c (append_report): Don't die if headers are missing
	(i.e. To:)

	* main.c (long_options): Change 'usage' to 'help' and '?' to 'h'
	to conform to the GNU coding standards and the code in main().
	(main): made --version and --help options exit successfully.

	* query-pr.c (long_options): Changed print-path to not require
	an argument (PR 3165)

	* gnats-el.in: Changed 'gnats-unlock' to 'unlock-pr' since it's now
	interactive.
	(gnats-mode): Change paragraph-separate and paragraph-start to include
	"^>[-A-Za-z]:" (PR 3166)

Mon Aug  9 18:09:15 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in (gnats-unlock-buffer): If buffer modified, ask user
	before unlocking (PR 2320)
	Improve gnats-mode documentation (PR 2320)

Fri Aug  6 12:57:45 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in: Reworked edit-pr, gnats-{un,}lock to use condition-case
	and error conditions
	Removed all traces of gnats-mode-write-file-hook
	Changed the names of some temp buffers to contain an initial space

	* Makefile.in, aclocal.m4, configure.in, gnats-el.in:
	Use AC_DIFF_OPT macro to set DIFFOPT to the most human-friendly
	mode available to the default diff(1).

	* gnats-el.in (gnats-finish): Rename to gnats-submit-pr to match the
	documentation
	Fix declaration of invalid-fields error
	(gnats-mode): Fix use of kill-emacs-hook under Emacs 18
	(gnats-mail-PR-changed): Use pr-addr for finding email addresses
	Use diff -u instead of -c
	(gnats-pr-addr): New function
	(gnats-change-field-and-update-audit-trail): Don't change the case
	of replacement text
	(gnats-generate-new-buffer-name): Removed, since it is no longer used
	(view-pr): Use view-file
	(gnats-submit-pr): Don't force backup -- we want to diff against the
	version checked out, not the most recently saved.

	* edit-pr.sh: Change all instances of GNATS_ADDR to PR_ADDR to avoid
	clashing with configuration variable

Thu Aug  5 17:52:03 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* gnats-el.in: Varied and sundry fixes, viz:
	Understand Emacs 19, support new capabilities like add-hook,
	generate-new-buffer-name, local-write-file-hooks and kill-buffer-hook
	Rename gnats-mode-write-file-hook to gnats-finish and bind to ^C^C,
	since v19's basic-save-buffer chokes if a hook changes
	buffer-file-name to nil
	When starting a new buffer for a PR, kill the old one.
	Don't rename the buffer when you're done
	Bury the buffer when you're done

	* Makefile.in (clean): Don't remove config
	(distclean): Remove config

	* configure.in: Use AC_PROGRAMS_CHECK to (hopefully) find hostname
	rather than assuming it exists.
	Check for config files in ${srcdir} and build dir as well

Wed Aug  4 14:53:30 1993  Jason Merrill  (jason@deneb.cygnus.com)

	* Various: Change version number to 3.02

	* gnats.texi: @include version.texinfo for version number.

	* Makefile.in (lispdir): change to site-lisp

	* headers.c (read_header): Break on "headers" beginning with '>'

	* gnats.h: add prototype for configure().

	* misc.c: remove definition of gnats_root.

	* main.c: remove definitions of flag_{ack,notify}.

	* globals.h: remove definition of GNATS_ADMIN.

	* *.c: move #include "config.h" to beginning of file.
	Add call to configure() in main().
	replace cpp macros with references to external variables.

	* config.m4: New file containing macros used in config.c.in for
	generating config.c.

	* config.c.in: New file containing routines for parsing configuration
	file.  Can be easily portablized by removing dependence on GNATS_ROOT.
	
	* config.h: Changed all the cpp macros to external variables,
	include "autoconf.h"

	* edit-pr.sh, mkcat.sh, mkdist.sh, rmcat.sh: source
	GNATS_ROOT/gnats-adm/config

	* at-pr.sh, edit-pr.sh, mkcat.sh, rmcat.sh, gnats-el.in:
	replace @'s with x's to avoid collision with config.status

	* Makefile.in: Changed defaults for GNATS_ROOT and kin to be
	subst-able by configure, added NOTIFY, ACKNOWLEDGE, DEFAULT_SUBMITTER,
	KEEP_RECEIVED_HEADERS and GNATS_ADMIN to the group, added M4 variable,
	made BISON and the INSTALL triplets subst-able, added statedir var,
	added config.[co] to LIB{SRC,OBJS}, added . and $(srcdir) to
	INCLUDEDIR, replaced LIBIBERTY with the usual version, added GNATS_DEFS,
	added `config' to all-gnats dependencies, removed $(LIBIBERTY) from
	various dependency lists, added rules for config.{,c,o}, filled some
	rules, replaced @'s with x's in sed directives, added autoconf.h to
	the dependency list for the objects, added config installation to
	install-gnats rule, replaced gnats.dvi rule with $(TEXI2DVI)-based one,
	fixed up *clean rules, added MAKEINFO and TEXI2DVI variables.

	* aclocal.m4: Removed file again.

	* configure.in: Add large amounts of kludgey sh code to guess the
	old gnats configuration.
	Changed AC_SCO_SOCKET to AC_HAVE_LIBRARY(socket)
	Added AC_PROG_YACC
	Use autoheader -> autoconf.h.in

Wed Aug  4 11:53:36 1993  Brendan Kehoe  (brendan@blues.cygnus.com)

	* query-pr.c (get_pr): Call init_header before read_header, so we
	get clean information for each one.

Tue Aug  3 08:35:24 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnats-el.in (gnats-mail-reply-using-mail): Add MSGID to the let
	list, so it's not considered a free variable.
	(gnats-mail-reply-using-mhe): Likewise.
	(edit-pr): Add MSG to the let list. 

Fri Jul 23 16:01:08 1993  Jason Merrill  (jason@wahini.cygnus.com)

	* aclocal.m4: Created file with definition of AC_SCO_SOCKET

Wed Jul 21 19:02:31 1993  Jason Merrill  (jason@wahini.cygnus.com)

	* files.c (find_submitter): Fix handling of null response time
	field in GNATS_ROOT/gnats-adm/submitters

	* Makefile.in: Fixed typo, added $(srcdir)/'s for other-dir builds

	* internal.c (punt): Create "To:" line if not using /bin/mail, so
	that mail to gnats-admin will actually go to gnats-admin

	* man/Makefile.in: Added and removed $(srcdir)/'s so it would
	build properly in another directory

Wed Jun 16 15:51:13 1993  K. Richard Pixley  (rich@cygnus.com)

	* gnats-el.in (GNATS-MAIL-ADDR, GNATS-ROOT, LIBDIR): Add asterix in
	documentation which will declare these to be user settable
	options.
	(GNATS-ROOT, LIBDIR): changed from defvar to defconst.  We do not
	change these values programmatically.
	(gnats-responsibilities): changed from defconst to defvar.  We do
	change these values programmatically.
	(gnats-pr-locked, gnats-pr-errors, gnats-buffer-pr, gnats-audit-trail,
	gnats-backupname): static variable names now prefixed with gnats- to
	prevent stray collisions.  Added missing defvar line.
	(gnats-start-of-PR-fields): Added missing defvar line.
	(gnats-dont-reply-to-names): changed setq to defvar.


Tue Jun 15 12:43:14 1993  K. Richard Pixley  (rich@sendai.cygnus.com)

	* Makefile.in (VPATH): Replace so that subdir builds work once
	again.

Wed May 26 12:42:01 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* pr-addr.c (main): Also chop at the parenthesis, since we can't
	assume there'll be a space between the name and the real name.

Tue May 18 13:35:28 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* pr-edit.c (unlock_pr): Check for a non-existant LOCK_PATH before
	we try to stat it.  Don't call punt.

Tue May  4 12:48:11 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* edit-pr.sh (checking): Fix quoting bug.

Wed Apr 14 12:11:07 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* Makefile.in (VERSION): Bump version to 3.01.
	* gnats-fc.eps (Title): Likewise.

	* query-pr.c (do_pr): Do a case-insensitive match against the
	originator name.

	* gen-index.c (long_options): Add -V/--version.
	(main): Grok it.

	* man/rmcat.man, man/gen-index.man: New files.
	* man/Makefile.in (SRCS8): Add rmcat.8 and gen-index.8.
	(MAN8): Add rmcat.man and gen-index.man.

	* query-pr.c (main): If we're doing a summary, output a final
	newline after we run down the list of PRs that they gave us.

Tue Apr 13 12:13:42 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnats-el.in (gnats-mode-write-file-hook): Fix appending the hook.

	* internal.c, misc.c: Check both __STDC__ and _AIX to see if we
	should use stdarg instead of varargs.

	* Makefile.in (realclean): Don't delete TAGS.
	(distclean): Don't delete getdate.c.
	(all-gnats): Move edit-pr back with the other tools.

	* globals.h (APPEND_STRING): Added macro.
	* file-pr.c (APPEND_STRING): Delete it from here.

	* headers.c: Include config.h.
	(read_header): Rewrite to accept tab-continued headers.
	(set_continued_header): New function; special-cases Received:
	headers to accept as many as you want to give it.  If
	KEEP_RECEIVED_HEADERS is false, it only does an assignment.
	(lookup_header): Deleted prototype, moved the function up so we
	don't need it.
	* config.h (KEEP_RECEIVED_HEADERS): Added.
	* Makefile.in (headers.o): Added dependencies.

	* query-pr.c (get_category): If we couldn't open the index, return
	a NULL.

Mon Apr 12 14:55:33 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* pr.h (PR_Type): Typedef the enum.
	(PR_entry): Change `datatype' member accordingly.

	* file-pr.c (reply_to_submitter): Send mail to the address in the
	`Reply-To:' header if there is one; otherwise, just use the
	`From:' address.

	* pr-edit.c (main): When calling check_pr, arrange to exit
	non-zero if the PR didn't check out ok.

	* rmcat.sh: New file, mate to mkcat.
	* Makefile.in (DISTFILES): Add rmcat.
	(all-gnats): Likewise.
	(rmcat): New rule.
	(install-gnats): Install it.
	(clean): Delete rmcat.

	* mkdist.sh: Use XFOOX instead of @FOO@ for substs from GNATS.  Use
	YFOOY for the substs mkdist does on the Makefile it creates.
	* Makefile.in (mkdist): Use XFOOX.  We don't need to subst in LIBDIR.

	* query-pr.c (get_category): Don't say we couldn't find the PR in
	the index, since we'll later say we couldn't read it anyway.
	(query_pr): Check the return of get_category, and complain if it
	was null.  Return an int ourselves.
	(main): If we got some errors, then exit with a non-zero status.

	* gnats-el.in (gnats-mail-PR-changed): Check if CC is null before
	adding the responsible person to it, so we don't try to send mail
	to `nil'.

	* edit-pr.sh: Use an arrow instead of wrapping from/to in braces.
	* gnats-el.in (gnats-change-field-and-update-audit-trail): Likewise.

	* main.c (main): If there's a PR.lock file, then leave and try
	again later, so we don't invite problems.  Include unistd.h.

Fri Apr  9 14:48:00 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* query-pr.c (print_path): New variable.
	(main): Set it if -P/--print-path.
	(print_pr): If `print_path' is true, then print out something that
	the emacs next-error function can grok.
	(usage): Update for the new options.
	* gnats-el.in (query-pr): Pass the -P option, and fix things so
	they'll work under both emacs 18 and emacs 19.

	* query-pr.c (skip_closed): New variable.
	(main): Set it if -x/--skip-closed.
	(query_pr): Use it to avoid closed PRs.

	* Makefile.in (DEFAULT_RELEASE, DEFAULT_ORGANIZATION): Don't wrap
	with quotes.
	(GNATS_VARS): Don't do it here either.

	* queue-pr.c: Include pathmax.h.
	(drop_msg): Use mktemp instead of tempnam.
	* internal.c (write_index): Likewise.

Wed Apr  7 13:13:08 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gen-index.c: New file, to emit an index for an existing database.
	* Makefile.in (gen-index): New rule.
	(all-gnats): Added gen-index.
	(clean): Likewise.

	* queue-pr.c: Include unistd.h, sys/wait.h, and sys/param.h by
	hand; include gnats-dirs.h instead of queue.h.
	* queue.h: Renamed to gnats-dirs.h.
	* Makefile.in (DISTFILES): Change it.
	(queue-pr.o): Depend upon gnats-dirs.h instead.

	* Makefile.in (DEFAULT_ORGANIZATION): New variable.
	(GNATS_VARS): Pass it.

	* edit-pr.sh: Always send mail to the responsible person of a PR.

	* edit-pr.sh: Include the synopsis (both old and new if they
	changed) in the mail we send.  Wrap from/to for responsible
	changes in <>'s, for names that have dashes in them (e.g.,
	gnats-admin).  Don't put an empty line between the synopsis and the
	change message.
	* gnats-el.in (gnats-change-field-and-update-audit-trail): Likewise.

	* query-pr.c (do_pr): Return an int (0 or 1 appropriately).
	(query_pr): Check for do_pr's return to see if we should output a
	newline or not.

	* queue-pr.c (drop_msg): Do a rename of the file to file, instead
	of file to directory.

	* edit-pr.sh (locked): Use cmp -s instead of the output of cmp to
	see if the PR has been changed.
	(mail_to): Don't send all status changes to gnats-admin.

	* query-pr.c (usage): Add originator options to the usage.

	* mkdist.sh (Makefile): Quote __EOF__ to avoid variable
	substitution inside the here document.  After creating the
	Makefile, substitute in GNATS_SITE, the VERSION, and the release.
	(FILES): Change send-pr.elisp to send-pr-el.in.
	(send-pr): Likewise.
	(libdir): Add definition in the Makefile.
	(install-sid): Substitute bindir using commas to avoid sed problems.
	* Makefile.in (mkdist): Also substitute VERSION.

	* file-pr.c (gnats): Don't use S_IFDIR in the mode for pending or
	the category directory.

	* Makefile.in (GNATS_VARS): Put quotes around $(DEFAULT_RELEASE),
	in case it happens to have spaces in it.

	* files.c (get_responsible_address): Cut off anything after a
	comma in a passwd entry's gecos field, to avoid phone #s and such.

	* pr-edit.c (modify_pr): Copy the responsible field before
	chopping off the full name for the index.

Mon Mar 29 15:01:10 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* file-pr.c (notify_responsible): Add a `Resent-From:' header.
	(append_report): Likewise.

	* query-pr.c (print_pr): Also print out the arrival date.

Thu Mar 25 15:21:58 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnats-el.in (view-pr): Give the error as being from view-pr, not
	edit-pr.

	* edit-pr.sh (full_id): Look for "/$1:", not "$1:", to avoid
	matching spuriously against an incomplete set.
	(everywhere): Change temp filenames to be short enough not to go
	over 14 chars when we create the .old and .tmp files.
	(Subject): Use full_id, not full_pr.

	* file-pr.c (append_report): Only send mail to the person
	responsible for the PR, and to the submitter contact.

	* file-pr.c (append_report): Preserve the header values we
	recorded just before coming into append_report, so we use those
	for our outgoing headers, instead of the ones from the PR.

Fri Mar 19 17:06:49 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnats-el.in (edit-pr): Say that GNATS itself is locked when we
	aren't given a username by pr-edit.
	(gnats-find-field): Return a null string, not t or nil.
	(gnats-get-reply-to): When using mail-fetch-field, pass arg ALL as
	nil, so we only get one copy of it if there's a `Sender:' field.
	When deciding what to return, check if REPLY-TO is both nil and an
	empty string.

Wed Mar 17 15:34:14 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* file-pr.c (notify_responsible): Say "business hours".

	* Makefile.in (install-gnats): Install edit-pr also.

	* queue-pr.c (fork_gnats): Fix an off-by-one error.
	(main): Likewise.

	* misc.c (open_mail_file): Make sure BUFFER has enough room for
	the mail agent *and* all of the recipients, rather than
	arbitrarily pick 256 as a probably bogus value.

Mon Mar 15 15:06:41 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* file-pr.c (append_report): Chop off the full name before getting
	the responsible address.
	(notify_responsible): Don't put `Re:' in the message going to the
	responsible people.

Sat Mar  6 15:15:43 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* Makefile.in (VERSION): Bump version to 3.00.
	* gnats-fc.eps (Title): Likewise.

	* gnats-el.in (view-pr): Add sample autoload.

	* edit-pr.sh (MAIL): Rename to MAIL_AGENT.
	(PR_EDIT, GNATS_ADDR): Fix directory names to be lower-case `gnats'.
	(locked): New variable.
	(option parsing): Use grep to find the '/' in the ID they gave us.
	Look for "$1:", not just $1, so we don't hit 1440 when looking for
	144, for example.
	(trap): Add two traps to catch some signals.
	(HOSTNAME): New variable, grokked appropriately.
	(locking PR): Pass our username for the locking.
	(editing): If they didn't change anything, don't do anything with it.
	(checking): New variable; set the errors variable inside the loop.
	Search for quit with a case.
	({old,new}_state, {old,new}_resp): Delete all whitespace.
	(audit trail): Append it properly.
	(filing): Redirect `$new' into PR_EDIT.

	* gnats.elisp: Renamed to gnats-el.in.
	* Makefile.in: Changed everywhere.

	* Makefile.in (clean): Also delete gnats.elc.

	* gnats.elisp (gnats-get-reply-to): Go to the beginning of the
	buffer before looking for the `From:' and `Reply-To:' headers.

Fri Mar  5 09:53:45 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnats.elisp (gnats-mode-write-file-hook): In the cleanup-form,
	also check that the buffer's in gnats-mode before trying to change
	its write-file-hooks.
	(view-pr): New function.

	* file-pr.c (append_report): Put their message in the Audit-Trail,
	instead of under Unformatted.
	* headers.c (header_name): New function.
	* gnats.h: Added its prototype.

	* mkdist.sh (GNATS_SITE): Add.

	* file-pr.c (append_report): Include the `To:' header in what we
	append to the PR.  Send mail to the right people about the new
	text in the PR.
	(notify_responsible): Free the stuff append_notify gives us.
	(append_notify): If notify hasn't had anything written to it,
	return a NULL.

	* gnats.elisp (gnats-get-reply-to): Correct how we return REPLY-TO
	then FROM to actually pass FROM if REPLY-TO is empty.
	(gnats-mail-PR-changed): If CC is null, pass an empty string to
	mh-send-other-window, not nil.
	(gnats-mode-write-file-hook): In the cleanup-form for the
	unwind-protect, make sure we're in the GNATS buffer before setting
	the WRITE-FILE-HOOKS, so we don't screw up the mail.  Append it to
	the hook, don't cons it.
	(gnats-mode): Name the buffer so it's useful in a listing.  Append
	our hook to WRITE-FILE-HOOKS, don't cons it.
	(edit-pr): If we're already editing a PR, just go to that buffer.

	* query-pr.c (print_pr): Trim off the full name from the
	responsible string for sql output.
	(main): Output a final newline if sql_format, since we don't
	supply it in print_pr.
	(do_pr): New function.
	(query_pr): Call it appropriately.  Now properly handle having
	both a search list and search qualifiers.
	(found_match): New variable.

	* at-pr.sh: Say analyzed, not authorized.

Wed Mar  3 14:20:44 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnats.elisp (edit-pr): Change arg NUMBER to ID; modify doc.

	* file-pr.c (notify_responsible): Add the proper From: field to
	the message, so it doesn't look like it's coming from the gnats
	user.

	* query-pr.c (long_options): Add -O/--originator.
	(originator): New variable.
	(main): Grok it, setting originator.
	(get_pr): New function.
	(print_pr): New argument `opened'; if not true, call get_pr.
	(query_pr): If originator is set, then read in the PR and
	check the originator field as well.
	* query-pr.man: Document it.

	* at-pr.sh: Don't look for and use the category, the argument we
	were given already has it on it.

	* edit-pr.sh: Say what user locked a PR.

	* Makefile.in (pr-edit): Depend upon version.o as well.

	* pr-edit.c (main): Parse new arg to -l, the username.
	(main, case 'l' and 'u'): Don't set fname, there wasn't an optarg
	then.
	(lock_pr): Write the username into the lock file.  If the lock
	file already exists, tell who locked it on the stderr.

	* gnats.elisp (gnats-delete-buffer): Instead of killing the buffer,
	make it read-only and in text mode.
	(gnats-buffer-major-mode): Return the major mode for BUFFER.
	(gnats-kill-buffer): Call gnats-delete-buffer.
	(gnats-mode-map): Bind `C-c C-q' to gnats-delete-buffer.
	(gnats-unlock-all-buffers): New function, to cycle down the buffer
	list and call gnats-delete-buffer on each GNATS buffer.
	(gnats-mode): Add gnats-unlock-all-buffers to kill-emacs-hook.
	(gnats-patch-exec-path): Kill the error buffer when we're done.
	(gnats-check-pr): Kill the err buffer if the PR checked ok.
	(gnats-generate-new-buffer-name): New function.
	(gnats-delete-buffer): Call it.
	(gnats-mail-PR-changed): Do send mail in the other window, now that
	we're keeping the PR buffer.
	(gnats-mode-write-file-hook): Don't try to relock the buffer, we
	should only ever see this hook once.
	(edit-pr): If the PR is already locked, find out who locked it if
	we possibly can.

Tue Mar  2 13:06:13 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnats.elisp (gnats-mail-PR-changed): Default CC to nil, to avoid
	having an empty `Cc:' header.

	* query-pr.c (main): Add 'q'.  Only allow one formatting option.
	Only call query_pr once in any case.
	(long_options): Add new summary option -q/--summary.
	(print_pr): Don't emit a newline for the SQL stuff.  Add printing
	of summary info.
	* query-pr.man: Document the new option.

Mon Mar  1 16:45:54 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* Rename gnats-addr to pr-addr, gnats-edit to pr-edit, and the gnats
	program to file-pr.

Mon Mar  1 02:37:45 1993  Jeffrey Osier  (jeffrey@fowanton.cygnus.com)

	* Makefile.in (gnats.info): No longer needs -I flag for makeinfo.
	(gnats.dvi): Needed "../send-pr" added to $TEXINPUTS.

Sun Feb 28 15:44:42 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* globals.h (MAIL_AGENT): Define to use sendmail.
	(USE_BIN_MAIL): It's baaaaack, it's not defined.
	* internal.c (punt): Don't output a `.' at the end of the message.
	* gnats.c (reply_to_submitter, notify_responsible): Likewise.
	* misc.c (close_mail_file): Instead, do it here, if necessary.
	(open_mail_file): Only use the recipients arg when using /bin/mail.
	
Sat Feb 27 00:28:19 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* Makefile.in (install-tools): Make gnats-edit set-uid gnats here too.

	* man/Makefile.in (TOOLSL, TOOLS1): Deleted.
	(install-tools): Use SRCS1 instead.

	* headers.c (read_header): If the line after a Received: header
	isn't a tabbed id, then just use it normally, don't swallow it.
	Only set `received' to TRUE, never turn it off again.
	(read_header): Cast strdup to a char*.

	* pr.c (init_pr): Don't init ANALYSIS, SOLVED_WHEN, or SOLVED_HOW.
	* pr.h (PR_Name): Delete them.
	(ANALYSIS_STRING, SOLVED_HOW_STRING, SOLVED_WHEN_STRING): Deleted.

	* mkdist.sh (FILES): Look for install-sid.sh, not install-sid.

	* gnats-edit.c (lock_pr): Return an int; if the lock file already
	exists, just exit with non-zero, don't send gnats-admin mail.

	* gnats.elisp (gnats-mode): They're `kept-{new,old}-versions'.
	(edit-pr): Put the temp file in /usr/tmp, since backup-buffer
	refuses to create backup files in /tmp.
	(gnats-mail-PR-changed): Don't mail in the other window.  Call
	gnats-kill-buffer after the mail's set up.
	(gnats-kill-buffer): Make interactive; if the PR is locked, unlock it.
	Delete the backup file we created as well.  Kill the error buffer
	we were working with.
	(gnats-mode): Bind `C-c C-q' and `C-x k' to gnats-kill-buffer.
	(gnats-mode-write-file-hook): Call save-buffer with 64, to create
	the backup file; call gnats-kill-buffer if we aren't sending mail.
	Force the write-file-hooks reversion to be true, since we could
	have a null list of hooks.  If gnats-check-pr failed, then bring up
	the error buffer in the other window, so they can fix things up.
	(gnats-get-list): Go to the buffer we were passed if we're not
	already in it.
	(gnats-delete-backups): New function.
	(gnats-kill-buffer): Use it.

	* query-pr.c (print_pr): Pass !full_report into read_pr, so we
	know if we should prune the reading or not.

	* gnats.elisp (edit-pr): Use make-temp-name instead of random for
	generating the temporary filename.
	(gnats-mode): Use make-variable-buffer-local instead of
	make-local-variable.
	(gnats-kill-buffer): New function.
	(gnats-mode-write-file-hook): Call it.

	* index.c (create_index_entry): Modify a copy of the responsible
	field, not the field itself.
	* gnats-edit.c (modify_pr): Prune off the full name so the index
	doesn't get it.

	* gnats.c (reply_to_submitter): New arg `responsible'.  Create a
	Reply-To: header that has GNATS_ADDR and the responsible person on
	it.
	(gnats): Pass it down.
	(append_notify): Initialize notify_len to 0.

	* gnats-edit.c (modify_pr): Init lock_file to NULL; only call
	unlink when we're not using force.  When looking for the PR in the
	index, be careful not to use prev_index before we actually set it.

	* pr.c (read_pr): If the PR had an Unformatted field, don't wipe
	it out; instead, tack it onto the end of the things we've been
	progressively adding to it.

	* headers.c (lookup_header): Do a case-insensitive match on the
	header name.

	* gnats-edit.c (check_pr): Also warn if the Number field is missing.

	* gnats.c (gnats): Check for a '\0' at the beginning of the line for
	the synopsis and subject as well.

Fri Feb 26 13:06:00 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnats-edit.c (modify_pr): Unlink the .old file when we're done.

	* internal.c (write_index): Pass gnats_root into sprintf; include
	the trailing slash.  Copy the file if a rename didn't work.

	* Makefile.in (mkdist): New rule.
	(all): Depend upon it.
	(install): Don't use install-man.
	(install-gnats): Instead, use it here.
	(install-tools-man): New rule.
	(install-tools): Use it.
	(tools-man-pages): New rule.
	(all-tools): Use it.

	* man/Makefile.in (install-tools-man, all-tools): New rules.

	* gnats.elisp (gnats-pr-errors): New variable.
	(LIBDIR): New variable, substituted in by make.
	(gnats-indent, gnats-states, gnats-state-following): New variables.
	(gnats-check-pr): Run `gnats-edit --check' on the current PR, and set
	gnats-pr-errors if there were any.
	(gnats-file-pr): Call `gnats-edit' to file the PR, returning NIL if
	it failed.
	(gnats-mode-write-file-hook): Call gnats-check-pr first to check it,
	then gnats-file-pr to put it into the database; finally, unlock it.
	If the PR was locked since the last time we tried to write the
	file, tell the user about it.
	(gnats-mode): Don't require send-pr anymore.  Set up a new local
	variable BUFFER-PR.
	(gnats-keyword, gnats-before-keyword, gnats-after-keyword): New vars.
	(gnats-get-list): Renamed to gnats-get-list-from-file; added new fn
	named this, to do the actual list creation.
	(gnats-set-responsibles, gnats-set-categories): Use ...-from-file.
	(gnats-lock): New function.
	(edit-pr): Lock the PR before trying to edit it.  If it's already
	locked, tell the user.
	* Makefile.in (gnats.el): Substitute LIBDIR in.

	* Makefile.in (FLAGS_TO_PASS): New variable.
	(install-man): Pass them also.

	* Makefile.in (install-man): New rule.
	(install): Fire on it.
	(install-gnats): Install mkdist.
	(install-tools): Install edit-pr.

	* gnats.c (gnats): Use field_value, instead of a direct usage of `pr'.

Thu Feb 25 15:38:32 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnats.c (gnats): Don't wipe out the responsible field if it comes
	in with a valid one already.

Wed Feb 24 20:34:41 1993  Tim Wicinski  (tim@cygnus.com)

	* pr.c (init_pr): Don't set pr[ORIGINATOR].name = Text, set its
	datatype. 

Wed Feb 24 13:04:50 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* main.c (main): Don't close fp here.
	* gnats.c (gnats): Instead, do it here.
	(append_report): And here.
	* files.c (init_responsibles): Close the responsible file after
	we're done reading it.

	* pr.c (init_pr): Set the type of ORIGINATOR to be Text.

	* configure.in (AC_SCO_SOCKET): Add new check.
	(AC_HAVE_LIBRARY): Instead of a generic -lsocket check.

	* main.c (unlock_death): New function, to unlock GNATS when we get
	a serious signal.
	(main): Use it as the handler for various deadly signals.

	* gnats.c (run_atpr): Rename `pr' parameter to `bug_name'.  Fix an
	off-by-one error.

Tue Feb 23 16:14:37 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* queue-pr.c (run_gnats): Say each file that's being processed if
	flag_debug's set.

	* gnats.c (run_atpr): Look for /usr/bin/at then /bin/at.

	* pr.c (init_pr): Set the datatype for SOLVED_WHEN, not ANALYSIS,
	for the SOLVED_WHEN field.

	* gnats.c (append_notify): Allocate buf dynamically, since we'll be
	using it a few times; don't leave it on the frame.

	* internal.c (unlock_gnats): Don't complain about the file not
	being there, since we often call unlock_gnats via punt, which can
	get called before lock_gnats.

	* gnats.c (append_notify): If the person isn't in the responsibles
	file, don't give up on them, just include that address (it may be
	an alias).

	* gnats.c (get_bug_number): Don't try to read from the current file
	that we just created.
	(append_notify): Make START begin as a null ptr, so we don't try
	to use it later.  Don't dereference it if it's still null.
	(notify_responsible): Don't create an In-Reply-To: header if we
	didn't get enough info from their message.

Tue Feb 23 15:33:56 1993  Tim Wicinski  (tim@cygnus.com)

	* Makefile.in: make sure gnats-edit and queue-pr depend on
	internal.o to relink.

Tue Feb 23 15:11:21 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* internal.c (punt): Don't try to write to a null file ptr.
	Remember to unlock gnats before exiting.

Tue Feb 23 15:08:15 1993  Tim Wicinski  (tim@cygnus.com)

	* files.c (get_adm_record): change bumping of array constant to
	prevent returning the old 'off-by-one' value.

Tue Feb 23 12:33:10 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* Makefile.in (LIBPROGS): Deleted var.
	(LIBS): Make many rules use it the way they should.
	(install-gnats): Create $(libdir)/gnats first.  Chmod gnats-edit in
	libdir now.
	(gnats.info): Look in ../send-pr.

	* configure.in (AC_HAVE_LIBRARY): Look for -lsocket and -linet for
	syslog.

	* gnats.h (get_next_field): Fix prototype.

Tue Feb 23 12:15:56 1993  Tim Wicinski  (tim@cygnus.com)

	* queue-pr.c: changed queue directory to be 'queue-pr', like it is
	in the Makefile.  fixed FIXME to call punt if chdir fails. 

Tue Feb 23 10:44:08 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* Makefile.in (install, install-tools): Drop in gnats.el.
	(lispdir): New variable.

	* Makefile.in (install, all): Change to install-gnats and all-gnats.
	(ALL, INST): New vars.

	* Makefile.in (install): Put gnats-edit and gnats-addr in
	$(libdir)/gnats, so we can export GNATS_ROOT safely.
	(all-tools, install-tools): New rules.

	* edit-pr.sh (LIBDIR): Added.
	(GNATS_EDIT): Changed to look in libdir.
	(GNATS_ADDR): Likewise.
	* Makefile.in (all): Added edit-pr.
	(edit-pr): New rule.
	(at-pr): Substitute libdir in.
	(clean): Delete edit-pr.
	* at-pr.sh: Run gnats-addr out of LIBDIR.

	* misc.c (mkdir): Added fn, used only with HAVE_MKDIR set.
	* configure.in (AC_HAVE_FUNCS): Look for mkdir.

	* Makefile.in (DISTFILES): Add getdate.c and TAGS.

	* mkcat.sh: Only check for the existance of $LIBDIR/gnats.

Mon Feb 22 13:59:35 1993  Tim Wicinski  (tim@cygnus.com)

	* Makefile.in: remove internal.o from where it is not needed anymore.

	* files.c: should of checked it the first time...

Mon Feb 22 13:47:02 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnats-addr.c (main): If get_responsible_address doesn't give us
	anything, don't try to keep going.

	* mkdist.sh: Finish things up; drop in all files that're
	necessary, include the categories list, and generate a Makefile
	for the whole thing.

Mon Feb 22 02:13:35 1993  Tim Wicinski  (tim@cygnus.com)

	* query-pr.c: call punt instead of log_msg (LOG_ERR). missed last
	time. 

	* queue-pr.c: another miss of calling punt instead of log_msg.

	* gnats.h: moved extern defs of procs in internal.c into globals.h
	* globals.h: received new external procedure defines.

	* misc.c: removed copy_file out of here.... 
	* internal.c: ...and placed it in here. 

	* main.c(main): call init_responsibles () here now, and punt if it
	doesn't build the chain up.

	* files.c(find_responsibles): now if responsible_chain is NULL, go
	back and do the old method of scanning the responsibles file line
	by line. useful for gnats-addr. 
	(init_responsibles):  returns a 0 or 1 depending on success of
	building the linked list. 

	* misc.c: moved procedure punt () from here. removed calls to
	unlock_gnats from log_msg.  changed open_mail_file to return NULL
	if popen() fails. 

	* internal.c: moved punt () to here. added includes for varargs.

	* gnats.c(gnats): changed call to log_msg to punt instead.

	* gnats-edit.c: removed unneed define to config.h
	
	* files.c(find_responsibles): don't punt if init_responsibles ()
	fails, just return NULL.  removed all calls to punt, have NULL
	returned instead. 

	* main.c: change LOG_ERR to LOG_INFO and exit. 

	* files.c: fixed prototype for init_responsibles.

	* internal.c: forgot \n on the fprintf statements. 

	* Makefile.in: include internal.o to everything that uses
	libgnats.a for the time being. this needs to be worked out still
	(release/build issue). 

	* internal.c (lock_gnats/unlock_gnats):  rewritten to now lock and
	unlock gnats-adm/gnats.lock. 

	* query-pr.c: made to use lock_gnats and unlock_gnats. 
	* gnats-edit.c: likewise.
	* main.c:  ditto.

	* misc.c (punt)
	*  (log_msg): use unlock_gnats. 

	* gnats.h: fixed typo. 

	* globals.h: removed unused define GNATS_LOCK.

	* gnats.c (get_bug_number): remove all references to file locking
	in this procedure. Perform this task once per run.

Mon Feb 22 01:35:47 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* index.c (get_index): If we couldn't open the index, then return
	a null Index*.

	* gnats-internal.c: Renamed to internal.c.
	* Makefile.in: Change accordingly.

	* gnats.elisp (gnats-err-buffer): New constant.
	(gnats-mode): Still require 'send-pr for now.
	(gnats-set-responsibles): Grok the responsible list instead of
	trying to run query-pr.
	(gnats-set-categories): New function, grok categories instead of
	running send-pr.
	(gnats-get-list): New function, return a list of the first entries
	from FILENAME.
	(gnats-get-pr-category): New function, return the category for a
	problem report given NUMBER.
	(has-slash): Return T if STRING contains a '/'.
	(edit-pr): Change around to look in the newly structured GNATS
	database, and edit a copy of the file, not the file itself.
	(query-pr): Run query-pr, not query_pr.

Mon Feb 22 01:08:12 1993  Jeffrey Osier  (jeffrey@fowanton.cygnus.com)

	* edit-pr.sh:  added support for gnats-edit (untested)

Mon Feb 22 00:14:04 1993  Tim Wicinski  (tim@cygnus.com)

	* gnats-internal.c: new file containing functions not really need
	for libgnats.a, but useful for many of the gnats internal programs. 

	* index.c: moved write_index.
	* gnats.c: moved add_to_index, lock_gnats, and unlock_gnats.
	* gnats-edit.c: moved add_to_index.
	* misc.c:  moved block_signals and unblock_signals.

	* gnats.h:  update prototypes.

	* Makefile.in:  added gnats-internal.c, moved and changed and
	cleaned up SOURCES and OBJECTS. 

	* gnats.c(notify_responsible): now goes thru the lists of people
	needing to be notified, and calls get_responsible_address for each
	one. 

	* gnats.c(append_notify): new procedure to assist in building
	the addresses. 

Sun Feb 21 23:49:44 1993  Jeffrey Osier  (jeffrey@fowanton.cygnus.com)

	* .Sanitize: keep new file MANIFEST
	* README:    a little jazzier
	* INSTALL:   "install" section from gnats.texi
	* MANIFEST:  New file.
	* gnats.texi: a wee bit o' cleanup
	* gnats.info: current with gnats.texi

Sun Feb 21 23:15:06 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* pr.c (check_enum_types): Use strcasecmp to avoid case problems
	with the value of a field (e.g., `critical' vs an emphatic `CRITICAL').

Sun Feb 21 22:50:49 1993  Tim Wicinski  (tim@cygnus.com)

	* files.c (find_responsible): rewritten to use new routine to build
	linked list of responsible persons. 
	(get_responsible_address): changed to only return NULL if
	not found, let calling proc deal with rejects.
	(init_responsibles): new routine to read in responsibles file
	into linked list. 
	(next_record):  new function used by init_responsibles.
	basically ripped off from get_adm_record.

	* files.h (Responsible): added field 'next' to structure

	* globals.h: added external definition for head of responsibles
	linked list. 

Sun Feb 21 14:25:01 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* query-pr.c (pr_matches): Make it an exclusive test, not an
	inclusive one.

	* misc.c (get_token): Don't skip whitespace before a field's name;
	if it's got whitespace in front of it, it's probably part of the
	PR itself and should not qualify as a normal PR field.

	* index.c (create_index_entry): If there's no responsible field,
	then just leap.

	* pr.c (check_enum_types): Clear out the `next' field of
	bad_enums_end each time we have a new one.

	* queue-pr.c (strip_trailing_slashes): Delete function.
	(copy_reg): Put in misc.c as copy_file.
	(fork_gnats): Use strerror (errno) instead of just the errno for
	punt calls.  Just return the status, don't worry about what it
	might mean yet.
	(drop_msg): Give the name of the queue file and the errno string
	when a rename failed.  When unlinking the queue file fails, log it
	as an error, not as info.
	* gnats.h (copy_file): Add prototype.

	* misc.c (punt): Make it use varargs, calling vfprintf.

	* gnats-edit.c (modify_pr): Allocate the paths when we actually
	need them; give lock_path, not path, to punt for trying to find
	the lock file.  Copy the file if rename failed with EXDEV.
	(main): Just exit if the filename given as an arg to `-f' for checks.
	(lock_pr, unlock_pr): Fix messages.
	(long_options): Change "usage" to "help" and "file" to "filename".
	(usage): Fix usage to have gnats-edit options, not gnats options.
	(version): It's "gnats-edit", not "edit-pr".
	(force): New variable, to bypass checking for an old entry for the PR.
	(add_to_index): Added function, same as in gnats.c but I don't want
	it going into the library.

Sun Feb 21 00:05:03 1993  Tim Wicinski  (tim@cygnus.com)

	* queue-pr.c: fixed typo
	
	* pr.c(read_pr): now use prune variable to skip large fields. only
	called via query-pr.

	* queue-pr.c: use punt and log_msg instead of error.

	* gnats-edit.c: make correct use of punt. 

Sat Feb 20 22:39:06 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* Makefile.in (clean-man): Added rule.

	* gnats-edit.c (usage): Don't declare with a prototype; make static.
	(index_chain): Make local to modify_pr.
	(main): Call usage, delete usage for gnats.

	* man/Makefile.in: New file.
	* Makefile.in (SENDPR_VARS): Renamed to GNATS_VARS.
	(all): Depend upon man-pages instead of man/gnats.8.
	(man-pages): New rule.
	(install): Don't install any man pages.
	(clean): Don't delete them.

	* config.h (DEFAULT_SUBMITTER): New option.
	* gnats.c (gnats): Use it instead of `UNKNOWN'.
	* gnats.h (UNKNOWN): Deleted.
	* pr.c (init_pr): Set SUBMITTER's default value to DEFAULT_SUBMITTER.

	* Makefile.in (install): Install gnats-addr.
	(at-pr): Depend upon Makefile, so variable changes get caught.
	(mkcat, gnats.el, man/gnats.8): Likewise.
	(clean): Delete gnats-edit.

Sat Feb 20 22:02:24 1993  Tim Wicinski  (tim@cygnus.com)

	* Makefile.in: added gnats-edit, as well as added install rules. 

Sat Feb 20 20:42:05 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* mkcat.sh: Add the category to the list in gnats-dist and to the
	one in $LIBDIR/gnats.  Don't use awk to get the categories list.
	* Makefile.in (mkcat): Also substitute LIBDIR and GNATS_SITE.

	* config.h (USE_BIN_MAIL): Deleted.
	* globals.h (MAIL_AGENT): Define to BIN_MAIL.
	* misc.c (open_mail_file): Use the /bin/mail case, but use
	MAIL_AGENT instead of BIN_MAIL.
	(punt): Likewise.
	* gnats.c (reply_to_submitter): Likewise.
	(notify_responsible): Likewise.

	* All files: change `remote' to `responsibles'.

	* pr.c (read_pr): Make prune an int.
	* gnats.h (read_pr): Change prototype.

	* gnats.c (gnats): Cast call to strdup to return `char *'.

	* Makefile.in (clean): Also remove gnats-addr and query-pr.

	* index.c (create_index_entry): Change return type to void.
	(find_pr_category): Return NULL with bad cases.
	(open_index): Return a NULL file ptr if it can't open the file.
	* gnats.h (create_index_entry): Change prototype.

	* query-pr.c (main): Cast nulls.

Sat Feb 20 19:09:48 1993  Tim Wicinski  (tim@cygnus.com)

	* gnats-edit.c: latest checkin. all but --modify should be fine. 

	* gnats-edit.c: --lock, --unlock, and --check seem to be working
	now. The setuid stuff should be looked at more closely. 

        * gnats.c: moved signal blocking procedures to misc.c
        * misc.c: placed signal blocking procedures. 
        * index.c: removed local signal blocking procedures.
        * gnats.h: added prototypes for block_signals and unblock_signals.

Sat Feb 20 18:42:07 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* Makefile.in (VPATH): Don't put it in here.
	(GNATS_SITE, DEFAULT_RELEASE): New variables.
	(SENDPR_VARS): New variable to pass into send-pr's Makefile.
	(all): Add config-send-pr, change gnats.8 to man/gnats.8.
	(config-send-pr): New rule.
	(install): Don't put the samples in if there are files already
	there.  Also install the man pages.
	(install-info): New rule.
	(gnats.8): Changed to man/gnats.8, changed usage inside it.

	* gnats.elisp (gnats-responsibles): New variable.
	(gnats-set-variable-from-shell): New function.
	(gnats-set-responsibles): New function.

Sat Feb 20 18:33:17 1993  Jeffrey Osier  (jeffrey@fowanton.cygnus.com)

	* gnats.texi:  minor changes to install section
	* gnats.info:  New file.

Sat Feb 20 03:26:02 1993  Tim Wicinski  (tim@cygnus.com)

	* gnats-edit.c: slowly lumbering towards something useful. still
	needs work, but more is now understood of what is required by it.

Fri Feb 19 23:05:01 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* pr.c (check_enum_types): Return a `struct bad_enum *'.
	* gnats.h (bad_enums): Delete ref.
	(check_enum_types): Change prototype.
	* gnats.c (gnats): Set it.

Fri Feb 19 22:43:58 1993  Jeffrey Osier  (jeffrey@fowanton.cygnus.com)

	* gnats.texi:  teach me to compile BEFORE I check in...

	* gnats.texi:  added query-pr and edit-pr info

	* at-pr.man:  removed, what was I thinking...

Fri Feb 19 15:20:39 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* at-pr.sh: Use /bin/mail, and mention what category the PR is in.

	* pr.c (check_enum_types): New arg `check'.  Add a msg to
	bad_enums if check is true.
	(bad_enums, bad_enums_end): New vars.
	* gnats.h: Declare bad_enums.
	(bad_enum): New type.
	(check_enum_types): Change prototype.
	* gnats-edit.c (modify_report): Send in a 2 for check.
	* gnats.c (reply_to_submitter, notify_responsible): Tell them about
	the bad enums.

	* gnats.c (notify_responsible): Add timezone to time for analysis.

	* pr.c (check_enum_types): Check if the value's an empty string also.

	* pr.c (init_pr): There's no `System:' field.
	* pr.h (SYSTEM, SYSTEM_STRING): Deleted.

	* main.c (long_options, main): New --help option.
	* query-pr.c, queue-pr.c: Likewise.

	* pr.c (write_pr): Only write out the requested field's value if
	it's non-null.

	* query-pr.c (query_pr): Also check if S is non-null before trying
	to do every PR.

	* at-pr.sh: Grok the responsible person, using gnats-addr.  No
	longer check for an empty synopsis, since GNATS won't let it have
	one anymore.
	* gnats-addr.c (main): Only take the first piece, ignore any real
	name stuff.
	* gnats.c (run_atpr): Don't bother giving at-pr the responsible
	person, it no longer needs it.  Deleted arg `resp'.  Change prototype.
	(gnats): Don't pass responsible down.

	* Makefile.in (LIBSRC): New variable.
	(TAGS): Use it.

	* gnats-addr.c: New file.
	* Makefile.in (DISTFILES): Add gnats-addr.c.
	(all): Add target.
	(gnats-addr): Add rule.
	(SOURCES, OBJECTS, LIBOBJS): Put files.o in the library.
	* globals.h (Remote, get_remote_addr): Move to gnats.h.

	* query-pr.c (main): Trim the program name with basename.
	* queue-pr.c (main): Likewise.

	* query-pr.c (long_options): Add --full and --sql.
	(full_report): New variable.
	(main): Set it if -i/--sql.  Run thru the whole index if they're
	not searching for something special.
	(get_category): If full_report is true, print the entire thing
	out, instead of just the choice bits.  If sql_format's true, print
	out its special format.
	(sql_types, sql_time): New functions.
	(usage): Update it.

	* getdate.y: New file.
	* Makefile.in (DISTFILES, distclean, getdate.c, query-pr): Take care
	of it.
	* configure.in (AC_HAVE_FUNCS): Look for ftime.

	* index.c (write_index): Use tempnam instead of mktemp.

Fri Feb 19 02:49:36 1993  Tim Wicinski  (tim@cygnus.com)

	* gnats-edit.c: new program, suppsoedly setuid. This code has NOT
	been tested. It is checked in as a start. More will come later.

	* index.c: new function write_index to write an index chain to
	disk. currently only write a temp file. 
	
	* gnats.h: new prototype for write_index.

Thu Feb 18 22:36:27 1993  Tim Wicinski  (tim@cygnus.com)

	* pr.c(read_pr): added prune option to read_pr to speed up reads
	during queries and edits. not used yet. 
	* gnats.c:  added extra flag to read_pr. 
	* query-pr.c: added extra flag to read_pr. 
	* gnats.h: added extra flag to prototype.

	* Makefile.in(LIBOBJS): added entry for index.o
	* index.c: new file, containing all current index related
	functions. 
	* gnats.h: extern definition for get_index added.  rearranged some
	other externs definitions. 
	* misc.c: removed all old function calls that are now in index.c. 
	* query-pr.c: moved function get_index to index.c

Thu Feb 18 22:30:11 1993  Brendan Kehoe  (brendan@cygnus.com)

	* main.c (main): Change getopt string, -D doesn't take an arg.

	* pr.c (read_pr): Only trim until we see a non-whitespace char,
	not all the way back leaving only the first word.

Thu Feb 18 18:34:27 1993  Tim Wicinski  (tim@cygnus.com)

	* query-pr.c: used PATH_MAX instead of root_len, quicker to
	calculate. Removed structure Search, used Index instead since it
	is almost identical. get_index now returns Index*, and is ready to
	move to misc.c

	* query-pr.c(query_pr): builds a proper path if variable p
	contains a partial path (ie, based on GNATS_ROOT). 
	* query-pr.c(main): if -d is called, recalculate the root_len to
	prevent malloc woes.  

	* gnats.c(free_remote): don't try to free ptr's if they point to
	GNATS_ADMIN. 

	* gnats.c(gnats): set the category field when it is changed to
	pending in the case where the category exists, but the directory
	doesn't. 

        * gnats.c (gnats): if synopsis is NULL, then dup the Subject string,
        so subject doesn't get the newline stripped. this caused problems
        in writing out the PR. 

        * headers.c(header_init): removed X_MODE.
        * headers.h: removed X_MODE.

Thu Feb 18 18:21:25 1993  Jeffrey Osier (jeffrey@cygnus.com)

	* edit-pr.sh:  uses @GNATS_ROOT@ rather than leaving it blank
	* gnats.texi: more minor clean-up

Thu Feb 18 15:27:49 1993  Tim Wicinski  (tim@cygnus.com)

	* files.c(get_remote_address): since get_adm_record dups a null
	string, an empty field will not be just NULL, but "".  Change the
	check if remote->alias is there, to check for empty string.
	Perhaps it still should check if remote->alias == NULL...

	* misc.c(create_index_entry): append newline to index entry, since
	fputs does not do this for us.

        * pr.c(read_pr): added check so oldi is not used if still -1.
        * gnats.c(gnats): moved add_to_index so where it get run regardless
        of the pr being submitted is still pending or not.

Thu Feb 18 14:22:00 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* Makefile.in (clean): Use `$(LIBGNATS)'.

Thu Feb 18 01:36:15 1993  Tim Wicinski  (tim@cygnus.com)

	* Makefile.in(clean): libgnats.a isn't getting deleted during a
	'make clean'. 

	* headers.c(read_header): added check to see if any headers were
	actually found, and if not, rewind the file. 

	* misc.c(create_index_entry): pull out responsible information
	before writing the index, and strip the fullname which is now part
	of the field value.

	* gnats.c(notify_responsible): changed the xmalloc back to STR_MAX
	for the time being. this still needs to be dealt with.

Wed Feb 17 22:58:50 1993  Tim Wicinski  (tim@cygnus.com)

	* gnats.c(add_to_index): move call to create_index_entry from
	outside of fputs call, which core dumps on sgi currently.
	* gnats.c(gnats): if 'synopsis' is null, use subject, but strip
	newline (opposite of previous fix).

Wed Feb 17 17:57:33 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* pr.c (read_pr): Trim off spaces from the end of field values
	before storing them.

	* gnats.c (gnats): If `subject' is NULL, then they didn't give us
	one; synopsis is either-or.  Append the newline to the `Subject:'.

	* Makefile.in (all): Add query-pr.

	* gnats.c (add_to_index): Don't index the class, add
	confidentiality and priority.
	* pr.h (Index): Add members `confidential' and `priority', delete
	`class'.
	* misc.c (next_index_entry): Grok the new fields, don't set the
	class.
	* query-pr.c (pr_matches): Search for the new entries.

	* misc.c (create_index_entry): New fn.
	* gnats.c (add_to_index): Call it.

	* Makefile.in (gnats.8): Update rule.
	(clean): Remove it.

Wed Feb 17 14:53:03 1993  Jeffrey Osier  (jeffrey@fowanton.cygnus.com)

	* edit-pr.man query-pr.man gnats8.man queue-pr.man
	  at-pr.man mkdist.man mkcat.man:  New files in man/.

	* edit-pr.sh: Changed $EDITOR call for changed-why messages
	to just ask for terminal input using `cat'.

	* edit-pr.sh: Took out stderr redirect on $EDITOR calls.

Wed Feb 17 10:48:00 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* configure.in (AC_ALLOCA): Removed.

Wed Feb 17 08:35:37 1993  Tim Wicinski  (tim@cygnus.com)

	* gnats.h: Removed defines for alloca, since it is never used now.

	* gnats.c(reply_to_submitter): Removed arg `fullname', since it now
	gets set in the responsible field as part of gnats.   Changed
	prototype. 

Tue Feb 16 20:11:47 1993  Jeffrey Osier  (jeffrey@fowanton.cygnus.com)

	* gnats.man:  added new `man' directory, moved gnats.man

	* edit-pr.sh: New file.

Tue Feb 16 17:09:25 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* misc.c (next_index_entry): Return an `Index *'; dynamically
	allocate buf, don't use the frame.
	* gnats.h (next_index_entry): Change prototype.
	(Index): New member `next'.

	* query-pr.c: New file.
	* Makefile.in (DISTFILES): Added queue-pr and query-pr.c.
	(query-pr): Added rule.
	* globals.h (mail_agent, gnats_root, Logging_Methods, log_method):
	Moved into gnats.h.
	* main.c (mail_agent, gnats_root, log_method): Init in misc.c instead.
	* misc.c: Include pathmax.h.
	(open_index): New function to open the index file for reading.
	(next_index_entry): New function to return the next index entry in
	the index file.
	(find_pr_category): Quickly yield the category for a given PR.
	(close_index): Close the index file.
	* pr.h (Index): New type.
	* gnats.h (open_index, close_index, find_pr_category,
	next_index_entry): Add prototypes.	

Tue Feb 16 16:06:17 1993  Tim Wicinski  (tim@cygnus.com)

	* gnats.c (gnats): Handle cases if subject or synopsis are blank,
	and fill in accordingly (or not at all, if both are blank). 

	* pr.c (notify_responsible): Changed size of buf to be from STR_MAX
	to be 32 (for english, i count 26, this will give a little more
	space if need be).

	* btime.c (get_response_time): Deal with edge cases like PRs
	getting submitted at BDAY_END.   Also changed some of the structure
	so weirder edge case like bugs submitted at 5pm friday might get
	dealt with better. 

Tue Feb 16 15:20:10 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnats.h (is_space): New array.
	(SKIP_WHITE_SPACE): New macro, to do array lookups.
	(init_space): Add prototype.
	* misc.c (SKIPWHITESPACE): Deleted macro.
	(init_space): New function.
	(init_gnats): Call it.
	(get_token): Use the new SKIP_WHITE_SPACE instead of a while loop.
	* pr.c (SKIPWHITESPACE): Deleted macro.
	(read_pr): Use the new one instead.

	* pr.c (write_pr): Line the field values up.

Tue Feb 16 14:55:53 1993  Tim Wicinski  (tim@cygnus.com)

	* pr.c (read_pr): Fixed so it doesn't swallow a completely bogus PR.

Tue Feb 16 14:41:39 1993  Jeffrey Osier  (jeffrey@fowanton.cygnus.com)

	* man/gnats.man:  added new `man' directory, moved gnats.man

Tue Feb 16 14:33:49 1993  Tim Wicinski  (tim@cygnus.com)

	* misc.c (get_next_field): checks for end of string before
	attempting to skip over white space. 

Tue Feb 16 11:26:38 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnats.c (safe_env): Deleted.

	* globals.h (append_report): Add prototype. 

	* main.c (main): Delete unused var `reply'.

	* misc.c (get_next_field): Don't make arg `delim' unsigned.
	(read_string): Delete unused var `i'.

	* gnats.h: Include memory.h if HAVE_MEMORY_H is defined.

	* headers.c (write_header): Only pass name if the value's empty.

	* headers.c (readHeader): Rename to `read_header'.
	(LookUpMailHeader): Rename to `lookup_header'.
	(writeHeader): Rename to `write_header'.
	(initHeader): Rename to `init_header'.
	(GetHeaderValue): Rename to `header_value'.
	(SetHeaderValue): Rename to `set_header'.
	* misc.c (GetToken): Rename to `get_token'.
	* pr.c (readPR): Rename to `read_pr'.
	(writePR): Rename to `write_pr'.
	(initPR): Rename to `init_pr'.
	(LookUpPRHeader): Rename to `field_name'.
	(GetPRValue): Rename to `field_value'.
	(SetPRValue): Rename to `set_field'.
	* gnats.c (Free*): Rename to `free_foo'.
	* gnats.h: Change prototypes.

	* misc.c (init_gnats): New function.
	* gnats.h (init_gnats): Add prototype.
	* main.c (main): Call it, instead of initPR and initHeader.

	* main.c (debug_level): Move into misc.c.
	(logfile): Move into misc.c, renaming to `gnats_logfile'.
	* globals.h (debug_level): Move decl into gnats.h.
	* gnats.h (gnats_logfile): Add extern decl.

	* gnats.c (notify_responsible): Avoid null dereferences.

Tue Feb 16 10:32:49 1993  Tim Wicinski  (tim@cygnus.com)

	* pr.c (LookUpPRHeader): Should not take the length of a string
	before checking it.  strcmp called w/o its length argument.

Mon Feb 15 22:18:01 1993  Jeffrey Osier  (jeffrey@fowanton.cygnus.com)

	* gnats.man: Deleted rcs info, added note about mkdist.

	* gnats.man: `gnats (l)' up to date for version 3.0

Mon Feb 15 20:12:58 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* pr.h (ALTERNATE_SUBMITTER): New macro, used for backwards
	compatability.
	* pr.c (LookUpPRHeader): Only take the length of STRING once. Make
	it return a PR_Name, not a short.  If STRING matches with
	`ALTERNATE_SUBMITTER', then return that it matches as the
	SUBMITTER PR field name.

	* Makefile.in (OBJECTS, LIBOBJS): Move headers.o, misc.o, and pr.o
	into LIBOBJS.  Move version.o into OBJECTS.
	(LIBGNATS): New variable and rule.
	(AR_FLAGS): New variable.
	(all, gnats, queue-pr): Depend upon and use $(LIBGNATS) instead of
	$(LIBOBJS).

	* files.c (find_remote): Make a static fn.
	* globals.h (find_remote): Delete prototype.

	* gnats.h: Move most prototypes into globals.h.
	* globals.h (bool, TRUE, FALSE): Move into gnats.h.

	* misc.c (lock_gnats, unlock_gnats, block_signals, unblock_signals):
	Move into gnats.c.
	* gnats.c: Make each of them static.
	* gnats.h: Delete their prototypes.

	* resp-lookup.c: Don't need to include globals.h.

	* gnats-queue.c: Renamed to queue-pr.c.
	* msg.h: Renamed to headers.h.
	* msg.c: Renamed to headers.c.  Include headers.h instead of msg.h.
	* gnats.h: Include headers.h instead of msg.h.
	* Makefile.in: Changed names throughout.

 	* gnats.c (gnats): Call check_enum_types.
	* pr.c (readPR): Not here.
	(check_enum_types): Include the PR number in the report about a
	bad field.
	* gnats.h (check_enum_types): Add prototype.

	* pr.c (check_enum_types): Reset `found' for each field.  Pass the
	default_value for the token, not two values.  Always set it to the
	default value, since every enumerated field should have one.
	(PRentry): Move struct to pr.h, renaming it to `PR_entry'.
	* misc.c (get_next_field): Make arg `delim' be an unsigned char,
	not an int.

	* pr.c (SetPRValue): Avoid calling xmalloc until we know we need
	to use the token.

	* gnats.c (notify_responsible): Renamed `snotify' to `subnotify';
	check for an empty subnotify or cnotify.  New arg `subcontact',
	the contact for a submitter should also receive the message.  Make
	it legal to have a null submitter contact.
	(gnats): Pass it in, calling get_remote_address for their address, if
	it's in there.
	* resp-lookup.c: Don't include pwd.h.
	(get_responsible): Just call get_remote_address.
	since we never use the Remote info
	* files.c: Include pwd.h here instead.
	(get_address): New function, was the body of get_responsible.
	Instead of dup'ing PERSON twice, just set key and alias to be the
	same ptr if PERSON was in the alias file.  Say remote entry not
	found, not responsible person not found.
	(get_adm_record): Check that read_string returns >0, to avoid
	infinite loop.

Mon Feb 15 20:02:55 1993  Jeffrey Osier  (jeffrey@fowanton.cygnus.com)

	* gnats.man: Added old one, will change.

Mon Feb 15 04:22:33 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* misc.c (append_string): Deleted, not used any more.
	* gnats.h (append_string): Deleted prototype.

	* mkdist: New file.

	* Makefile.in (infodir): Added variable.

	* msg.c (decode_site): Deleted function; this will be done
	differently later.

	* msg.c (writeHeader): If the value of the header's null, just
	output the header name.
	* gnats.c (notify_responsible): If the Subject's empty (or
	non-existant), emit the missing newline.

	* pr.h (PR_Name): Change use of `CUSTOMER_ID' to `SUBMITTER'.
	* pr.c (initPR): Likewise.
	* gnats.c (gnats): Likewise.
	(add_to_index): Also put the submitter in the index.  Don't end
	the line with a trailing colon.

Sun Feb 14 16:44:01 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnats.c (notify_responsible): Only talk about when they should
	send a response if verify_analysis() is true.

	* gnats.c (verify_analysis): Check for strcmp == 0 explicitly, and
	don't reverse the logic.

	* files.c (get_adm_record): Delete the trailing newline.

	* gnats.c (reply_to_submitter, notify_responsible): Clean up when
	to insert a newline for a header.

	* main.c (flag_ack, flag_notify, flag_no_atpr): Give default
	values as specified by config.h.
	(long_options): Delete options `notify', `no-atpr', and
	`acknowledge'.
	(main): Change getopt string. 
	* gnats.c (gnats, notify_resonsible): Use them.
	* globals.h (flag_ack, flag_notify): Declare.
	(flag_no_atpr): Delete.

	* misc.c (close_mail_file): Call fflush before pclose.
	* gnats.c (run_atpr): Don't call fclose on the pipe.

	* files.c (get_adm_record): Also ignore empty lines.

	* Makefile.in (at-pr, mkcat, gnats.el): Look in srcdir for the
	originals.  Create temporary outputs, moving them to their real
	names, on the off chance a sed command failed. 

	* Makefile.in (MAKEINFO, TEXIDIR): New variables.
	(info, dvi): Depend upon gnats.texi.
	(gnats.info, gnats.dvi): Add rules.
	(install): Install gnats.info* into infodir.

	Fix arbitrary line truncation.
	* misc.c (read_string): Don't delete the trailing newline.  If the
	line is empty, return a length of 1.
	* msg.c (readHeader): Change what it thinks is a blank line.
	Don't emit a newline between the `Received:' header and its
	continuation, since it now ends in a newline itself.
	(writeHeader): Don't emit a newline after any header.
	* pr.c (readPR): Only go after tokens if the length's > 1.  Don't
	add any newlines; if it's a non-MultiText field, then take the
	newline off then---they're the only fields that have a value that
	needs it removed.

	* msg.c (initHeader): Delete extra space after `References:'.
	(writeHeader): Don't put a space between the name and value if
	it's SM_FROM (aka, `From ').

	* pr.h (PR_START_FIELD): New macro.
	* pr.c (readPR): Only try to resolve tokens if they could possibly
	be a PR field (they begin with PR_START_FIELD), so we can (among
	other things) avoid trying to match every RFC-822 header.  Instead
	of assigning `l' and then just setting it again, pass line itself
	down into GetToken.

	* misc.c (read_string): Return the length of the string.
	Decrement `i' if it's got a newline at the end.
	* pr.c (readPR): Get the length of the line here, to avoid calling
	strlen twice on the same string.  If len was 0, then avoid doing
	the lookups.  Call xrealloc instead of doing it by hand.

	* gnats.h (read_string): Change prototype.
	* msg.c (readHeader): Make `i' an int, not a short.

	* gnats-queue.c (fork_gnats): Pass `-D' into gnats if gnats-queue was
	given an arg to set flag_debug. 

	* Makefile.in (clean): Delete mkcat.

	* gnats.c (gnats): Fix call to punt, it should be fatal when it
	can't create pending.

	* main.c (main): Use punt, not error.

	* gnats.h (close_mail_file, log_msg): Add prototypes.
	(find_submitters): Fix typo, it's find_submitter.

	* gnats.h: Don't include pr.h.

	* pr.c (readPR1): Deleted, the new readPR works.
	(struct PRentry): Delete field `created'.
	(initPR): Don't set it, we don't need it.
	(readPR): Use memcpy, not bcopy.

	* Makefile.in (all, mkcategories, install): Change to mkcat.

	* gnats.h: Include sys/types.h for things like dev_t that might
	show up in sys/stat.h.

	* mkcat.sh (GNATS_ROOT, CATEGORIES): Adjust so they work.  Don't
	use getopts.  Delete lines with only whitespace, not just
	precisely empty lines. 
	* Makefile.in (install): Install mkcategories.  Also install the
	sample files.

	* config.h (USE_BIN_MAIL): Default this to FALSE.

	* gnats.c (create_report): Don't clear errno.
	* misc.c (log_msg): Don't pay attention to errno.

Sun Feb 14 03:34:29 1993  Jeffrey Osier  (jeffrey@fowanton.cygnus.com)

	* gnats.c (reply_to_submitter): Don't mention the support site in
	the automatic acknowledgment message.

Sat Feb 13 13:08:51 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* Makefile.in (DISTFILES): Don't include COPYING.LIB.

	* resp_lookup.c: New file.
	* gnats.c: Don't include pwd.h.
	(get_responsible): Move to resp_lookup.c.
	(gnats): Call it with a pointer to the category instead.
	* gnats.h (get_responsible): Change prototype.
	* Makefile.in (SOURCES, OBJECTS): Add resp_lookup.

	* misc.c (punt): New function.
	* gnats.c, files.c, main.c, misc.c: Rather than use LOG_ERR, always
	send GNATS_ADMIN mail about the problem by calling punt, except in
	mail areas.

	* main.c (main): If the debug_level won't let us emit the usage,
	then let GNATS_ADMIN know about incorrect usage.

	* gnats.c (get_bug_number): Call block_signals/unblock_signals.

	* config.h (ACKNOWLEDGE): Add define.
	* gnats.c (gnats): Use it around the call to reply_to_submitter.

	* globals.h (LOG_DEBUG): Delete.

	* globals.h (LOG_ERR, LOG_INFO, LOG_DEBUG): If they don't have
	syslog, define these to be ascending numbers, for debug purposes.
	(LOG_NONE): New define, value for debug_level at release time.
	* main.c (main): For debug option, set debug_level to LOG_INFO,
	don't expect them to give us an argument.

	* gnats.c (create_report): Clear out errno after calling stat,
	since (if the test worked) it will have ENOENT anyway.

	* pr.c (initPR): Delete debug message.

	* misc.c: Include signal.h.
	(block_signals, unblock_signals): Ignore/enable user interrupts.
	* gnats.h (block_signals, unblock_signals): Declare them.
	* gnats.c (create_report, add_to_index, notify_responsible,
	reply_to_submitter): Call block_signals/unblock_signals.

	* Makefile.in (all): Add gnats.el target.
	* gnats.elisp (report-pr, file-pr): Delete fns and autoloads.

	* field.c: Rename to gnats.c.
	* Makefile.in (SOURCES, OBJECTS, field.o): Change accordingly.

	* gnats-queue.c (fork_gnats): Dup fd 2, not fd 3.

	* field.c (verify_analysis): New function.
	(gnats): Use it as a predicate for running at_pr.  Call notify_responsible
	with the contract type, response time, and expiry.
	(notify_responsible): New args `type', `rtime', and `expired'.  Tell the
	person responsible when the first analysis should be sent, if
	NOTIFY is defined.

	* Makefile.in (.c.o): Pass in GNATS_ADDR.
	* field.c (reply_to_submitter): Use it for the `From:' field.

	* field.c (gnats): If a PR fell into pending, don't do anything
	but send it to GNATS_ADMIN.
	(notify_responsible): If there was nothing for SNOTIFY or CNOTIFY,
	don't try to Cc: to them.

	* msg.c (close_mail_file): New function, to match open_mail_file.
	* files.c (reply_to_submitter, notify_responsible): Use it.
	* main.c (main): Likewise, for MAIL logging.
  
	* field.c (notify_responsible, reply_to_submitter): If
	USE_BIN_MAIL isn't defined, pass NULL, not an empty string.

	* main.c (flag_no_atpr): Default to FALSE.

	* msg.c (readHeader): Reset `received', so we can swallow as many
	sets of `Received:' headers as we want.

	* misc.c (copy_string): Delete.
	* gnats.h (copy_string): Delete prototype.
	* field.c, files.c, msg.c, pr.c: Change all callers to use strdup
	instead of copy_string.

	* gnats-queue.c (fork_gnats): Return the status of the gnats child.
	(run_gnats): Get the value from fork_gnats, and only unlink the file
	if the child ran okay.

	* at-pr.sh: Full rewrite.

	* btime.c: Don't include time.h or assert.h.
	(get_response_time): Return the tm struct for when their time's
	up.  Don't call assert.
	* gnats.h: Instead, include time.h here.
	(get_response_time): Add prototype.
	* main.c (at_pr): Deleted.
	* globals.h (at_pr): Deleted.
	(flag_run_atpr): Add decl.
	* field.c (run_atpr): New function.
	(safe_env): New array.
	(gnats): Call it.  Don't say it's expired if the `rtime' field of
	SUBMITTER is -1, since that means *don't have one*.  New variable
	`arrival_time', to make the code a little more readable.  New
	variable `number', so we can pass it into run_atpr.  Use the value
	returned by get_response_time for run_atpr to munge.

	* files.c (get_adm_record): Start ERR at 0, not -1, and adjust
	code accordingly.

	* misc.c (log_msg): Fixup for __STDC__ vs non-std.

	* msg.c (initHeader): Delete debug message.

	* misc.c (log_msg): Use varargs instead.  New arg `HAS_ARG'.
	* gnats.h (log_msg): Delete prototype.
	* pr.c, main.c, files.c: Fix all calls to not include a useless
	third argument.

	* main.c (flag_at_notify): Renamed to `flag_no_atpr'.
	(long_options): Changed.
	* field.c (gnats): Change usage.
	* globals.h (flag_run_atpr): Renamed.

	* Makefile.in (*.c deps): Changed to *.o, add config.h as well.
	(gnats-queue.o): Add header dependencies.

	* field.c: Don't include sys/file.h, we don't need it.
	(check_if_reply): Don't call append_report; instead, return the path.
	(get_bug_number): Rename `lck' to `lock_file'.  Use STR_MAX
	instead of 256 for the dimensions for `sbuf'.
	(append_report): Make global.
	* main.c (main): If check_if_reply is non-null, call append_report.
	* gnats.h (check_if_reply): Change prototype.
	(append_report): Add prototype.

	* main.c (main): Turn on all disabled options.  Use getopt_long.
	(long_options): Created struct.
	(main): Revise usage.
	(customer_id): Rename to `submitter'.
	(at_pr): Create with `gnats_root', not `GNATS_ROOT'.
	(autocreate, notify, at_notify): Rename to `flag_'foo.  Make int,
	not bool.
	* gnats-queue.c (long_options): Give 'd' and 'f' back to getopt for
	--directory and --file.  Set `HAS_ARG' and `VAL' fields properly.
	* field.c (gnats): Rename uses of `autocreate' to `flag_autocreate'
	* globals.h (autocreate): Likewise; make int.

	* mkcategories.sh: Renamed to mkcat.sh, for filename length limits.
	* Makefile.in (mkcategories): Use mkcat.sh instead of mkcategories.sh.
	(DISTFILES): Change it.

Fri Feb 12 12:26:26 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* submitters, categories, remote: New sample files.

	* files.c (get_adm_record): Make static.
	* misc.c (lock, unlock): Rename to `lock_gnats' and `unlock_gnats'.
	* gnats.h (get_adm_record): Delete prototype.
	(lock, unlock): Change names.

	* mkcategories.sh (GNATS_ROOT): Replace with substitute string.
	* Makefile.in (all): Add mkcategories.
	(mkcategories): New rule.
	(DISTFILES): Add at-pr.sh, mkcategories.sh, error.c, xmalloc.c,
	gnats.elisp, gnats.texi
	(install): Add chowns as appropriate.
	(*.c dependencies): Modify appropriately, setting all of
	$(SOURCES) dependant upon gnats.h and globals.h.

	* files.h (CU_*, CA*_): Deleted unused macros.

	* globals.h (bool): Made a short, not a char.
	(gnats_max): Deleted.

	* Makefile.in (clean): Also use mostlyclean.  Delete *.dvi and
	mkcategories as well.
	(mostlyclean): Get rid of TeXinfo cruft.
	(realclean): Delete GNATS info files, and processed indices.

	* gnats.els: Rename to gnats.elisp.

Thu Feb 11 21:56:48 1993  Jeffrey Osier  (jeffrey@cygnus.com)

	* created gnats.texi, outline only...details on the way

Thu Feb 11 12:58:55 1993  Tim Wicinski  (tim@cygnus.com)

	* mkcategories: new shell script to create category directories based 
	on categories file.

	* globals.h: remove extern mail_agent since we will now just use a
	#define only for that one. 

	* main.c: ifdef'ed out all unused options. will be removed in the
	next few days barring any unforseen situations. 

	* pr.h: removed an unneeded define, cleaned up the strings some.

	* field.c(create_report): check for file existence here instead of
	everywhere where it gets called. 

	* files.h: removed bogus fields from structures, and changed a few
	defines, cleaned up some comments. 

	* globals.h: changed prototype of SetPRValue.

	* pr.c(SetPRValue): changed return call to be of type bool. Also
	checks when an Enum type is being set, and makes sure it is
	getting set with a correct value.

Thu Feb 11 12:44:18 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnats-queue.c (fork_gnats): Don't chdir to QUEUE_DIR.
	(run_gnats): Instead, do it here and opendir on ".".

	* main.c (at_pr): Make local to main, it's never used elsewhere.
	* globals.h (AT_PR, at_pr): Deleted.

	* globals.h (BINDIR): Define just as "/gnats-bin".
	* main.c (main): Build the at_pr name using GNATS_ROOT also.
	* gnats-queue.c (fork_gnats): Likewise.

Thu Feb 11 00:08:57 1993  Tim Wicinski  (tim@cygnus.com)

	* main.c (main): Threw out the options `-T' (trace), `-o'
	(redirected output), and `-p' (print comment).

	* globals.h (NOTIFY, AB, CHECK_IS_REPLY): Deleted old macros.

Wed Feb 10 23:27:11 1993  Tim Wicinski  (tim@cygnus.com)

	* Makefile.in (install): Also create the dir `gnats-queue'.

	* msg.h (X_MODE_STRING, SM_FROM_STRING, RETURN_PATH_STRING,
	RECEIVED_STRING, MSG_ID_STRING, DATE_STRING, FROM_STRING,
	SENDER_STRING, REPLY_TO_STRING, TO_STRING, APPAR_TO_STRING,
	CC_STRING, IN_REP_TO_STRING, SUBJECT_STRING, REFERENCES_STRING,
	COMMENTS_STRING, KEYWORDS_STRING, X_SEND_PR_STRING): Deleted macros.
	* msg.c (initHeader): Replaced macros with real strings.

	* files.c (find_categories/find_submitters): Don't default the
	`notify' field to gnats-admin if it's empty---leave it empty.
	* field.c (notify_responsible): Check if the notify field's empty
	before trying to send mail.

Wed Feb 10 13:42:59 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* gnats-queue.c (fork_gnats): chdir to queue_dir before firing off
	gnats.
	(run_gnats): Unlink the queued file when it's been processed by gnats.

Wed Feb 10 00:11:33 1993  Tim Wicinski  (tim@cygnus.com)

	* misc.c: fixed type with #else stmt.

	* field.c (reply_to_submitter/notify_responsible): 
	* misc.c (open_mail_file):
	* main.c: 
	* globals.h: replaced all references of global variable
	use_bin_mail with #define USE_BIN_MAIL instead. This seems to be
	more of a compile time and not run time feature.

	* field.c: added places when it sends me mail for the time being,
	until we get it all straightened out.

Tue Feb  9 14:32:26 1993  Tim Wicinski  (tim@cygnus.com)

	* pr.c(readPR): totally rewritten in order to make it faster. use
	buffer mgmt instead of lame string handling functions. works fast
	on big files. 

	* pr.h: added those evil and insidious '>' back to the front of
	the PR fields.

	* main.c(main): added third arg to log_msg call. 

	* field.c(gnats): rearranged site debug msg. changed comments.

	* gnats.h: added extern for log_msg.

	* Makefile.in: added install rules (first pass). Sample files and
	man pages need to be added still. 

	* gnats-queue.c: added #define for MAXBSIZ for time being.


Mon Feb  8 11:54:20 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* field.c (gnats): If the bits for MODE aren't defined, force it.  

	* gnats.h (alloca): Undef before defining if __GNUC__.

	* msg.c (readHeader): Call xmalloc instead of alloca.
	* gnats-queue.c (fork_gnats): Likewise.
	(drop_msg): Likewise.

	* gnats-queue.c (run_gnats): Cast strdup to a char*.

	* main.c (main): Don't try to stringify ("foo" "bar" -> "foobar")
	for the usage.
	* pr.c (initPR): Likewise, for AUDIT_TRAIL.

	* at_pr.sh: Renamed to at-pr.sh.
	* Makefile.in (at_pr): Renamed to at-pr.
	(clean): Delete at-pr instead.

	* Makefile.in (gnats-queue): Add compilation rule.

	* Makefile.in (clean): Delete gnats-queue.
	(DISTFILES): Add queue.h.

	* gnats-queue.c (drop_msg): Unlink the queue file from /tmp when
	it's done being moved.

	* gnats-queue.c, queue.h: New files.
	* Makefile.in (gnats-queue): New rule.  Use LIBOBJS.
	(LIBOBJS): Move error.o, xmalloc.o, and version.o to here.
	(OBJECTS): Delete them from here.
	* main.c (main): New arg `f', to receive input from a file.

	* configure.in (AC_DIR_HEADER): Add.

	* gnats.els (GNATS-DB): Deleted variable.
	(edit-pr): Use GNATS-ROOT instead.

	* Makefile.in (GNATS_ROOT, GNATS_ADDR): New vars.
	(.c.o, at_pr, gnats.el): Pass them.
	* gnats.els: New file.
	* config.h (GNATS_ROOT): Deleted.

	* at_pr.sh: New file.
	* Makefile.in (at_pr): New rule.
	(all): Add it to all.
	(clean): Delete at_pr.

	* globals.h (BDAY_START, BDAY_END, BWEEK_START, BWEEK_END): Deleted.
	* btime.c: Moved here.

	* config.h: New file.
	* Makefile.in (DISTFILES): Added it and other headers.
	* field.c, files.c, main.c: Include it.
	* globals.h (GNATS_ROOT, NOTIFY): Move there.
	(CYGNUS_SUPPORT, SUN_CUSTOMER, INDENT): Deleted.
	* main.c (SUN_CUSTOMER): Deleted.

	* globals.h (AT_PR): Deleted.
	* main.c (main): Set it up at run-time.  Rename local `at_pr' to
	`at_notify'.
	(at_pr): Don't init yet.

	* configure.in (AC_REPLACE_FUNCS): Deleted.

	* main.c (version): Output newline.

	* Makefile.in: Add dependencies for misc files.

	* pr.h (PR_type): Create enum instead of defines.
	pr.c (TEXT, MULTI_TEXT, ENUM, INT, RECEIVER): Change uses.
	(PRentry): Change types.

	* field.c (reply_to_submitter): Only use FULLNAME if it's non-null.

	* error.c, xmalloc.c: New files.
	* Makefile.in (SOURCES, OBJECTS): Add them.

	* gnats.h: Add checks for getting string.h/strings.h, getopt, et al.
	* btime.c: Include it.

	* files.c: Include pathmax.h.

	Merge in stuff from src/Makefile.in.
	* Makefile.in (VERSION, SOURCES, OBJECTS): Add vars.
	(DISTFILES): Add SOURCES.

Sat Feb  6 01:19:44 1993  Tim Wicinski  (tim@cygnus.com)

	* field.c (add_to_index): New function which adds new PRs into a
	small index that query_pr can probably use. A definite first pass.

	* gnats.h: Include globals.h.

	* main.c (AT_PR): Changed to `at_pr'.
	* globals.h (AT_PR): Likewise.

	* field.c (get_responsible): Changed fn to return structure
	remote that includes full name of responsible person. This new
	feature will be mailed out to submitters in acknowledgements. 

	* gnats.h: Added new as well as more function prototypes.

	* misc.c: Check system call returns. 

	* main.c: Removed old and crusty variables and defines.

	* globals.h: Removed some old defines and variables that are
	unused.  Added comments describing definable options.

	* files.h: Removed all instances of the word "Customer".
	* files.c: Likewise.
	* field.c (gnats): Changed `Customer' to `Submitter'.  Changed
	handling with respect to get_responsible.  

Fri Feb  5 09:24:54 1993  Tim Wicinski  (tim@cygnus.com)

	* main.c: added code which does checking to see if incoming
	message is a reply to a preevious PR. moves some code from procedure
	gnats() over here. 

	* btime.c: changed contributor address, added small code to remove
	trailing newline from ctime(3C).

	* field.c: rewrite parts of procedure gnats. more checking about
	correct bug category to insert bugs; added procedure append_report
	(used in main); changed ack message sent submitters; removed
	unused variables and cleaned up code to make it meet facist coding
	standards. lots changed here.

	* misc.c,pr.c: changed contributor.

	* files.c: rename of all readFname functions, changed names to
	find_Fname, added procedure get_adm_record that does all file
	parsing. Other cleanup as well.

	* globals.h: removed GNATS_DB, GNATS_ADM, and MAX_ADM_FILES defines,
	added define for NOTIFY. 

	* gnats.h: changed function prototypes for procedures in files.c.

Sun Jan 31 00:17:04 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* pr.c (writePR): If it's a MULTI_TEXT field, output a newline
	before starting to print the field's value out.
	(initPR): A RELEASE is a single TEXT line, not MULTI_TEXT.

	* field.c (get_bug_number): Only try to grab a lock on the lock
	file if it already existed---if we opened for writing, don't bother.

	* configure.in (AC_HAVE_HEADERS): Look for memory.h.

	* btime.c, field.c, files.c, main.c, msg.c, pr.c: Include system.h.
	* main.c: Include gnats.h.

	* gnats.h (xmalloc, xrealloc): Declare.

	* main.c (main): Return void.

	* mkdir.c: Include ansidecl.h.
	(mkdir): Make arg DMODE be mode_t (FIXME).
	* basename.c: Use HAVE_STRING_H, not USG.

	* lib/Makefile.in (.c.o): Look in ../../include.

	* main.c (main): Call openlog with LOG_PID, not LOG_ODELAY.  If
	LOG_USER isn't defined, we've got the old syslog (e.g., Ultrix v3 & 4),
	so don't give openlog the facility argument.  If we don't have
	syslog facilities, don't accept them as possible alternatives for
	error messages.
	(log_level): Only define if HAVE_SYSLOG_H.
	* msg.c, field.c, files.c, pr.c: Include syslog.h.
	* misc.c (log_msg): Don't try to use SYSLOG if it's not there.
	* globals.h (LOG_ERR, LOG_INFO, LOG_DEBUG): Define to 0 if we
	don't have syslog.h.
	(LOGGING): Default to MAIL if they don't have syslog.
	(log_level, LOG_LEVEL): Don't mention (or set) if we don't have syslog.

	* conf.h: Delete.
	* btime.c, field.c, files.c, main.c, misc.c, msg.c, pr.c: Don't
	use it.

	* Makefile.in (distclean, realclean): Add rules to clean top-level.

Sat Jan 30 15:06:07 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)

	* src/Makefile.in (srcdir, VPATH, OBJECTS): Add vars.
	(gnats): Use `OBJECTS', not `OBJS'.
	(LIBIBERTY): Deleted.

	* misc.c: Include system.h.  Wrap HAVE_SYSLOG_H around syslog.h.

	* pathmax.h: New file.

	* configure.in: Use AC_HAVE_HEADERS instead of individual AC_HEADER_CHECKs.
	Use AC_ALLOCA; add AC_OUTPUT; don't use AC_USG.

	* man/Makefile.in: New file.

	* alloca.c, error.c, getopt.c, getopt1.c, getopt.h, system.h: New files.
	* lib/Makefile.in (SOURCES, OBJECTS, DISTFILES): Add them.
	(getopt1.o): New rule.

	Total reorganization, to match other GNU things and use autoconf.
	* Makefile.in: Rewritten.
	* configure.in: Now use autoconf.
	* configure, README, INSTALL, COPYING, COPYING.LIB: New files.
	* lib/{mkdir.c, Makefile.in, basename.c, strstr.c, xmalloc.c}: New files.
	* man/: New dir for manuals (eventually).
	* include/: Deleted, moved headers into src/.
	* misc.c (xmalloc, xrealloc): Deleted, now in libgnats.a.

	* Makefile.in (VERSION): Add variable.
	(version.c): Add rule for creation.
	(SRCS, OBJS): Add version.[co] to lists.
	* globals.h (VERSION): Delete macro.
	(version_string): Add var decl.
	* main.c (version): New fn to print out version_string from version.c.
	* misc.c (version): Delete fn.
	* gnats.h (version): Delete decl.

	* main.c, globals.h: Rename macros from `D_FOO' to just `FOO'.

	* main.c (GNATS_ROOT, GNATS_DB, GNATS_ADM, MAIL_AGENT, BIN_MAIL,
	LOG_LEVEL): Rename to lowercase names.
	(VERSION, GNATS_ADMIN): Delete, use the macros.
	(LOGGING): Renamed to log_method.
	Changed uses in necessary files.
	* globals.h: Change decls.

	* globals.c: Move this stuff into main.c.
	(PENDING, UNKNOWN): Move into gnats.h as macros.
	* Makefile.in (SRCS, OBJS): Delete globals.[co].

	* gnats.h (COL, COLB, ES, NILSTR, NL, QUOTE, SL, SPACE, TAB): Delete.
	Change all files to use the characters, rather than obscuring
	things by using these macros.

	* field.c, files.c, main.c, msg.c, pr.c: Make many functions be
	static.  Include ansidecl.h to get PARAMS; use PARAMS.
	* gnats.h (PROTO): Delete; change uses of PROTO to PARAMS.  Add a
	bunch of prototypes.

	* msg.c (readHeader): Pass LINE into GetToken, and check line against
	'\0', to avoid an unnecessary assignment.

	* btime.c: Include assert.h.

	* misc.c (SKIPWHITESPACE): Wrap uses of `l' with parenthesis.
	Check that `*(l)' isn't a null byte, not `*line'.

	* misc.c (xmalloc, xrealloc): New functions.  Every file uses them
	instead of malloc/realloc now.
	* gnats.h (xmalloc, xrealloc): Add decls/prototypes.

	* field.c: Use `PROTO' for function prototypes.
	* gnats.h (PROTO): Define to include args if __STDC__.

	* btime.c (get_response_time): Bail if response_buf is NULL.


Local Variables:
mode: indented-text
left-margin: 8
fill-column: 74
version-control: never
End:
