2005-12-12  Bruce Korb  <bkorb@gnu.org>

	* agen5/expExtract.c(buildEmptyText): clean it up.
	* autoopts/options.tpl(version-text): new global used in two places
	* autoopts/optlib.tpl: one of them
	* autoopts/opthead.tpl: the other
	* autoopts/optmain.tpl: fix bug in range-option-code (it must always be)
	* autoopts/putshell.c(optionPutShell): "val" is a uintptr_t, so specify
	"ld" and "lX" in the format strings.  "icc" still doesn't like it.
	* autoopts/version.c(printVersion): if we have no pzFullVersion, then
	pull the first line of the usage title.
	* */opts.def(package): add this with "GNU AutoGen" to all option defs.

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

	* autoopts/text_mmap.c(text_mmap): anonymous pages should not be
	shared.  Some platforms will seg fault on that.
	* agen5/expGuile.c(ag_scm_c_eval_string_from_file_line):
	Guile 1.4.x does not know about scm_open_input_string().
	* autoopts/enumeration.c(optionKeywordName): new.  Map enumeration value
	to the string name.
	(optionEnumerationVal): accommodate this and validate the enum value.
	* autoopts/optlib.tpl(OPT_<optname>_VAL2STR): new macro for invoking
	the new (and private) function above.
	* autoopts/test/keyword.test(keyword_2): new test for this.
	* doc/autogen-texi.txt: doc it.

