2007-07-15  Bruce Korb  <bkorb@gnu.org>

	* autoopts/usage.tpl: new - emits usage text (full or short).
	* autoopts/getopt.tpl: use it
	* autoopts/optlib.tpl: use it, when the usage text string is empty
	* autoopts/optcode.tpl(OPTPROC_X_LAT_USAGE): remove -- not needed
	* autoopts/opthead.tpl(version): reorder it

2007-07-14  Bruce Korb  <bkorb@gnu.org>

	* VERSION: Going to revision 30 of the interface.
	* agen5/loadPseudo.c(doSuffixSpec): require that there be something
	after the '=' marker in a suffix specification.  Make sure any
	allocated memory is deallocatable.
	* agen5/tpProcess.c(processTemplate): deallocate the file name format
	string, if necessary.
	* autoopts/optcode.tpl(full-usage): new
	(short-usage): new -- make it optional to have the full usage text
	produced so that it can be readily translated.
	* autoopts/options_h.tpl(struct options): add pzFullUsage and
	pzShortUsage
	* autoopts/optlib.tpl(usage-text): new macro for producing the text.
	* autoopts/proc-state.def(bit): bit numbers must not ever wiggle, so
	fix them all.
	* autoopts/test/nls.test: augment for translatable usage text.
	* autoopts/usage.c(optionUsage): give priority to usage strings over
	computed usage text.

2007-07-04  Bruce Korb  <bkorb@gnu.org>

	* *EVERYWHERE*: update licensing terms to GPLv3

2007-05-28  Bruce Korb  <bkorb@gnu.org>

	* agen5/schemedef.scm (make-header-guard): remove
	* agen5/expOutput.c (ag_scm_make_header_guard): written in C.
	Will not put multiple underscored together.
	* agen5/expString.c: code cleanup
	* options/options.tpl: make sure no two options use the same flag char.
	* snprintfv/printf.c: remove excessive logic nesting.

2007-04-28  Bruce Korb  <bkorb@gnu.org>

	* autoopts/getopt.tpl: include stdio.h and string.h and #define a value
	for DIRCH, setting it to '/' normally, but '\\' for Windows.

2007-04-28  Bruce Korb  <bkorb@gnu.org>

	* config/libopts.def (optional_args): new configurable.  Default
	is enabled, so users must specify, --disable-optional-args to
	disable optional arguments to command line options.
	NO_OPTIONAL_OPT_ARGS is #defined if this is specified.
	* autoopts/optcode.tpl (version):
	Set the --version option flags to different values, depending upon
	whether NO_OPTIONAL_OPT_ARGS is defined or not.  --version will not
	take an argument if this is undefined.
	* autoopts/options_h.tpl (OPTST_ARG_OPTIONAL):
	Set to zero if NO_OPTIONAL_OPT_ARGS is defined.  i.e. never set this
	bit when client code is compiled with --disable-optional-args
	* autoopts/version.c (printVersion): If the caller was compiled with
	NO_OPTIONAL_OPT_ARGS defined, then default to a plain version-only
	output.
	* autoopts/test/errors.test: test that the autoopts templates can
	detect conflicting flag values.
	* compat/windows-config.h: also include limits.h
	* config/confmacs.tpl: cleanups
	* getdefs/gdinit.c (validateOptions): set a name if --srcfile or
	--linenum are not specified or are specified with an empty string.
	* getdefs/getdefs.c (doPreamble): do the same thing for --filelist

2007-04-14  Bruce Korb  <bkorb@gnu.org>

	* autoopts/autoopts.c (doPresets): Check for a "save_opts" option.
	If present, the next option is the load opts option.  When doing presets,
	check for a disablement and do not load files or enviornment presets
	if --no-load-opts has been specified.  General cleanup of LOAD_OPTS
	environment variable handling.
	* autoopts/autoopts.h: add some new exit codes: EX_NOINPUT, EX_SOFTWARE
	and EX_CONFIG.
	* autoopts/configfile.c: use a couple of these for "config file not
	found" (EX_NOINPUT) and "you did not pass a valid option def structure"
	(EX_CONFIG).
	* autoopts/environment.c (checkEnvOpt): process one option specific
	environment variable.  (doEnvPresets): call that routine for
	${PROGNAME_LOAD_OPTS} also.
	* autoopts/usage.c (optionUsage): implement "usage" option (triggered
	when "usage_exit_code" is set to EX_USAGE).
	* autoopts/options_h.tpl (sysexits.h): conditionally include this
	* autoopts/install-options-h: strip out the conditional "sysexits.h"
	inclusion and insert the include directly, if present.
	* autoopts/options.tpl (usage-opt): new attribute used to trigger
	addition of "usage" option.  Implement "usage" option.
	* autoopts/optcode.tpl: Implement "usage" option.
	* autoopts/opthead.tpl: Implement "usage" option.
	* autoopts/optlib.tpl:  Implement "usage" option.

2007-03-24  Bruce Korb  <bkorb@gnu.org>

	* agen5/directive.tpl: disable "inline" from generated code.  The CVS
	version of GCC objects to some constructs.  Also, hide output from
	"make"
	* agen5/fsm-macro.tpl: Some compilers feel uncomfortable using the
	"address of" operator on a procedure, so do not generate the dispatch
	table with that operator.
	* agen5/defParse-fsm.c: regenerate
	* agen5/tpLoad.c (loadMacros): use the "z" size modifier for size_t
	format arguments

2007-03-19  Stepan Kasal  <kasal@ucw.cz>

	* Makefile.am (MAINTAINERCLEANFILES): Remove files generated by
	  autotools.
	* snprintfv/Makefile.am:
	* doc/Makefile.am:
	* getdefs/test/Makefile.am:
	* getdefs/Makefile.am:
	* pkg/Makefile.am:
	* columns/Makefile.am:
	* agen5/test/Makefile.am:
	* agen5/Makefile.am (MAINTAINERCLEANFILES): Remove Makefile.in

2007-02-18  Bruce Korb  <bkorb@gnu.org>

	= REL 5.9