2005-12-05  Bruce Korb  <bkorb@gnu.org>

	* agen5/agInit.c(initialize): Test for trace level after doing options.
	* agen5/autogen.c(main): keep deprecation quiet for Guile 1.7.x
	(doneCheck): Force an error exit code when problems are found.
	This is a problem only for Guile 1.7.x.
	* agen5/autogen.h(AG_SCM_*): create a whole mess of wrapper macros so
	we can avoid or adapt to changes to the Guile interface.
	* agen5/bootstrap.dir(functions.h): resume generating it.  However,
	we won't make any build rules for it.
	* agen5/functions.h: remove it (for now).
	* agen5/directive.tpl(schemeLine): set the Scheme line number correctly.
	* agen5/expGuile.c(gh_type_e): use the new AG_SCM_* wrappers.
	(ag_scm_c_eval_string_from_file_line): do things differently for 1.7.x
	* agen5/*.c: Use the new wrappers & eliminate use of scm_makstr().
	* agen5/test/defs: obsolete
	* agen5/test/defs.in: new configurable file - replacing defs
	* agen5/test/Makefile.am(TESTS_ENVIRONMENT): reduced in size by a lot
	* agen5/test/*.test: source "defs" from build directory, not source.
	* agen5/autoopts/defs: obsolete
	* agen5/autoopts/defs.in: new configurable file - replacing defs
	* agen5/autoopts/Makefile.am(TESTS_ENVIRONMENT): reduced in size by a lot
	* agen5/autoopts/*.test: source "defs" from build directory, not source.
	* agen5/test/error.test: Adapt to Guile 1.7: error line numbers do not
	work, so sed them out of the result.
	* config/misc.def(GUILE_VERSION): Compute a single number to represent
	the current Guile version.  Make it both substitutable and a config.h
	#define value.  Fail-exit the config if we cannot do this.
	* autoopts/text_mmap.c(text_mmap): If a platform has both /dev/zero and
	MAP_ANONYMOUS, then try /dev/zero if MAP_ANONYMOUS fails.

2005-12-04  Bruce Korb  <bkorb@gnu.org>

	* agen5/autogen.h: Use a macro interface to make all the varied
	variations of the Guile interface look the same.
	* agen5/*: use these macro wrappers.
	* agen5/bootstrap.dir: re-enable the generation of functions.h
	* agen5/functions.tpl: re-add

2005-11-25  Bruce Korb  <bkorb@gnu.org>

	* agen5/agUtils.c (doOptions): Add a boolean argument "check_env".
	Sometimes we use environment variables for defined values, sometimes
	we must not.
	* agen5/defDirect.c (doDir_ifdef): do not use environment value
	(doDir_shell): also properly count lines
	* agen5/defFind.c (findEntryByIndex): Do use env. var.
	* agen5/defLex.c (scanAgain): ditto
	* agen5/defLoad.c (findPlace): ditto
	* agen5/test/defs: do not list subdirectory contents when trying to
	create the list of names of files to move.
	* agen5/test/directives.test: add line numbers to here docs so we
	can verify the message line numbers more easily.
	* agen5/test/error.test: some platforms trigger a sigpipe in the server
	shell after the shell has ``kill -TERM $AG_pid'' and not yet invoked,
	"exit".  Strip out the 'trapped on' messages before comparing results.
	* agen5/test/heredef.test: also add line numbers to here docs.
	* autoopts/options_h.tpl (TEXT_MMAP_FAILED_ADDR): cast MAP_FAILED to a
	void* pointer.  Some platforms define a value that cannot be compared
	with a void* pointer.
	* autoopts/text_mmap.c(MAP_FAILED_PTR): Always use that instead of
	MAP_FAILED.  It is ``((void*)MAP_FAILED)'' and should always work.
	* pkg/Makefile.am: use top_srcdir where needed, not top_builddir.
	* pkg/libopts/mklibsrc.sh (LIBOPTS_CHECK): this is now part of autoopts.
	Do not generate it here.
	* snprintfv/format.c (printf_integer): warning niggle.
	* xml2ag/Makefile.am: invoke our just-built autogen consistently.

2005-11-22  Bruce Korb  <bkorb@gnu.org>

	* agen5/defDirect.c: warning patrol
	* agen5/defLoad.c(insertDef): make sure all useful data are copied to
	the proper place.
	* agen5/tpParse.c(findMacroEnd): check for backslash before end macro
	mark.  Back up over it if found.
	(parseTemplate): Have it?  skip over end of line white space + newline.
	* agen5/test/defref.test: test misordered definitions.
	* agen5/test/for.test: test the backslash before end macro mark
	* config/libopts.def: remove duplicate uintptr_t test.

2005-11-06  Bruce Korb  <bkorb@gnu.org>

	* agen5/defDirect.c(skipToEndif) count skipped newlines
	(skipToElseEnd): ditto
	* agen5/defLex.c(yylex): Separate the DP_EV_HERE_STRING as a different
	token type so that the source line number can be adjusted.
	* agen5/defParse.def: add the new token type to the FSM
	* agen5/defParse-fsm.c: regenerate and in dp_do_str_value() bump the
	line number when the token is DP_EV_HERE_STRING.
	* agen5/test/heredef.test: line numbers are correct now.  Adjust.
	* pkg/mkpkg.linux: crank up the optimizations for Linux packaging.

2005-10-29  Bruce Korb  <bkorb@gnu.org>

	* agen5/agShell.c(serverSetup): enable full shell tracing with
	--trace=everything.
	* througout: Reduce usage of tCC and tSCC and other abbrevs.  The
	goal is to reduce dependencies on internal headers for generated code.
	* doc/auto_gen.tpl(autogen): missed one.  Use ${AGexe} instead.
	Also use ${INCLUDES} in the compiles
	* doc/mk-agen-texi-in(INCLUDES): construct and export

2005-10-28  Bruce Korb  <bkorb@gnu.org>

	* GLOBAL: removed the code for forcing builddir == srcdir building.
	That meant more careful determination of when to look for files in
	the source tree and when they got built dynamically in the build dir.
	* config/liboptschk.m4: new.  autoconf macro for determining whether or
	not libopts has been installed and how it is to be used.
	* Makefile.am: distribute and install that new file
	* agen5/opts.def(show-shell): eliminate in favor of a new trace level
	enumeration:  server-shell
	* agen5/agShell.c(closeServer) flush write pipe before closing it.
	Sometimes, the data get fed to a new process.
	(serverSetup): trace server shell stuff if tracing level above the
	newly enumerated level of TRACE_SERVER_SHELL.
	(chainOpen): flush the trace file some more.
	(loadData): retry reads if the pipe remains open and the read fails.
	Sometimes, it fails without waiting on the first try to a serverprocess.
	* agen5/bootstrap.dir(recursive): more things need to be set up for
	bootstrapping that must not be done during a make step.
	* autoopts/options_h.tpl(TEXT_MMAP_FAILED_ADDR): new macro
	* agen5/tpLoad.c(loadTemplate): ditto
	* autoopts/configfile.c(configFileLoad): ditto
	(filePreset): ditto
	* agen5/test/Makefile.am(TESTS_ENVIRONMENT): set full path names
	* agen5/test/defs(CFLAGS): set up properly for srcdir != builddir
	* agen5/test/*.test: get CFLAGS from "defs" file.
	* autoopts/Makefile.am(options.h): reference from source directory

2005-10-22  Bruce Korb  <bkorb@gnu.org>

	* agen5/agShell.c(zCmdFmt): add a command number to the closing echo
	(closeServer): flush the write buffer to be extra sure it is pushed
	out and won't be read by the next process.
	(SHOW_SHELL): obsolete option - use TRACE_SERVER_SHELL instead
	(serverSetup): ditto
	(chainOpen): flush tracing fp too.  Also, use it for stderr.
	(loadData): is static.  Make it so.  Also, fgets may fail on the first
	read of a new process instead of waiting for input.  Retry the read
	if it fails and is not EOF.  Log both input to and output from the
	server shell if (OPT_VALUE_TRACE >= TRACE_SERVER_SHELL)
	* agen5/fmemopen.c(_GNU_SOURCE): avoid duplicate define
	* agen5/opts.def(show-shell): obsolete
	(trace): server-shell is a new keyword
	* autoopts/options_h.tpl(TEXT_MMAP_FAILED_ADDR): macro to test for mmap
	failure cast in ways to make all platforms happy.
	* agen5/expFormat.c(ag_scm_license): use the mmap failure test macro
	* agen5/tpLoad.c(loadTemplate): ditto
	* autoopts/configfile.c(configFileLoad): ditto
	* agen5/test/shell.test: rework so it can catch the timing issue fixed
	in agShell.c.
	* autoopts/test/Makefile.am(LD_LIBRARY_PATH): must be set to ensure we
	get our built libraries ahead of installed libraries.
	* config/bootstrap.local(tree_tops): be more selective about which files
	we link into our build tree.

2005-10-08  Bruce Korb  <bkorb@gnu.org>

	= 5.7.3 Released

	* agen5/fmemopen.c(_GNU_SOURCE): do not doubly define
	* agen5/test/license.test(CFLAGS): do not use shell POSIX-isms
	* autoopts/test/Makefile.am(LD_RUN_PATH): make sure we can find
	the libguile library when running tests

2005-10-02  Bruce Korb  <bkorb@gnu.org>

	* autoopts/autoopts.c(compat/snprintf.c): always omit when building
	full AutoGen with libsnprintfv
	* autoopts/Makefile.am: indicate we have libsnprintfv
	* pkg/libopts/mklibsrc.sh: remove that indication from tear-off lib.

2005-09-21  Bruce Korb  <bkorb@gnu.org>

	* autoopts/autoopts.c(compat/snprintf.c): include if needed
	(compat/strdup.c): ditto
	* autoopts/autoopts.h: omit redundant includes
	* compat/Makefile.am(strsignal.h): maintainer cleanable
	* compat/compat.h: make sure we define all the "extra" stuff we need.
	* compat/strdup.c: new
	* compat/snprintf.c: new
	* config/libopts.def: cleanups.  Add missing type and size checks
	* pkg/libopts/mklibsrc.sh: adjust for changed contents of libopts.c

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

	* agen5/expFormat.c(ag_scm_license): use text_mmap() instead of mmap.
	* agen5/tpLoad.c(loadTemplate): ditto
	(mapDataFile): obsolete
	* agen5/test/license.test: extend the license and template files to
	a multiple of a page size.
	* autoopts/autoopts.h(tmap_info_t): move to export header (options.h)
	* autoopts/options_h.tpl(tmap_info_t): add, including a "we had to
	allocate the data anyway" flag
	* autoopts/text_mmap.c(text_mmap): export as a private function and
	add code to cope with failure to provide a final NUL byte with mmap
	on anonymous regions and/or /dev/null.
	(text_munmap): free any allocated memory due to mmap-ping NUL failure
	* config/libopts.def(dev_null): new device test

2005-09-04  Bruce Korb  <bkorb@gnu.org>

	* autoopts/test/getopt.test: disable unless autoopts-config installed.

2005-08-28  Bruce Korb  <bkorb@gnu.org>

	* compat/compat.h: fix up sized int types
	* config/confmacs.tpl(emit-results): Allow for unquoted define values
	* config/conftest.tpl(do-first): allow for an initial list of functions
	* config/libopts.def(do-first): do common integer checks before the
	specialized checks defined in the rest of this file.
	* pkg/libopts/mklibsrc.sh(libopts.m4): add an optional argument to
	LIBOPTS_CHECK -- viz., the directory where the libopts tear-off library
	will live in a client project.
	* pkg/libopts/README(LIBOPTS_CHECK): doc it

2005-08-05  Bruce Korb  <bkorb@gnu.org>

	* autoopts/autoopts-config.in(usage): regularize
	(everything): no longer a "regular" option
	* autoopts/load.c(optionMakePath): fix constness and remove unnecessary
	"do{...}while(0)" enclosure.

2005-07-28  Bruce Korb  <bkorb@gnu.org>

	= 5.7.2 Released

	* agen5/agCgi.c(loadCgi): Warnings
	* agen5/agInit.c(initialize): ditto
	* agen5/defLex.c(assembleName): ditto
	* agen5/fsm-trans.tpl(machine-step): ditto
	(fsm-proc-variables): ditto
	* agen5/funcFor.c(doForByStep): ditto
	* agen5/funcIf.c(eval_true): ditto
	* agen5/opts.def(load-scheme): ditto
	* agen5/tpLoad.c(canReadFile): ditto
	* autoopts/configfile.c(configFileLoad): ditto
	(filePreset): ditto
	(handleStructure): ditto
	* autoopts/nested.c(scanNameEntry): ditto
	(sortNestedList): ditto
	* compat/pathfind.c(extract_colon_unit): ditto
	* snprintfv/format.c(printf_integer): ditto

	* agen5/test/html.test: negative test fails on some platforms
	* autoopts/test/errors.test: accommodate new file name  handling
	* autoopts/test/keyword.test: ditto

2005-07-25  Bruce Korb  <bkorb@gnu.org>

	* autoopts/autoopts.h(MAXPATHLEN): make certain it is never less than
	"PATH_MAX"
	* autoopts/load.c(optionMakePath): use MAXPATHLEN instead of PATH_MAX.
	and use canonicalize_file_name() when available.
	* config/libopts.def(realpath): add test that includes testing for
	the existence of PATH_MAX.
	* configure.in(realpath): remove generic existence test

2005-07-09  Bruce Korb  <bkorb@gnu.org>

	* doc/mk-agen-texi-in: new - extricate code from Makefile.am
	* doc/Makefile.am: remove that code
	* configure.in: configure these new files
	* doc/auto_gen.tpl: Use the "die" function instead of kill $AG_pid
	Also, remove usage of "autoopts-config" as it won't work unless
	autogen has been pre-installed.
	* pkg/gnudoc.tpl: genericize the template so it can be used with
	sharutils also.
	* pkg/mkgnudoc.sh: tweaks to use the new template
	* pkg/Makefile.am: alter the script's invocation, too.
	* pkg/libopts/mklibsrc.sh: install the headers, don't create project
	files -- leave  to libopts project to add those.

2005-06-26  Bruce Korb  <bkorb@gnu.org>

	= 5.7.1 Released

	* autoopts/test/Makefile.am(TESTS_ENVIRONMENT): pass through "$(DEFS)"
	* compat/compat.h(HAVE_CONFIG_H): error out if we don't have this
	(limits.h): this is STDC.  Error out if we don't have it.
	(dirent.h): ditto
	* pkg/libopts/mklibsrc.sh(bootstrap): newly generated script for the
	libopts tarball.  Running this script converts the tear-off library
	into a stand alone project.

2005-05-27  Bruce Korb  <bkorb@gnu.org>

	* autoopts/agman1.tpl(arg-range): add this to the option description.
	* config/bootstrap.local(vers-template): new - template struct version
	* autoopts/options_h.tpl(AO_TEMPLATE_VERSION): use the new value
	* doc/auto_gen.tpl(quick start): generate the example and use the
	"new" main procedure stuff.
	* Upgrade libtool once again.
	* Update the FSF address throughout

2005-04-24  Bruce Korb  <bkorb@gnu.org>

	= 5.7 Released

	* autoopts/optlib.tpl(set-defines): end a C statement w/ a ';'
	* autoopts/options_h.tpl(AO_TEMPLATE_VERSION): burn the value into
	the opthead.tpl template
	* autoopts/opthead.tpl(AO_TEMPLATE_VERSION): Add code to verify that
	the generated text matches the range of the installed libopts library.

2005-04-19  Aaron Turner  <synfinatic@gmail.com>

	* pkg/libopts/mklibsrc.sh: add --enable-local-libopts

2005-04-17  Bruce Korb  <bkorb@gnu.org>

	* autoopts/options_h.tpl(stdint.h): Undo yesterday's changes
	* autoopts/guileopt.c: include "config.h"

2005-04-16  Bruce Korb  <bkorb@gnu.org>

	* agen5/autogen.c(doneCheck): avoid scm_c_eval_string 'cuz it is
	not always available.  Use our own ag_scm_c_eval_string_from_file_line
	* agen5/expGperf.c(ag_scm_make_gperf): ditto
	* autoopts/options_h.tpl(stdint.h): pick up this header if either
	HAVE_STDINT_H is defined or if HAVE_INTTYPES_H is not defined
	(limits.h): similarly, prefer this to sys/limits.h, but demand one.
	The generated "options.h" should now work outside the presence of
	the "config.h" header.
	* pkg/mkgnudoc.sh: rework for new version of texi2html
	* xml2ag/xmlopts.def: clarify why the template name must be provided.

2005-04-10  Bruce Korb  <bkorb@gnu.org>

	* autoopts/agman3.tpl: remove common code
	* autoopts/agman1.tpl: ditto
	* autoopts/agman-lib.tpl: new file for code common to the agman*.tpl
	Primarily, it converts texi-isms into man page-isms.
	* autoopts/Makefile.am: distribute the file, too.
	* autoopts/configfile.c(optionGetValue): favor word "integer" for
	integers instead of "number".
	* autoopts/usage-txt.def: ditto
	* autoopts/test/config.test: ditto
	* autoopts/test/nested.test: ditto
	* autoopts/optmain.tpl: set flag name at start of flag name loop.

2005-03-13  Bruce Korb  <bkorb@gnu.org>

	* autoopts/autoopts.c(checkConsistency): "must-set" means that a "set"
	option is okay, too.
	* autoopts/configfile.c: more work on it.
	* autoopts/test/errors.test: test the consistency fix
	* agen5/autogen.c(doneCheck): run any 'shell-cleanup's
	* agen5/autogen.h(fmemopen): rename to ag_fmemopen
	* agen5/expGperf.c: append gperf cleanup stuff to 'shell-cleanup'
	* agen5/expOutput.c: rename of fmemopen
	* agen5/fmemopen.c: reworked
	* agen5/test/fmemopen.test: test the thing
	* agen5/schemedef.scm(shell-cleanup): new text SCM variable
	* README: with-libguile-link and not with-libguile-libdir
	* agen5/agShell.c(zTrap): move to directive.tpl and rename
	* agen5/directive.tpl(zShellInit): write as a straight-up shell script
	and use the "c-string" macro to convert into a C initialization string.

2005-02-20  Bruce Korb  <bkorb@gnu.org>

	* autoopts/*: Remove "optArgType" from option descriptor and use
	OPTST_GET_ARGTYPE() macro to determine this instead.

2005-02-13  Bruce Korb  <bkorb@gnu.org>

	* autoopts/cook.c: NEW - move all string cooking here
	* agen5/agUtils.c(doEscapeChar): removed
	* agen5/defLex.c(assembleString): removed
	* autoopts/tokenize.c(copy_cooked): use cook book cook code.
	* autoopts/autoopts.c(doPresets): internalFileLoad has no failure mode
	* autoopts/configfile.c(internalFileLoad): so remove its return value
	* autoopts/load.c(findArg): routine to separate and process the option
	argument, "process" method depending on mode:  KEEP, UNCOOKED and COOKED.
	(loadOptionLine): use the new function.
	* autoopts/test/rc.test: test this new stuff
	* autoopts/Makefile.am(install-data-hook): sed in stuff derived from
	config.h (we cannot install that).
	* autoopts/autoopts.h(pzNest): new arg type for usage text
	* autoopts/enumeration.c(enumError): arg types now handled via an enum
	instead of bits in a mask.
	* autoopts/guileopt.c(export_options_to_guile): ditto
	* autoopts/makeshell.c(emitSetup): ditto
	* autoopts/putshell.c: the same
	* autoopts/save.c: again
	* autoopts/usage.c: and some more
	* autoopts/optlib.tpl: and again
	* autoopts/optcode.tpl: ditto, also rearranged man option structure
	* autoopts/options_h.tpl: new macros and enums for arg types
	Also rearranged main option structure, as we will be incompatible anyway.
	* autoopts/usage-txt.def: new strings for the new arg types
	* autoopts/test/*: Must specify the "config.h" header now.
	* config/libopts.def: either stdint.h or inttypes.h is required now
	* doc/auto_gen.tpl: make sure compiles pick up config.h
	* pkg/libopts/mklibsrc.sh: do *not* pick up config.h.  It will be
	generated at build time.

2005-02-12  Bruce Korb  <bkorb@gnu.org>

	* autoopts/text_mmap.c: new - maps text files, always ensuring that
	at least one NUL byte is after the last text byte.
	* autoopts/Makefile.am: Add to sources
	* autoopts/autoopts.h(tmap_info_t): and add to data structures
	* autoopts/configfile.c(internalFileLoad): new function for new job
	* autoopts/load.c(filePreset): move to "configfile.c"
	(doLoadOpt): ditto
	* autoopts/optlib.tpl(min): if there is no "min", but there is a
	"must-set", then set optMinCt to 1 anyway.
	* autoopts/test/main.test(main.DEF): accommodate file systems with
	case-insensitive naming -- use "def2" instead of ".DEF".
	* fiddle with configury some more.

2005-02-05  Bruce Korb  <bkorb@gnu.org>

	= 5.6.6 Released