2007-02-11  Bruce Korb  <bkorb@gnu.org>

	* autoopts/autoopts.c (handleOption): misuse of format argument indexing
	was overlooked several years ago. :(
	* autoopts/usage-txt.def (AtMost): fix the string
	* config/bootstrap.local (config_versions): bootstrap debian packaging
	* pkg/mkpkg.debian: new
	* pkg/debian/*: new
	* pkg/mkpkg.sh: check for debian packaging tools & use 'em if found.

2007-02-03  Bruce Korb  <bkorb@gnu.org>

	* agen5/tpLoad.c (findFile): add a "pzReferrer" argument.  The
	dirname from that string is now used for searching for files.
	That directory is used after the current dir and before the search
	list.
	(loadTemplate): also needs a referrer argument to pass through to
	the findFile function.
	* agen5/*.*: fix findFile & loadTemplate calls
	* autoopts/load.c (optionMakePath): accept "$@" to mean pkgdatadir
	* autoopts/Makefile.am (libopts_la_CFLAGS): define to:
	-DPKGDATADIR='"$(pkgdatadir)"'

2007-01-29  Andreas Schwab  <schwab@suse.de>

	* agen5/loadPseudo.c (copyMarker): make the last arg be size_t*

2007-01-27  Bruce Korb  <bkorb@gnu.org>

	= REL 5.8.9

2007-01-27  Bruce Korb  <bkorb@gnu.org>

	* autoopts/nested.c (scanXmlEntry): do not include closing '>' in val
	* */Makefile.am: mark with .NOTPARALLEL
	* autoopts/test/defs.in: make GREP, EGREP and FGREP configurable
	* */test/*.test: use these instead of fixed name commands
	* autoopts/makeshell.c (optionParseShell): using a configurable in
	a generated script is pretty pointless -- especially for code intended
	to be removed.  Therefore, emit a plain, vanilla "grep" command.
	* config/misc.def: special Debian dispensation: avoid using
	"guile-config" to derive version since they do not use any standard
	configuration tools.  Use "dpkg" to determine the Guile version.
	use AC_PROG_GREP et al. for $(GREP) variables.

2007-01-17  Bruce Korb  <bkorb@gnu.org>

	* autoopts/makeshell.c (optionParseShell): grep for environment variables
	that start a line in the "env" output, not just anywhere
	* autoopts/test/shell.test: adjust
	* autoopts/autoopts.h (tOptionLoadMode): moved from option_h.tpl
	(option_load_mode): new global
	* autoopts/configfile.c (configFileLoad): propagate the string scan
	mode via a global since it disappears going through an indirect call.
	(handleStructure): use that global.
	* autoopts/load.c (loadOptionLine): use the global
	* autoopts/nested.c: use the global
	* autoopts/options_h.tpl (tOptionLoadMode): do not externalize
	* config/bootstrap.local (check_tools): do not bother looking for byacc

2007-01-13  Bruce Korb  <bkorb@gnu.org>

	* autoopts/nested.c (scanNameEntry): break out of scan loop at end of
	string, too.  :)

2007-01-12  Brian Utterback  <brian.utterback@sun.com>

	* config/libopts.def (dev_zero): use "ls -lL" to test /dev/zero

2007-01-07  Bruce Korb  <bkorb@gnu.org>

	* agen5/tpProcess.c (processTemplate): NULL out the last scheme command
	on "problem" exit, as the command has finished successfully.
	* autoopts/options.tpl (must-set): disallow both "min" and "must-set"
	for one option.  A non-zero "min" implies that it must be set, though
	the converse is not true.
	* autoopts/options_h.tpl (optDesc): mark as "const" the constant fields.
	* autoopts/save.c (printEntry): an option can be marked as "disabled" if
	it was selected by an equivalenced option.  Select option name carefully.

2006-12-18  Bruce Korb  <bkorb@gnu.org>

	= REL 5.8.8

2006-12-15  Eric Blake  <ebb9@byu.net>

	* config/misc.def (setjmp, sigsetjmp): Follow POSIX rules for
	[sig]setjmp.
	* agen5/tpProcess.c (doStdoutTemplate, processTemplate): Likewise.

2006-12-14  Bruce Korb  <bkorb@gnu.org>

	* agen5/autogen.c (main): when sigsetjmp returns, you cannot capture
	the return result portably. 8-O !!  So, the caller must modify a global.
	(abendSignal): modify the global
	* agen5/expPrint.c (printFault): same adjustment
	(safePrintf) depend upon that adjustment

2006-12-12  Eric Blake  <ebb9@byu.net>

	* config/misc.def(sigsetjmp): Use proper argument to sigsetjmp(3C).
	* Makefile.am (ACLOCAL_AMFLAGS): Allow autoreconf to work.

2006-12-10  Bruce Korb  <bkorb@gnu.org>

	* agen5/*: remove zDefaultNil because optimizers can save a byte and
	use the same memory as zNil.  So, the empty string is now gotten from
	allocated memory and zDefaultNil has been replaced with zNil everywhere.

2006-12-03  Matt Kraai <kraai@debian.org>

	* Remove an extra backslash in error.test.
	* Ignore "Aborted" messages in error.test, closes: #373666.

2006-11-26  Bruce Korb  <bkorb@gnu.org>

	* Everywhere: fixes to cope with sizeof(int) != sizeof(size_t).
	* snprintfv/snprintfv.m4: Before testing for wchar.h, test for
	runetype.h.  It's a weirdism needed by OS/X.

2006-10-19  Matthias Kilian  <kili-sf@users.sourceforge.net>

	* agen5/defLoad.c(readDefines): don't use pointer after realloc,
	especially after it is known to have moved the data.

2006-10-21  Bruce Korb  <bkorb@gnu.org>

	* agen5/autogen.c(signalExit): use the enum type for function code
	(doneCheck): ftell(3) returns a signed value
	* agen5/functions.tpl(apLoadProc): procedures don't need address-of
	operator (lintian issue).
	(apHdlrProc): ditto
	* autoopts/sort.c(optionSort): do not set errno to zero.
	* autoopts/stdoptions.def(SHORT_HELP): new "standard" option
	* agen5/opts.def: use short-help / -h
	* agen5/defLex.c(apzKeywords): use enum instead of int
	* agen5/fsm-macro.tpl(compute-transitions): procedure initializers
	do not need address-of operators
	* autoopts/enumeration.c: identify const pointers as such
	* autoopts/optcode.tpl(patch-text): clean up the sed expression.
	* autoopts/optmain.tpl(keyword-code): identify source and allow for
	some "extra-code" to get tacked onto the end of the procedure.
	(define-option-callbacks): identify the source for set-memberships too.

2006-10-15  Bruce Korb  <bkorb@gnu.org>

	* autoopts/optcode.tpl(version): it is now immediate action.
	* autoopts/test/immediate.test: test it

2006-10-15  Bruce Korb  <bkorb@gnu.org>

	= REL 5.8.7

2006-10-09  Bruce Korb  <bkorb@gnu.org>

	* agen5/schemedef.scm(string-table-size): new string table function
	* autoopts/*.c: respell "OPTST_PERSISTENT" as "OPTST_PERSISTENT_MASK"
	* autoopts/guileopt.c(export_options_to_guile): Use "int" for ints.
	* autoopts/makeshell.c(emitSetup): separate the handling of different
	argument types, since their sizes may differ.
	* autoopts/options_h.tpl: Use bit mask templates for bit collections.

2006-10-01  Bruce Korb  <bkorb@gnu.org>

	= REL 5.8.6

2006-09-24  Bruce Korb  <bkorb@gnu.org>

	* agen5/agShell.c(serverSetup): fix formatting element for pid_t types
	(chainOpen): ditto
	* agen5/autogen.h(ag_scm2zchars): move this inline procedure so it
	follows the define of a macro it uses (Guile 1.4/5/6).
	* autoopts/configfile.c: fix some obscure Solaris warnings
	* autoopts/cook.c: ditto
	* autoopts/load.c: ditto
	* autoopts/nested.c: ditto
	* autoopts/putshell.c: ditto
	* autoopts/options.tpl: put autoopts version in header comment.
	* autoopts/options_h.tpl: burn the number into options.tpl
	* agen5/snarf.tpl: use string tables

2006-09-23  Bruce Korb  <bkorb@gnu.org>

	* THROUGHOUT: change "const char" to "char const"  The "const-ness"
	attribute needs to follow what is const, except it *may* precede it
	on the base type.  (It must follow any pointers it applies to.)
	* autoopts/options_h.tpl(pzLastArg): is now a #define to a new union:
	optArgBucket_t.
	* autoopts/opt*.tpl: use the correct unionized name in emitted templates
	Over time, fix this in the rest of the libopts/autoopts code.
	* autoopts/boolean.c: use the boolean variation on the arg field
	* autoopts/enumeration.c: use the uintptr_t variation on the arg field.
	Retype the returned result of optionEnumerationVal to uintptr_t.
	* autoopts/numeric.c: use the int variation on the arg field.
	* autoopts/test/handler.test: adjust for template changes
	* doc/auto_gen.tpl: require GCC to rebuild the doc:  pre-include config.h
	because $top_builddir/autoopts/autoopts/options.h is referenced and
	it does not include stdint.h without the config.h header defines.
	stdint.h is now required to compile options.h correctly.
	* agen5/autogen.c(doneCheck): always call closeServer, but always after
	running any stored up shell cleanup code.
	* agen5/agShell.c(serverSetup): do *not* schedule "closeServer()" call
	at exit.  "doneCheck()" will always do that now.
	* agen5/expGperf.c(ag_scm_make_gperf): free the output from the
	build-the-gperf scriptlett.  Use the "add-cleanup" function to append
	the gperf directory cleanup code.
	* agen5/schemedef.scm(add-cleanup): new function to append cleanup
	shell commands to a string that is run at exit time.
	* autoopts/optmain.tpl(callback-proc): add "extracted from" comment
	for procedures that use "flag-code".

2006-09-19  Aaron Turner  <synfinatic@gmail.com>
	Bruce Korb  <bkorb@gnu.org>

	* pkg/libopts/libopts-add.m4(libopts-install): new ARG_ENABLE option
	used to set INSTALL_LIBOPTS conditional
	* pkg/libopts/mklibsrc.sh(LTLIBRARIES): use that conditional to decide
	if lib_LTLIBRARIES controls libopts installation or noinst_LTLIBRARIES

2006-09-04  Andreas Schwab  <schwab@suse.de>
	(applied 2006-09-19)

	* autoopts/configfile.c(optionFindValue): Fix aliasing
	violations.
	(optionFindNextValue): Likewise.
	(optionGetValue): Likewise.
	(optionNextValue): Likewise.
	* autoopts/nested.c(unloadNestedArglist): Likewise.
	* autoopts/optlib.tpl: [[Omitted due to lvalue issues]]
	* agen5/agUtils.c(doOptions): Likewise.
	* autoopts/tokenize.c(copy_cooked, copy_raw): Fix type of second
	parameter and adjust casts.
	(ao_string_tokenize): Cast arguments of ctype macros to unsigned
	char.  Remove cast from second argument of copy_cooked and
	copy_raw.

2006-09-16  Bruce Korb  <bkorb@gnu.org>

	* autoopts/optcode.tpl(limits.h): generally needed for UINT_MAX
	* autoopts/options.tpl(added-hdr): new global string
	* autoopts/opthead.tpl(added-hdr): if not empty, emit the sort -u list.
	* autoopts/optlib.tpl(OPT_VALUE): when using the "optCookie" field as a
	scalar, cast to "uintprt_t", requiring "stdint.h" header
	* autoopts/optmain.tpl(handler-type): if we cannot open output, free
	the allocated data space.
	* GLOBALLY: replace tabs with spaces where possible
	* agen5/autogen.h(AG_SCM_CHARS): use the Guile internal function
	"scm_i_string_chars()" because there is no alternative.
	* agen5/expGuile.c: forcefully ignore the read-only attribute of the
	result returned by scm_i_string_chars.
	* agen5/expString.c: use "char const" for two returned pointers, but
	forcefully ignore the result in ag_scm_string_tr_x.

2006-09-10  Bruce Korb  <bkorb@gnu.org>

	* autoopts/aoconf.def: define values needed to describe configuration
	* autoopts/aoconf.tpl: Template for generating autoopts-config.in,
	autoopts-config.1, and mk-autoopts-pc.in
	* autoopts/autoopts-config.in: obsolete
	* autoopts/autoopts-config.1:  obsolete
	* autoopts/mk-autoopts-pc.in:  obsolete
	* autoopts/autoopts.h(AGALOC): use robust malloc/realloc/strdup
	* autoopts/autoopts.c: re-add the robust versions for local only use
	* autoopts/configfile.c(handleConfig): handle unterminated last line
	* autoopts/text_mmap.c(text_mmap): remove pointless test
	* agen5/autogen.c: Since libopts does not export the malloc wrappers,
	they must be implemented here, too.
	
2006-09-05  Bruce Korb  <bkorb@gnu.org>

	* autoopts/opthead.tpl(NO_OPTION_NAME_WARNINGS): new code to emit
	warnings (or just clean up) in case some #define names conflict with
	selected option names.
	* agen5/expState.c(str2int_ver): emit version value iff tracing is on
	* compat/compat.h(sys/mman.h): include only if HAVE_SYS_MMAN_H
	* autoopts/test/cond.test: test new stuff

2006-08-12  Bruce Korb  <bkorb@gnu.org>

	* autoopts/usage.c: Fix warning for a dumb compiler
	* autoopts/autoopts.h: Fix warning for dumb environment (Windows)
	* agen5/autogen.h: Fix warnings from new Guile deprecations

	= REL 5.8.5
