1
0
Quellcode durchsuchen

Import upstream version 4.4.3

Fred Klassen vor 1 Jahr
Ursprung
Commit
63f8138876
100 geänderte Dateien mit 3965 neuen und 3947 gelöschten Zeilen
  1. 11 16
      Makefile.in
  2. 106 89
      aclocal.m4
  3. 2 2
      config/ar-lib
  4. 6 7
      config/compile
  5. 312 371
      config/config.guess
  6. 154 148
      config/config.sub
  7. 5 5
      config/depcomp
  8. 15 32
      config/install-sh
  9. 72 174
      config/ltmain.sh
  10. 8 8
      config/missing
  11. 204 360
      configure
  12. 80 137
      configure.ac
  13. 9 0
      docs/CHANGELOG
  14. 4 1
      docs/CREDIT
  15. 5 9
      docs/Makefile.in
  16. 20 33
      lib/Makefile.in
  17. 1 1
      libopts/COPYING.gplv3
  18. 3 3
      libopts/COPYING.lgplv3
  19. 1 1
      libopts/COPYING.mbsd
  20. 14 13
      libopts/Makefile.am
  21. 45 53
      libopts/Makefile.in
  22. 1 1
      libopts/README
  23. 0 0
      libopts/_Noreturn.h
  24. 2 2
      libopts/ag-char-map.h
  25. 2 2
      libopts/alias.c
  26. 143 139
      libopts/ao-strs.c
  27. 151 145
      libopts/ao-strs.h
  28. 8 14
      libopts/autoopts.c
  29. 8 1
      libopts/autoopts.h
  30. 44 11
      libopts/autoopts/options.h
  31. 5 1
      libopts/autoopts/project.h
  32. 247 253
      libopts/autoopts/usage-txt.h
  33. 2 2
      libopts/boolean.c
  34. 2 2
      libopts/check.c
  35. 4 4
      libopts/compat/compat.h
  36. 1 1
      libopts/compat/windows-config.h
  37. 25 78
      libopts/configfile.c
  38. 1 9
      libopts/cook.c
  39. 1 26
      libopts/enum.c
  40. 3 9
      libopts/env.c
  41. 1 1
      libopts/file.c
  42. 23 38
      libopts/find.c
  43. 111 110
      libopts/genshell.c
  44. 18 3
      libopts/genshell.h
  45. 7 5
      libopts/gettext.h
  46. 4 9
      libopts/init.c
  47. 95 52
      libopts/intprops.h
  48. 4 2
      libopts/libopts.c
  49. 5 25
      libopts/load.c
  50. 17 19
      libopts/m4/libopts.m4
  51. 1 1
      libopts/m4/liboptschk.m4
  52. 38 28
      libopts/m4/stdnoreturn.m4
  53. 15 54
      libopts/makeshell.c
  54. 6 48
      libopts/nested.c
  55. 7 13
      libopts/numeric.c
  56. 5 5
      libopts/option-value-type.c
  57. 5 5
      libopts/option-xat-attribute.c
  58. 2 2
      libopts/parse-duration.c
  59. 3 3
      libopts/parse-duration.h
  60. 1 1
      libopts/pgusage.c
  61. 491 17
      libopts/proto.h
  62. 1 24
      libopts/putshell.c
  63. 1 1
      libopts/reset.c
  64. 2 2
      libopts/restore.c
  65. 248 0
      libopts/save-flags.c
  66. 68 0
      libopts/save-flags.h
  67. 312 206
      libopts/save.c
  68. 2 16
      libopts/sort.c
  69. 2 2
      libopts/stack.c
  70. 21 11
      libopts/stdnoreturn.in.h
  71. 2 2
      libopts/streqvcmp.c
  72. 2 2
      libopts/text_mmap.c
  73. 1 1
      libopts/time.c
  74. 1 18
      libopts/tokenize.c
  75. 8 62
      libopts/usage.c
  76. 7 4
      libopts/version.c
  77. 12 31
      m4/libtool.m4
  78. 5 9
      scripts/Makefile.in
  79. 51 140
      src/Makefile.in
  80. 39 99
      src/common/Makefile.in
  81. 1 1
      src/common/git_version.c
  82. 1 1
      src/config.h.in
  83. 1 1
      src/defines.h
  84. 41 118
      src/fragroute/Makefile.in
  85. 2 2
      src/send_packets.c
  86. 2 2
      src/tcpbridge.1
  87. 109 109
      src/tcpbridge_opts.c
  88. 12 3
      src/tcpbridge_opts.h
  89. 2 2
      src/tcpcapinfo.1
  90. 109 109
      src/tcpcapinfo_opts.c
  91. 12 3
      src/tcpcapinfo_opts.h
  92. 46 132
      src/tcpedit/Makefile.in
  93. 10 2
      src/tcpedit/tcpedit_stub.h
  94. 2 2
      src/tcpliveplay.1
  95. 109 109
      src/tcpliveplay_opts.c
  96. 12 3
      src/tcpliveplay_opts.h
  97. 2 2
      src/tcpprep.1
  98. 109 109
      src/tcpprep_opts.c
  99. 12 3
      src/tcpprep_opts.h
  100. 0 0
      src/tcpreplay-edit.1

+ 11 - 16
Makefile.in

@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -140,7 +140,7 @@ am__recursive_targets = \
   $(RECURSIVE_CLEAN_TARGETS) \
   $(am__extra_recursive_targets)
 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
-	cscope distdir distdir-am dist dist-all distcheck
+	cscope distdir dist dist-all distcheck
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 # Read a list of newline-separated strings from the standard input,
 # and print each of them once, without duplicates.  Input order is
@@ -168,8 +168,7 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/doxygen.cfg.in \
 	$(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \
 	$(top_srcdir)/config/missing INSTALL config/ar-lib \
 	config/compile config/config.guess config/config.sub \
-	config/depcomp config/install-sh config/ltmain.sh \
-	config/missing
+	config/install-sh config/ltmain.sh config/missing
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -363,7 +362,6 @@ prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
 rmmod = @rmmod@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -417,8 +415,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	    echo ' $(SHELL) ./config.status'; \
 	    $(SHELL) ./config.status;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -547,10 +545,7 @@ distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
+distdir: $(DISTFILES)
 	$(am__remove_distdir)
 	test -d "$(distdir)" || mkdir "$(distdir)"
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -618,7 +613,7 @@ distdir-am: $(DISTFILES)
 	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
 	|| chmod -R a+r "$(distdir)"
 dist-gzip: distdir
-	tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
 	$(am__post_remove_distdir)
 
 dist-bzip2: distdir
@@ -644,7 +639,7 @@ dist-shar: distdir
 	@echo WARNING: "Support for shar distribution archives is" \
 	               "deprecated." >&2
 	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
-	shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
 	$(am__post_remove_distdir)
 
 dist-zip: distdir
@@ -662,7 +657,7 @@ dist dist-all:
 distcheck: dist
 	case '$(DIST_ARCHIVES)' in \
 	*.tar.gz*) \
-	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
 	*.tar.bz2*) \
 	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
 	*.tar.lz*) \
@@ -672,7 +667,7 @@ distcheck: dist
 	*.tar.Z*) \
 	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
 	*.shar.gz*) \
-	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac

+ 106 - 89
aclocal.m4

@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
 
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,7 @@ You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# Copyright (C) 2002-2018 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.16'
+[am__api_version='1.15'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.16.1], [],
+m4_if([$1], [1.15], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -51,12 +51,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.16.1])dnl
+[AM_AUTOMAKE_VERSION([1.15])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
-# Copyright (C) 2011-2018 Free Software Foundation, Inc.
+# Copyright (C) 2011-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -118,7 +118,7 @@ AC_SUBST([AR])dnl
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -170,7 +170,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2018 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -201,7 +201,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -392,12 +392,13 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
@@ -405,41 +406,49 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
   # Older Autoconf quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
   # if we detect the quoting.
-  # TODO: see whether this extra hack can be removed once we start
-  # requiring Autoconf 2.70 or later.
-  AS_CASE([$CONFIG_FILES],
-          [*\'*], [eval set x "$CONFIG_FILES"],
-          [*], [set x $CONFIG_FILES])
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
   shift
-  # Used to flag and report bootstrapping failures.
-  am_rc=0
-  for am_mf
+  for mf
   do
     # Strip MF so we end up with the name of the file.
-    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile which includes
-    # dependency-tracking related rules and includes.
-    # Grep'ing the whole file directly is not great: AIX grep has a line
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named 'Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
     # limit of 2048, but all sed's we know have understand at least 4000.
-    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
-      || continue
-    am_dirpart=`AS_DIRNAME(["$am_mf"])`
-    am_filepart=`AS_BASENAME(["$am_mf"])`
-    AM_RUN_LOG([cd "$am_dirpart" \
-      && sed -e '/# am--include-marker/d' "$am_filepart" \
-        | $MAKE -f - am--depfiles]) || am_rc=$?
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running 'make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "$am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
   done
-  if test $am_rc -ne 0; then
-    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
-    for automatic dependency tracking.  Try re-running configure with the
-    '--disable-dependency-tracking' option to at least be able to build
-    the package (albeit without support for automatic dependency tracking).])
-  fi
-  AS_UNSET([am_dirpart])
-  AS_UNSET([am_filepart])
-  AS_UNSET([am_mf])
-  AS_UNSET([am_rc])
-  rm -f conftest-deps.mk
 }
 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
@@ -448,16 +457,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 # -----------------------------
 # This macro should only be invoked once -- use via AC_REQUIRE.
 #
-# This code is only required when automatic dependency tracking is enabled.
-# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
-# order to bootstrap the dependency handling code.
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each '.P' file that we will
+# need in order to bootstrap the dependency handling code.
 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 [AC_CONFIG_COMMANDS([depfiles],
      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
 
 
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -481,7 +491,7 @@ fi], [AC_MSG_RESULT([no])])
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -568,8 +578,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 # For better backward compatibility.  To be removed once Automake 1.9.x
 # dies out for good.  For more background, see:
-# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
 # We need awk for the "check" target (and possibly the TAP driver).  The
 # system "awk" is bad on some platforms.
@@ -636,7 +646,7 @@ END
 Aborting the configuration process, to ensure you take notice of the issue.
 
 You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <https://www.gnu.org/software/coreutils/>.
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
 
 If you want to complete the configuration process using your problematic
 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -678,7 +688,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -699,7 +709,7 @@ if test x"${install_sh+set}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2018 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -721,7 +731,7 @@ AC_SUBST([am__leading_dot])])
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -756,7 +766,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -764,42 +774,49 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 
 # AM_MAKE_INCLUDE()
 # -----------------
-# Check whether make has an 'include' directive that can support all
-# the idioms we need for our automatic dependency tracking code.
+# Check to see how make treats includes.
 AC_DEFUN([AM_MAKE_INCLUDE],
-[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
-cat > confinc.mk << 'END'
+[am_make=${MAKE-make}
+cat > confinc << 'END'
 am__doit:
-	@echo this is the am__doit target >confinc.out
+	@echo this is the am__doit target
 .PHONY: am__doit
 END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
 am__include="#"
 am__quote=
-# BSD make does it like this.
-echo '.include "confinc.mk" # ignored' > confmf.BSD
-# Other make implementations (GNU, Solaris 10, AIX) do it like this.
-echo 'include confinc.mk # ignored' > confmf.GNU
-_am_result=no
-for s in GNU BSD; do
-  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
-  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
-      ['0:this is the am__doit target'],
-      [AS_CASE([$s],
-          [BSD], [am__include='.include' am__quote='"'],
-          [am__include='include' am__quote=''])])
-  if test "$am__include" != "#"; then
-    _am_result="yes ($s style)"
-    break
-  fi
-done
-rm -f confinc.* confmf.*
-AC_MSG_RESULT([${_am_result}])
-AC_SUBST([am__include])])
-AC_SUBST([am__quote])])
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2018 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -838,7 +855,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -867,7 +884,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -914,7 +931,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -933,7 +950,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1014,7 +1031,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1074,7 +1091,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1102,7 +1119,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2018 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1121,7 +1138,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2018 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,

+ 2 - 2
config/ar-lib

@@ -4,7 +4,7 @@
 me=ar-lib
 scriptversion=2012-03-01.08; # UTC
 
-# Copyright (C) 2010-2018 Free Software Foundation, Inc.
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
 # Written by Peter Rosin <peda@lysator.liu.se>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -18,7 +18,7 @@ scriptversion=2012-03-01.08; # UTC
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a

+ 6 - 7
config/compile

@@ -1,9 +1,9 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2012-10-14.11; # UTC
 
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2018-03-07.03; # UTC
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -255,8 +255,7 @@ EOF
     echo "compile $scriptversion"
     exit $?
     ;;
-  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
-  icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
     func_cl_wrapper "$@"      # Doesn't return...
     ;;
 esac
@@ -340,9 +339,9 @@ exit $ret
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
 # time-stamp-end: "; # UTC"
 # End:

Datei-Diff unterdrückt, da er zu groß ist
+ 312 - 371
config/config.guess


+ 154 - 148
config/config.sub

@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2018 Free Software Foundation, Inc.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
 
-timestamp='2018-02-22'
+timestamp='2014-12-03'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2018-02-22'
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, see <https://www.gnu.org/licenses/>.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -33,7 +33,7 @@ timestamp='2018-02-22'
 # Otherwise, we print the canonical config type on stdout and succeed.
 
 # You can get the latest version of this script from:
-# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
 
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
@@ -53,11 +53,12 @@ timestamp='2018-02-22'
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
 
 Canonicalize a configuration name.
 
-Options:
+Operation modes:
   -h, --help         print this help, then exit
   -t, --time-stamp   print date of last modification, then exit
   -v, --version      print version number, then exit
@@ -67,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2018 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -94,7 +95,7 @@ while test $# -gt 0 ; do
 
     *local*)
        # First pass through any local machine types.
-       echo "$1"
+       echo $1
        exit ;;
 
     * )
@@ -112,24 +113,24 @@ esac
 
 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
 # Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
-  kopensolaris*-gnu* | cloudabi*-eabi* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
-    basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
   android-linux)
     os=-linux-android
-    basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
     ;;
   *)
-    basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
-    if [ "$basic_machine" != "$1" ]
-    then os=`echo "$1" | sed 's/.*-/-/'`
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
     else os=; fi
     ;;
 esac
@@ -178,44 +179,44 @@ case $os in
 		;;
 	-sco6)
 		os=-sco5v6
-		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
 	-sco5)
 		os=-sco3.2v5
-		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
 	-sco4)
 		os=-sco3.2v4
-		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
 	-sco3.2.[4-9]*)
 		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
 	-sco3.2v[4-9]*)
 		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
 	-sco5v6*)
 		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
 	-sco*)
 		os=-sco3.2v2
-		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
 	-udk*)
-		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
 	-isc)
 		os=-isc2.2
-		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
 	-clix*)
 		basic_machine=clipper-intergraph
 		;;
 	-isc*)
-		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
 	-lynx*178)
 		os=-lynxos178
@@ -227,7 +228,10 @@ case $os in
 		os=-lynxos
 		;;
 	-ptx*)
-		basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
 		;;
 	-psos*)
 		os=-psos
@@ -251,16 +255,15 @@ case $basic_machine in
 	| arc | arceb \
 	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
 	| avr | avr32 \
-	| ba \
 	| be32 | be64 \
 	| bfin \
 	| c4x | c8051 | clipper \
 	| d10v | d30v | dlx | dsp16xx \
-	| e2k | epiphany \
-	| fido | fr30 | frv | ft32 \
+	| epiphany \
+	| fido | fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| hexagon \
-	| i370 | i860 | i960 | ia16 | ia64 \
+	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
 	| k1om \
 	| le32 | le64 \
@@ -296,14 +299,13 @@ case $basic_machine in
 	| nios | nios2 | nios2eb | nios2el \
 	| ns16k | ns32k \
 	| open8 | or1k | or1knd | or32 \
-	| pdp10 | pj | pjl \
+	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle \
-	| pru \
 	| pyramid \
 	| riscv32 | riscv64 \
 	| rl78 | rx \
 	| score \
-	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -312,7 +314,7 @@ case $basic_machine in
 	| ubicom32 \
 	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
 	| visium \
-	| wasm32 \
+	| we32k \
 	| x86 | xc16x | xstormy16 | xtensa \
 	| z8k | z80)
 		basic_machine=$basic_machine-unknown
@@ -333,7 +335,7 @@ case $basic_machine in
 		basic_machine=$basic_machine-unknown
 		os=-none
 		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
 		;;
 	ms1)
 		basic_machine=mt-unknown
@@ -362,7 +364,7 @@ case $basic_machine in
 	  ;;
 	# Object if more than one company name word.
 	*-*-*)
-		echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
 		exit 1
 		;;
 	# Recognize the basic CPU types with company name.
@@ -374,18 +376,17 @@ case $basic_machine in
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* | avr32-* \
-	| ba-* \
 	| be32-* | be64-* \
 	| bfin-* | bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
 	| c8051-* | clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
-	| e2k-* | elxsi-* \
+	| elxsi-* \
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 	| hexagon-* \
-	| i*86-* | i860-* | i960-* | ia16-* | ia64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
 	| k1om-* \
 	| le32-* | le64-* \
@@ -426,15 +427,13 @@ case $basic_machine in
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
-	| pru-* \
 	| pyramid-* \
-	| riscv32-* | riscv64-* \
 	| rl78-* | romp-* | rs6000-* | rx-* \
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
 	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
 	| tile*-* \
@@ -443,7 +442,6 @@ case $basic_machine in
 	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
 	| vax-* \
 	| visium-* \
-	| wasm32-* \
 	| we32k-* \
 	| x86-* | x86_64-* | xc16x-* | xps100-* \
 	| xstormy16-* | xtensa*-* \
@@ -457,7 +455,7 @@ case $basic_machine in
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
 	386bsd)
-		basic_machine=i386-pc
+		basic_machine=i386-unknown
 		os=-bsd
 		;;
 	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
@@ -491,7 +489,7 @@ case $basic_machine in
 		basic_machine=x86_64-pc
 		;;
 	amd64-*)
-		basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	amdahl)
 		basic_machine=580-amdahl
@@ -520,9 +518,6 @@ case $basic_machine in
 		basic_machine=i386-pc
 		os=-aros
 		;;
-	asmjs)
-		basic_machine=asmjs-unknown
-		;;
 	aux)
 		basic_machine=m68k-apple
 		os=-aux
@@ -536,7 +531,7 @@ case $basic_machine in
 		os=-linux
 		;;
 	blackfin-*)
-		basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
 		os=-linux
 		;;
 	bluegene*)
@@ -544,13 +539,13 @@ case $basic_machine in
 		os=-cnk
 		;;
 	c54x-*)
-		basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	c55x-*)
-		basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	c6x-*)
-		basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	c90)
 		basic_machine=c90-cray
@@ -639,18 +634,10 @@ case $basic_machine in
 		basic_machine=rs6000-bull
 		os=-bosx
 		;;
-	dpx2*)
+	dpx2* | dpx2*-bull)
 		basic_machine=m68k-bull
 		os=-sysv3
 		;;
-	e500v[12])
-		basic_machine=powerpc-unknown
-		os=$os"spe"
-		;;
-	e500v[12]-*)
-		basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
-		os=$os"spe"
-		;;
 	ebmon29k)
 		basic_machine=a29k-amd
 		os=-ebmon
@@ -740,6 +727,9 @@ case $basic_machine in
 	hp9k8[0-9][0-9] | hp8[0-9][0-9])
 		basic_machine=hppa1.0-hp
 		;;
+	hppa-next)
+		os=-nextstep3
+		;;
 	hppaosf)
 		basic_machine=hppa1.1-hp
 		os=-osf
@@ -752,26 +742,26 @@ case $basic_machine in
 		basic_machine=i370-ibm
 		;;
 	i*86v32)
-		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-sysv32
 		;;
 	i*86v4*)
-		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-sysv4
 		;;
 	i*86v)
-		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-sysv
 		;;
 	i*86sol2)
-		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-solaris2
 		;;
 	i386mach)
 		basic_machine=i386-mach
 		os=-mach
 		;;
-	vsta)
+	i386-vsta | vsta)
 		basic_machine=i386-unknown
 		os=-vsta
 		;;
@@ -790,16 +780,19 @@ case $basic_machine in
 		os=-sysv
 		;;
 	leon-*|leon[3-9]-*)
-		basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
+		basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
 		;;
 	m68knommu)
 		basic_machine=m68k-unknown
 		os=-linux
 		;;
 	m68knommu-*)
-		basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
 		os=-linux
 		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
 	magnum | m3230)
 		basic_machine=mips-mips
 		os=-sysv
@@ -831,10 +824,10 @@ case $basic_machine in
 		os=-mint
 		;;
 	mips3*-*)
-		basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
 		;;
 	mips3*)
-		basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
 		;;
 	monitor)
 		basic_machine=m68k-rom68k
@@ -853,7 +846,7 @@ case $basic_machine in
 		os=-msdos
 		;;
 	ms1-*)
-		basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
 		;;
 	msys)
 		basic_machine=i686-pc
@@ -895,7 +888,7 @@ case $basic_machine in
 		basic_machine=v70-nec
 		os=-sysv
 		;;
-	next | m*-next)
+	next | m*-next )
 		basic_machine=m68k-next
 		case $os in
 		    -nextstep* )
@@ -940,12 +933,6 @@ case $basic_machine in
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
-	nsv-tandem)
-		basic_machine=nsv-tandem
-		;;
-	nsx-tandem)
-		basic_machine=nsx-tandem
-		;;
 	op50n-* | op60c-*)
 		basic_machine=hppa1.1-oki
 		os=-proelf
@@ -978,7 +965,7 @@ case $basic_machine in
 		os=-linux
 		;;
 	parisc-*)
-		basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
 		os=-linux
 		;;
 	pbd)
@@ -994,7 +981,7 @@ case $basic_machine in
 		basic_machine=i386-pc
 		;;
 	pc98-*)
-		basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	pentium | p5 | k5 | k6 | nexgen | viac3)
 		basic_machine=i586-pc
@@ -1009,16 +996,16 @@ case $basic_machine in
 		basic_machine=i786-pc
 		;;
 	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-		basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	pentiumpro-* | p6-* | 6x86-* | athlon-*)
-		basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-		basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	pentium4-*)
-		basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	pn)
 		basic_machine=pn-gould
@@ -1028,23 +1015,23 @@ case $basic_machine in
 	ppc | ppcbe)	basic_machine=powerpc-unknown
 		;;
 	ppc-* | ppcbe-*)
-		basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	ppcle | powerpclittle)
+	ppcle | powerpclittle | ppc-le | powerpc-little)
 		basic_machine=powerpcle-unknown
 		;;
 	ppcle-* | powerpclittle-*)
-		basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppc64)	basic_machine=powerpc64-unknown
 		;;
-	ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	ppc64le | powerpc64little)
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
 		basic_machine=powerpc64le-unknown
 		;;
 	ppc64le-* | powerpc64little-*)
-		basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ps2)
 		basic_machine=i386-ibm
@@ -1098,10 +1085,17 @@ case $basic_machine in
 	sequent)
 		basic_machine=i386-sequent
 		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
 	sh5el)
 		basic_machine=sh5le-unknown
 		;;
-	simso-wrs)
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
 		basic_machine=sparclite-wrs
 		os=-vxworks
 		;;
@@ -1120,7 +1114,7 @@ case $basic_machine in
 		os=-sysv4
 		;;
 	strongarm-* | thumb-*)
-		basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	sun2)
 		basic_machine=m68000-sun
@@ -1242,9 +1236,6 @@ case $basic_machine in
 		basic_machine=hppa1.1-winbond
 		os=-proelf
 		;;
-	x64)
-		basic_machine=x86_64-pc
-		;;
 	xbox)
 		basic_machine=i686-pc
 		os=-mingw32
@@ -1253,12 +1244,20 @@ case $basic_machine in
 		basic_machine=xps100-honeywell
 		;;
 	xscale-* | xscalee[bl]-*)
-		basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
 		;;
 	ymp)
 		basic_machine=ymp-cray
 		os=-unicos
 		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	z80-*-coff)
+		basic_machine=z80-unknown
+		os=-sim
+		;;
 	none)
 		basic_machine=none-none
 		os=-none
@@ -1287,6 +1286,10 @@ case $basic_machine in
 	vax)
 		basic_machine=vax-dec
 		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
 	pdp11)
 		basic_machine=pdp11-dec
 		;;
@@ -1296,6 +1299,9 @@ case $basic_machine in
 	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
 		basic_machine=sh-unknown
 		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+		basic_machine=sparc-sun
+		;;
 	cydra)
 		basic_machine=cydra-cydrome
 		;;
@@ -1315,7 +1321,7 @@ case $basic_machine in
 		# Make sure to match an already-canonicalized machine name.
 		;;
 	*)
-		echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
 		exit 1
 		;;
 esac
@@ -1323,10 +1329,10 @@ esac
 # Here we canonicalize certain aliases for manufacturers.
 case $basic_machine in
 	*-digital*)
-		basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
 		;;
 	*-commodore*)
-		basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
 		;;
 	*)
 		;;
@@ -1337,8 +1343,8 @@ esac
 if [ x"$os" != x"" ]
 then
 case $os in
-	# First match some system type aliases that might get confused
-	# with valid system types.
+	# First match some system type aliases
+	# that might get confused with valid system types.
 	# -solaris* is a basic system type, with this one exception.
 	-auroraux)
 		os=-auroraux
@@ -1349,48 +1355,45 @@ case $os in
 	-solaris)
 		os=-solaris2
 		;;
+	-svr4*)
+		os=-sysv4
+		;;
 	-unixware*)
 		os=-sysv4.2uw
 		;;
 	-gnu/linux*)
 		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
 		;;
-	# es1800 is here to avoid being matched by es* (a different OS)
-	-es1800*)
-		os=-ose
-		;;
-	# Now accept the basic system types.
+	# First accept the basic system types.
 	# The portable systems comes first.
-	# Each alternative MUST end in a * to match a version number.
+	# Each alternative MUST END IN A *, to match a version number.
 	# -sysv* is not here because it comes later, after sysvr4.
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
 	      | -sym* | -kopensolaris* | -plan9* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* | -aros* | -cloudabi* | -sortix* \
+	      | -aos* | -aros* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -bitrig* | -openbsd* | -solidbsd* \
 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
 	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
-	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-	      | -morphos* | -superux* | -rtmk* | -windiss* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
-	      | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
-	      | -midnightbsd*)
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1407,12 +1410,12 @@ case $os in
 	-nto*)
 		os=`echo $os | sed -e 's|nto|nto-qnx|'`
 		;;
-	-sim | -xray | -os68k* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* \
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
 	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
 		;;
 	-mac*)
-		os=`echo "$os" | sed -e 's|mac|macos|'`
+		os=`echo $os | sed -e 's|mac|macos|'`
 		;;
 	-linux-dietlibc)
 		os=-linux-dietlibc
@@ -1421,10 +1424,10 @@ case $os in
 		os=`echo $os | sed -e 's|linux|linux-gnu|'`
 		;;
 	-sunos5*)
-		os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
 		;;
 	-sunos6*)
-		os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
 		;;
 	-opened*)
 		os=-openedition
@@ -1435,6 +1438,12 @@ case $os in
 	-wince*)
 		os=-wince
 		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
 	-utek*)
 		os=-bsd
 		;;
@@ -1459,7 +1468,7 @@ case $os in
 	-nova*)
 		os=-rtmk-nova
 		;;
-	-ns2)
+	-ns2 )
 		os=-nextstep2
 		;;
 	-nsk*)
@@ -1481,7 +1490,7 @@ case $os in
 	-oss*)
 		os=-sysv3
 		;;
-	-svr4*)
+	-svr4)
 		os=-sysv4
 		;;
 	-svr3)
@@ -1496,38 +1505,32 @@ case $os in
 	-ose*)
 		os=-ose
 		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
 	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
 		os=-mint
 		;;
+	-aros*)
+		os=-aros
+		;;
 	-zvmoe)
 		os=-zvmoe
 		;;
 	-dicos*)
 		os=-dicos
 		;;
-	-pikeos*)
-		# Until real need of OS specific support for
-		# particular features comes up, bare metal
-		# configurations are quite functional.
-		case $basic_machine in
-		    arm*)
-			os=-eabi
-			;;
-		    *)
-			os=-elf
-			;;
-		esac
-		;;
 	-nacl*)
 		;;
-	-ios)
-		;;
 	-none)
 		;;
 	*)
 		# Get rid of the `-' at the beginning of $os.
 		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
 		exit 1
 		;;
 esac
@@ -1617,12 +1620,12 @@ case $basic_machine in
 	sparc-* | *-sun)
 		os=-sunos4.1.1
 		;;
-	pru-*)
-		os=-elf
-		;;
 	*-be)
 		os=-beos
 		;;
+	*-haiku)
+		os=-haiku
+		;;
 	*-ibm)
 		os=-aix
 		;;
@@ -1662,7 +1665,7 @@ case $basic_machine in
 	m88k-omron*)
 		os=-luna
 		;;
-	*-next)
+	*-next )
 		os=-nextstep
 		;;
 	*-sequent)
@@ -1677,6 +1680,9 @@ case $basic_machine in
 	i370-*)
 		os=-mvs
 		;;
+	*-next)
+		os=-nextstep3
+		;;
 	*-gould)
 		os=-sysv
 		;;
@@ -1786,15 +1792,15 @@ case $basic_machine in
 				vendor=stratus
 				;;
 		esac
-		basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
 		;;
 esac
 
-echo "$basic_machine$os"
+echo $basic_machine$os
 exit
 
 # Local variables:
-# eval: (add-hook 'write-file-functions 'time-stamp)
+# eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "timestamp='"
 # time-stamp-format: "%:y-%02m-%02d"
 # time-stamp-end: "'"

+ 5 - 5
config/depcomp

@@ -1,9 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2013-05-30.07; # UTC
 
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@ scriptversion=2018-03-07.03; # UTC
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -783,9 +783,9 @@ exit 0
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
 # time-stamp-end: "; # UTC"
 # End:

+ 15 - 32
config/install-sh

@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2018-03-11.20; # UTC
+scriptversion=2013-12-25.23; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -271,18 +271,15 @@ do
     fi
     dst=$dst_arg
 
-    # If destination is a directory, append the input filename.
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
     if test -d "$dst"; then
       if test "$is_target_a_directory" = never; then
         echo "$0: $dst_arg: Is a directory" >&2
         exit 1
       fi
       dstdir=$dst
-      dstbase=`basename "$src"`
-      case $dst in
-	*/) dst=$dst$dstbase;;
-	*)  dst=$dst/$dstbase;;
-      esac
+      dst=$dstdir/`basename "$src"`
       dstdir_status=0
     else
       dstdir=`dirname "$dst"`
@@ -291,11 +288,6 @@ do
     fi
   fi
 
-  case $dstdir in
-    */) dstdirslash=$dstdir;;
-    *)  dstdirslash=$dstdir/;;
-  esac
-
   obsolete_mkdir_used=false
 
   if test $dstdir_status != 0; then
@@ -332,43 +324,34 @@ do
             # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
             ;;
           *)
-            # Note that $RANDOM variable is not portable (e.g. dash);  Use it
-            # here however when possible just to lower collision chance.
             tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+            trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
 
-            trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-            # Because "mkdir -p" follows existing symlinks and we likely work
-            # directly in world-writeable /tmp, make sure that the '$tmpdir'
-            # directory is successfully created first before we actually test
-            # 'mkdir -p' feature.
             if (umask $mkdir_umask &&
-                $mkdirprog $mkdir_mode "$tmpdir" &&
-                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
             then
               if test -z "$dir_arg" || {
                    # Check for POSIX incompatibilities with -m.
                    # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
                    # other-writable bit of parent directory when it shouldn't.
                    # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-                   test_tmpdir="$tmpdir/a"
-                   ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+                   ls_ld_tmpdir=`ls -ld "$tmpdir"`
                    case $ls_ld_tmpdir in
                      d????-?r-*) different_mode=700;;
                      d????-?--*) different_mode=755;;
                      *) false;;
                    esac &&
-                   $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
-                     ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+                   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+                     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
                      test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
                    }
                  }
               then posix_mkdir=:
               fi
-              rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+              rmdir "$tmpdir/d" "$tmpdir"
             else
               # Remove any dirs left behind by ancient mkdir implementations.
-              rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+              rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
             fi
             trap '' 0;;
         esac;;
@@ -444,8 +427,8 @@ do
   else
 
     # Make a couple of temp file names in the proper directory.
-    dsttmp=${dstdirslash}_inst.$$_
-    rmtmp=${dstdirslash}_rm.$$_
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
 
     # Trap to clean up those temp files at exit.
     trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
@@ -510,9 +493,9 @@ do
 done
 
 # Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
 # time-stamp-end: "; # UTC"
 # End:

+ 72 - 174
config/ltmain.sh

@@ -31,7 +31,7 @@
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION="2.4.6 Debian-2.4.6-9"
+VERSION=2.4.6
 package_revision=2.4.6
 
 
@@ -1370,7 +1370,7 @@ func_lt_ver ()
 #! /bin/sh
 
 # Set a version string for this script.
-scriptversion=2015-10-07.11; # UTC
+scriptversion=2014-01-07.03; # UTC
 
 # A portable, pluggable option parser for Bourne shell.
 # Written by Gary V. Vaughan, 2010
@@ -1530,8 +1530,6 @@ func_run_hooks ()
 {
     $debug_cmd
 
-    _G_rc_run_hooks=false
-
     case " $hookable_fns " in
       *" $1 "*) ;;
       *) func_fatal_error "'$1' does not support hook funcions.n" ;;
@@ -1540,16 +1538,16 @@ func_run_hooks ()
     eval _G_hook_fns=\$$1_hooks; shift
 
     for _G_hook in $_G_hook_fns; do
-      if eval $_G_hook '"$@"'; then
-        # store returned options list back into positional
-        # parameters for next 'cmd' execution.
-        eval _G_hook_result=\$${_G_hook}_result
-        eval set dummy "$_G_hook_result"; shift
-        _G_rc_run_hooks=:
-      fi
+      eval $_G_hook '"$@"'
+
+      # store returned options list back into positional
+      # parameters for next 'cmd' execution.
+      eval _G_hook_result=\$${_G_hook}_result
+      eval set dummy "$_G_hook_result"; shift
     done
 
-    $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result
+    func_quote_for_eval ${1+"$@"}
+    func_run_hooks_result=$func_quote_for_eval_result
 }
 
 
@@ -1559,16 +1557,10 @@ func_run_hooks ()
 ## --------------- ##
 
 # In order to add your own option parsing hooks, you must accept the
-# full positional parameter list in your hook function, you may remove/edit
-# any options that you action, and then pass back the remaining unprocessed
+# full positional parameter list in your hook function, remove any
+# options that you action, and then pass back the remaining unprocessed
 # options in '<hooked_function_name>_result', escaped suitably for
-# 'eval'.  In this case you also must return $EXIT_SUCCESS to let the
-# hook's caller know that it should pay attention to
-# '<hooked_function_name>_result'.  Returning $EXIT_FAILURE signalizes that
-# arguments are left untouched by the hook and therefore caller will ignore the
-# result variable.
-#
-# Like this:
+# 'eval'.  Like this:
 #
 #    my_options_prep ()
 #    {
@@ -1578,11 +1570,9 @@ func_run_hooks ()
 #        usage_message=$usage_message'
 #      -s, --silent       don'\''t print informational messages
 #    '
-#        # No change in '$@' (ignored completely by this hook).  There is
-#        # no need to do the equivalent (but slower) action:
-#        # func_quote_for_eval ${1+"$@"}
-#        # my_options_prep_result=$func_quote_for_eval_result
-#        false
+#
+#        func_quote_for_eval ${1+"$@"}
+#        my_options_prep_result=$func_quote_for_eval_result
 #    }
 #    func_add_hook func_options_prep my_options_prep
 #
@@ -1591,37 +1581,25 @@ func_run_hooks ()
 #    {
 #        $debug_cmd
 #
-#        args_changed=false
-#
 #        # Note that for efficiency, we parse as many options as we can
 #        # recognise in a loop before passing the remainder back to the
 #        # caller on the first unrecognised argument we encounter.
 #        while test $# -gt 0; do
 #          opt=$1; shift
 #          case $opt in
-#            --silent|-s) opt_silent=:
-#                         args_changed=:
-#                         ;;
+#            --silent|-s) opt_silent=: ;;
 #            # Separate non-argument short options:
 #            -s*)         func_split_short_opt "$_G_opt"
 #                         set dummy "$func_split_short_opt_name" \
 #                             "-$func_split_short_opt_arg" ${1+"$@"}
 #                         shift
-#                         args_changed=:
 #                         ;;
-#            *)           # Make sure the first unrecognised option "$_G_opt"
-#                         # is added back to "$@", we could need that later
-#                         # if $args_changed is true.
-#                         set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+#            *)            set dummy "$_G_opt" "$*"; shift; break ;;
 #          esac
 #        done
 #
-#        if $args_changed; then
-#          func_quote_for_eval ${1+"$@"}
-#          my_silent_option_result=$func_quote_for_eval_result
-#        fi
-#
-#        $args_changed
+#        func_quote_for_eval ${1+"$@"}
+#        my_silent_option_result=$func_quote_for_eval_result
 #    }
 #    func_add_hook func_parse_options my_silent_option
 #
@@ -1633,32 +1611,16 @@ func_run_hooks ()
 #        $opt_silent && $opt_verbose && func_fatal_help "\
 #    '--silent' and '--verbose' options are mutually exclusive."
 #
-#        false
+#        func_quote_for_eval ${1+"$@"}
+#        my_option_validation_result=$func_quote_for_eval_result
 #    }
 #    func_add_hook func_validate_options my_option_validation
 #
-# You'll also need to manually amend $usage_message to reflect the extra
+# You'll alse need to manually amend $usage_message to reflect the extra
 # options you parse.  It's preferable to append if you can, so that
 # multiple option parsing hooks can be added safely.
 
 
-# func_options_finish [ARG]...
-# ----------------------------
-# Finishing the option parse loop (call 'func_options' hooks ATM).
-func_options_finish ()
-{
-    $debug_cmd
-
-    _G_func_options_finish_exit=false
-    if func_run_hooks func_options ${1+"$@"}; then
-      func_options_finish_result=$func_run_hooks_result
-      _G_func_options_finish_exit=:
-    fi
-
-    $_G_func_options_finish_exit
-}
-
-
 # func_options [ARG]...
 # ---------------------
 # All the functions called inside func_options are hookable. See the
@@ -1668,28 +1630,17 @@ func_options ()
 {
     $debug_cmd
 
-    _G_rc_options=false
-
-    for my_func in options_prep parse_options validate_options options_finish
-    do
-      if eval func_$my_func '${1+"$@"}'; then
-        eval _G_res_var='$'"func_${my_func}_result"
-        eval set dummy "$_G_res_var" ; shift
-        _G_rc_options=:
-      fi
-    done
+    func_options_prep ${1+"$@"}
+    eval func_parse_options \
+        ${func_options_prep_result+"$func_options_prep_result"}
+    eval func_validate_options \
+        ${func_parse_options_result+"$func_parse_options_result"}
 
-    # Save modified positional parameters for caller.  As a top-level
-    # options-parser function we always need to set the 'func_options_result'
-    # variable (regardless the $_G_rc_options value).
-    if $_G_rc_options; then
-      func_options_result=$_G_res_var
-    else
-      func_quote_for_eval ${1+"$@"}
-      func_options_result=$func_quote_for_eval_result
-    fi
+    eval func_run_hooks func_options \
+        ${func_validate_options_result+"$func_validate_options_result"}
 
-    $_G_rc_options
+    # save modified positional parameters for caller
+    func_options_result=$func_run_hooks_result
 }
 
 
@@ -1698,9 +1649,9 @@ func_options ()
 # All initialisations required before starting the option parse loop.
 # Note that when calling hook functions, we pass through the list of
 # positional parameters.  If a hook function modifies that list, and
-# needs to propagate that back to rest of this script, then the complete
+# needs to propogate that back to rest of this script, then the complete
 # modified list must be put in 'func_run_hooks_result' before
-# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned).
+# returning.
 func_hookable func_options_prep
 func_options_prep ()
 {
@@ -1710,14 +1661,10 @@ func_options_prep ()
     opt_verbose=false
     opt_warning_types=
 
-    _G_rc_options_prep=false
-    if func_run_hooks func_options_prep ${1+"$@"}; then
-      _G_rc_options_prep=:
-      # save modified positional parameters for caller
-      func_options_prep_result=$func_run_hooks_result
-    fi
+    func_run_hooks func_options_prep ${1+"$@"}
 
-    $_G_rc_options_prep
+    # save modified positional parameters for caller
+    func_options_prep_result=$func_run_hooks_result
 }
 
 
@@ -1731,20 +1678,18 @@ func_parse_options ()
 
     func_parse_options_result=
 
-    _G_rc_parse_options=false
     # this just eases exit handling
     while test $# -gt 0; do
       # Defer to hook functions for initial option parsing, so they
       # get priority in the event of reusing an option name.
-      if func_run_hooks func_parse_options ${1+"$@"}; then
-        eval set dummy "$func_run_hooks_result"; shift
-        _G_rc_parse_options=:
-      fi
+      func_run_hooks func_parse_options ${1+"$@"}
+
+      # Adjust func_parse_options positional parameters to match
+      eval set dummy "$func_run_hooks_result"; shift
 
       # Break out of the loop if we already parsed every option.
       test $# -gt 0 || break
 
-      _G_match_parse_options=:
       _G_opt=$1
       shift
       case $_G_opt in
@@ -1759,10 +1704,7 @@ func_parse_options ()
 		      ;;
 
         --warnings|--warning|-W)
-                      if test $# = 0 && func_missing_arg $_G_opt; then
-                        _G_rc_parse_options=:
-                        break
-                      fi
+                      test $# = 0 && func_missing_arg $_G_opt && break
                       case " $warning_categories $1" in
                         *" $1 "*)
                           # trailing space prevents matching last $1 above
@@ -1815,25 +1757,15 @@ func_parse_options ()
                       shift
                       ;;
 
-        --)           _G_rc_parse_options=: ; break ;;
+        --)           break ;;
         -*)           func_fatal_help "unrecognised option: '$_G_opt'" ;;
-        *)            set dummy "$_G_opt" ${1+"$@"}; shift
-                      _G_match_parse_options=false
-                      break
-                      ;;
+        *)            set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
       esac
-
-      $_G_match_parse_options && _G_rc_parse_options=:
     done
 
-
-    if $_G_rc_parse_options; then
-      # save modified positional parameters for caller
-      func_quote_for_eval ${1+"$@"}
-      func_parse_options_result=$func_quote_for_eval_result
-    fi
-
-    $_G_rc_parse_options
+    # save modified positional parameters for caller
+    func_quote_for_eval ${1+"$@"}
+    func_parse_options_result=$func_quote_for_eval_result
 }
 
 
@@ -1846,21 +1778,16 @@ func_validate_options ()
 {
     $debug_cmd
 
-    _G_rc_validate_options=false
-
     # Display all warnings if -W was not given.
     test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
 
-    if func_run_hooks func_validate_options ${1+"$@"}; then
-      # save modified positional parameters for caller
-      func_validate_options_result=$func_run_hooks_result
-      _G_rc_validate_options=:
-    fi
+    func_run_hooks func_validate_options ${1+"$@"}
 
     # Bail if the options were screwed!
     $exit_cmd $EXIT_FAILURE
 
-    $_G_rc_validate_options
+    # save modified positional parameters for caller
+    func_validate_options_result=$func_run_hooks_result
 }
 
 
@@ -2141,12 +2068,12 @@ include the following information:
        compiler:       $LTCC
        compiler flags: $LTCFLAGS
        linker:         $LD (gnu? $with_gnu_ld)
-       version:        $progname $scriptversion Debian-2.4.6-9
+       version:        $progname (GNU libtool) 2.4.6
        automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
        autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
 
 Report bugs to <bug-libtool@gnu.org>.
-GNU libtool home page: <http://www.gnu.org/s/libtool/>.
+GNU libtool home page: <http://www.gnu.org/software/libtool/>.
 General help using GNU software: <http://www.gnu.org/gethelp/>."
     exit 0
 }
@@ -2343,8 +2270,6 @@ libtool_options_prep ()
     nonopt=
     preserve_args=
 
-    _G_rc_lt_options_prep=:
-
     # Shorthand for --mode=foo, only valid as the first argument
     case $1 in
     clean|clea|cle|cl)
@@ -2368,18 +2293,11 @@ libtool_options_prep ()
     uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
       shift; set dummy --mode uninstall ${1+"$@"}; shift
       ;;
-    *)
-      _G_rc_lt_options_prep=false
-      ;;
     esac
 
-    if $_G_rc_lt_options_prep; then
-      # Pass back the list of options.
-      func_quote_for_eval ${1+"$@"}
-      libtool_options_prep_result=$func_quote_for_eval_result
-    fi
-
-    $_G_rc_lt_options_prep
+    # Pass back the list of options.
+    func_quote_for_eval ${1+"$@"}
+    libtool_options_prep_result=$func_quote_for_eval_result
 }
 func_add_hook func_options_prep libtool_options_prep
 
@@ -2391,12 +2309,9 @@ libtool_parse_options ()
 {
     $debug_cmd
 
-    _G_rc_lt_parse_options=false
-
     # Perform our own loop to consume as many options as possible in
     # each iteration.
     while test $# -gt 0; do
-      _G_match_lt_parse_options=:
       _G_opt=$1
       shift
       case $_G_opt in
@@ -2471,22 +2386,15 @@ libtool_parse_options ()
                         func_append preserve_args " $_G_opt"
                         ;;
 
-        # An option not handled by this hook function:
-        *)              set dummy "$_G_opt" ${1+"$@"} ; shift
-                        _G_match_lt_parse_options=false
-                        break
-                        ;;
+	# An option not handled by this hook function:
+        *)		set dummy "$_G_opt" ${1+"$@"};	shift; break  ;;
       esac
-      $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
     done
 
-    if $_G_rc_lt_parse_options; then
-      # save modified positional parameters for caller
-      func_quote_for_eval ${1+"$@"}
-      libtool_parse_options_result=$func_quote_for_eval_result
-    fi
 
-    $_G_rc_lt_parse_options
+    # save modified positional parameters for caller
+    func_quote_for_eval ${1+"$@"}
+    libtool_parse_options_result=$func_quote_for_eval_result
 }
 func_add_hook func_parse_options libtool_parse_options
 
@@ -7364,14 +7272,10 @@ func_mode_link ()
       # -tp=*                Portland pgcc target processor selection
       # --sysroot=*          for sysroot support
       # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
-      # -specs=*             GCC specs files
       # -stdlib=*            select c++ std lib with clang
-      # -fsanitize=*         Clang/GCC memory and address sanitizer
-      # -fuse-ld=*           Linker select flags for GCC
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-      -specs=*|-fsanitize=*|-fuse-ld=*)
+      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
         func_quote_for_eval "$arg"
 	arg=$func_quote_for_eval_result
         func_append compile_command " $arg"
@@ -7664,10 +7568,7 @@ func_mode_link ()
 	case $pass in
 	dlopen) libs=$dlfiles ;;
 	dlpreopen) libs=$dlprefiles ;;
-	link)
-	  libs="$deplibs %DEPLIBS%"
-	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
-	  ;;
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
 	esac
       fi
       if test lib,dlpreopen = "$linkmode,$pass"; then
@@ -7986,19 +7887,19 @@ func_mode_link ()
 	    # It is a libtool convenience library, so add in its objects.
 	    func_append convenience " $ladir/$objdir/$old_library"
 	    func_append old_convenience " $ladir/$objdir/$old_library"
-	    tmp_libs=
-	    for deplib in $dependency_libs; do
-	      deplibs="$deplib $deplibs"
-	      if $opt_preserve_dup_deps; then
-		case "$tmp_libs " in
-		*" $deplib "*) func_append specialdeplibs " $deplib" ;;
-		esac
-	      fi
-	      func_append tmp_libs " $deplib"
-	    done
 	  elif test prog != "$linkmode" && test lib != "$linkmode"; then
 	    func_fatal_error "'$lib' is not a convenience library"
 	  fi
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    deplibs="$deplib $deplibs"
+	    if $opt_preserve_dup_deps; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+	      esac
+	    fi
+	    func_append tmp_libs " $deplib"
+	  done
 	  continue
 	fi # $pass = conv
 
@@ -8922,9 +8823,6 @@ func_mode_link ()
 	    revision=$number_minor
 	    lt_irix_increment=no
 	    ;;
-	  *)
-	    func_fatal_configuration "$modename: unknown library version type '$version_type'"
-	    ;;
 	  esac
 	  ;;
 	no)

+ 8 - 8
config/missing

@@ -1,9 +1,9 @@
 #! /bin/sh
 # Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2013-10-28.13; # UTC
 
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2018-03-07.03; # UTC
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -101,9 +101,9 @@ else
   exit $st
 fi
 
-perl_URL=https://www.perl.org/
-flex_URL=https://github.com/westes/flex
-gnu_software_URL=https://www.gnu.org/software
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
 
 program_details ()
 {
@@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
 exit $st
 
 # Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
 # time-stamp-end: "; # UTC"
 # End:

Datei-Diff unterdrückt, da er zu groß ist
+ 204 - 360
configure


+ 80 - 137
configure.ac

@@ -4,7 +4,7 @@ dnl $Id$
 AC_PREREQ([2.69])
 
 dnl Set version info here!
-AC_INIT([tcpreplay],[4.4.2],[https://github.com/appneta/tcpreplay/issues],[tcpreplay],[http://tcpreplay.sourceforge.net/])
+AC_INIT([tcpreplay],[4.4.3],[https://github.com/appneta/tcpreplay/issues],[tcpreplay],[http://tcpreplay.sourceforge.net/])
 AC_CONFIG_SRCDIR([src/tcpreplay.c])
 AC_CONFIG_HEADERS([src/config.h])
 AC_CONFIG_AUX_DIR(config)
@@ -14,7 +14,7 @@ AM_WITH_DMALLOC
 dnl People building from GitHub need the same version of Autogen as I'm using
 dnl or specify --disable-local-libopts to force using the locally-installed
 dnl copy of libopts rather than the source in the `./libopts/` directory.
-MAINTAINER_AUTOGEN_VERSION=5.18.12
+MAINTAINER_AUTOGEN_VERSION=5.18.16
 
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -658,7 +658,8 @@ AC_ARG_WITH(libpcap,
                 for dir in . lib lib64 lib/${host_cpu}-${host_os} ${host_cpu}-${host_os} lib/${MULTIARCH} ${MULTIARCH}; do
                     sharefile=$(ls ${testdir}/$dir/libpcap${ext}* 2> /dev/null | sort | head -n1)
                     if test -n "${sharefile}"; then
-                        LPCAPLIB="-L$(dirname ${sharefile}) -lpcap"
+                        LPCAP_LD_LIBRARY_PATH="$(dirname ${sharefile})"
+                        LPCAPLIB="-L$LPCAP_LD_LIBRARY_PATH -lpcap"
                         foundpcap=$testdir
                         break
                     fi
@@ -682,36 +683,6 @@ AC_ARG_WITH(libpcap,
                     fi
                 done
 
-                if ! test $foundpcap = no; then
-                    ## could be PF_RING
-                    #
-                    #  library is static and in PF_RING build tree
-                    #
-                    #  Need access to libpfring library
-                    #  and must find an associated libpfring.a
-                    if test -n "${with_pfring_lib}"; then
-                        if test -f ${with_pfring_lib}; then
-                            pf_ring_lib=${with_pfring_lib}
-                            pf_ring_found=yes
-                        else
-                            AC_MSG_ERROR(["Unable to find PF_RING library ${with_pfring_lib}"])
-                        fi
-                    else
-                        ## search locally for most likely PF_RING library
-                        for lib in ${foundpcap}/../lib/libs/libpfring_zc_${host_cpu}.a \
-                                ${foundpcap}/../lib/libs/libpfring_dna_${host_cpu}.a \
-                                ${foundpcap}/../lib/libs/libpfring_zero_${host_cpu}.a \
-                                ${foundpcap}/../lib/libs/libpfring_nt_${host_cpu}.a \
-                                ${foundpcap}/../lib/libpfring.a; do
-                            if test -f "${lib}"; then
-                                pf_ring_lib=${lib}
-                                pf_ring_found=yes
-                                break
-                            fi
-                        done
-                    fi
-                    break
-                fi
             done
         fi
 
@@ -732,13 +703,13 @@ AC_ARG_WITH(libpcap,
     # and was created to address portability issues. Unfortunately, the script is not updated properly
     # outside of the base distribution. Examples: PF_RING requires 'pthreads', 'numa' and 'rt', but
     # this is not reflect that in the script. OS X Xcode 10.11 SDK creates its own very broken
-    # 'pcap-config' script that only occasionally works for dynamic definitions, and defintely
+    # 'pcap-config' script that only occasionally works for dynamic definitions, and definitely
     # does not work for static.
     #
     # The ability to enable this script exists for corner cases where libpcap distributions starts
     # using even more libraries than I am currently not aware of. Originally, you only had to worry
     # about 'nl', but now we have to be prepared to add 'nl-3', 'nl-genl-3' and 'dbus-1' to make
-    # libpcap fucntional. In the future, there may be more.
+    # libpcap functional. In the future, there may be more.
     #
     # (sigh)
     #
@@ -838,6 +809,21 @@ else
     AC_MSG_RESULT($foundpcap)
 fi
 
+## could be PF_RING
+#
+#  library is static and in PF_RING build tree
+#
+#  Need access to libpfring library
+#  and must find an associated libpfring.a
+if test -n "${with_pfring_lib}"; then
+    if test -f ${with_pfring_lib}; then
+        pf_ring_lib=${with_pfring_lib}
+        pf_ring_found=yes
+    else
+        AC_MSG_ERROR(["Unable to find PF_RING library ${with_pfring_lib}"])
+    fi
+fi
+
 # libpcap can require libnl
 AC_SEARCH_LIBS([nl_handle_alloc], [nl],
         [AC_MSG_NOTICE([Unable to find nl library - may be needed by libpcap])])
@@ -886,11 +872,19 @@ if test -n "$LPCAPINCDIR"; then
 else
     OLDCFLAGS="$CFLAGS"
     LPCAPINCDIR=$(echo $CFLAGS | sed -e 's/^\-I//')
-    LPCAPINC="$LPCAPINCDIR/pcap.h"
+    if test -d "$LPCAPINCDIR/pcap"; then
+        LPCAPINC="$LPCAPINCDIR/pcap/pcap.h"
+    else
+        LPCAPINC="$LPCAPINCDIR/pcap.h"
+    fi
 fi
 
 LIBS="$LPCAPLIB"
-AC_SEARCH_LIBS([pcap_get_pfring_id], [pcap], AC_DEFINE([HAVE_PF_RING_PCAP], [1], [Do we have PF_RING libpcap support?]))
+AC_SEARCH_LIBS([pcap_get_pfring_id],
+               [pcap],
+               AC_DEFINE([HAVE_PF_RING_PCAP],
+               ,
+               [${with_pfring_lib} numa pthread rt]))
 
 ## Does libpcap work with selected libraries?
 AC_SEARCH_LIBS([pcap_close], [pcap],
@@ -901,107 +895,55 @@ AC_SUBST(LPCAPLIB)
 
 
 dnl Check to see what version of libpcap
-dnl this code has been reduced a lot, but probably still could be
-dnl reduced quite a bit more if we chose too
-AC_MSG_CHECKING(for libpcap version)
-
-dnl 0.9.6 (which is still thinks it is 0.9.5 due to a bug) introduces an important
-dnl fix for OSX.  See: http://tcpreplay.synfin.net/trac/ticket/167
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include "$LPCAPINC"
-#define PCAP_TEST "0.9.6"
-]], [[
-/*
- * simple proggy to test the version of libpcap
- * returns zero if version >= 0.9.6
- * or one otherwise
- */
-    if (strncmp(pcap_lib_version(), PCAP_TEST, 3) >= 0)
-        exit(0);
-
-    if (strncmp(pcap_lib_version(), PCAP_TEST, 5) >= 0) {
-        printf("%s ", pcap_lib_version());
-        exit(0);
-    }
-
-    exit(1);
-]])],
- [libpcap_version_096=yes],
- [libpcap_version_096=no],
- [libpcap_version_096=yes]
-)
-
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+AC_MSG_CHECKING(libpcap version)
+libpcap_version=unknown
+libpcap_version_096=no
+cat >conftest.c <<EOF
 #include <string.h>
-#include <stdlib.h>
 #include <stdio.h>
 #include "$LPCAPINC"
-#define PCAP_TEST "0.8"
-]], [[
 /*
- * simple proggy to test the version of libpcap
- * returns zero if version >= 0.8.0
- * or one otherwise
+ * simple proggy to get the version of libpcap
  */
-    if (strncmp(pcap_lib_version(), PCAP_TEST, 3) >= 0)
-        exit(0);
-
-    /* winpcap? */
-    if (strncmp(pcap_lib_version(), "WinPcap", 7) == 0)
-        exit(0);
-
-    exit(1);
-]])],
- [libpcap_ver8=yes],
- [libpcap_ver8=no],
- [libpcap_ver8=yes]
-)
-
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include "$LPCAPINC"
-#define PCAP_TEST "0.7.2"
-extern const char pcap_version[[]]; /* double up since autoconf escapes things */
-]], [[
-/*
- * simple proggy to test the version of libpcap
- * returns zero if version >= 0.7.2
- * or one otherwise
- */
-    if (strncmp(pcap_lib_version(), PCAP_TEST, 3) >= 0)
-        exit(0);
-
-    if (strncmp(pcap_version, PCAP_TEST, 5) >= 0)
-            exit(0);
+ int main() {
+    printf("%s\n", pcap_lib_version());
+    return 0;
+}
+EOF
+${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LPCAPLIB \
+    conftest.c $LIBS >/dev/null 2>&1
+if test -x conftest ; then
+    full_libpcap_version=$(LD_LIBRARY_PATH="$LPCAP_LD_LIBRARY_PATH" ./conftest)
+    libpcap_version=$(echo "$full_libpcap_version" | ${CUT} -d' ' -f3)
+    pcap_version_ok=yes
+fi
+AC_MSG_RESULT([$libpcap_version])
+rm -rf conftest.* core core.conftest 2>&1 > /dev/null
+
+AC_MSG_CHECKING(for valid libpcap version)
+if test x$libpcap_version != xunknown; then
+    libpcap_major=$(echo ${libpcap_version} | ${CUT} -d '.' -f1)
+    libpcap_minor=$(echo ${libpcap_version} | ${CUT} -d '.' -f2)
+    libpcap_build=$(echo ${libpcap_version} | ${CUT} -d '.' -f3)
+    if test $libpcap_major -eq 0 && \
+        (test $libpcap_minor -lt 7 || \
+         (test $libpcap_minor -eq 7 && test $libpcap_build -lt 2))
+    then
+        AC_MSG_ERROR([Libpcap versions < 0.7.2 are not supported
+        Please upgrade to version 0.7.2 or better. Your version is $libpcap_version])
+    fi
 
-    exit(1);
-]])],
- [libpcap_ver7=yes],
- [libpcap_ver7=no],
- [libpcap_ver7=yes]
-)
+    dnl 0.9.6 (which is still thinks it is 0.9.5 due to a bug) introduces an important
+    dnl fix for OSX.  See: http://tcpreplay.synfin.net/trac/ticket/167
+    if test $libpcap_major -gt 0 || \
+       (test $libpcap_minor -eq 9 && test $libpcap_build -ge 6)
+    then
+        libpcap_version_096=yes
+    fi
 
-if test x$libpcap_ver8 = xyes ; then
-    AC_MSG_RESULT(>= 0.8.0)
-elif test x$libpcap_ver7 = xyes ; then
-    AC_MSG_RESULT(>= 0.7.2)
+    AC_MSG_RESULT([yes])
 else
-    AC_MSG_ERROR([Libpcap versions < 0.7.2 are not supported
-    Please upgrade to version 0.7.2 or better])
-fi
-
-libpcap_version=unknown
-if test x$libpcap_version_096 = xyes ; then
-    libpcap_version=">= 0.9.6"
-elif test x$libpcap_ver8 = xyes ; then
-    libpcap_version=">= 0.8.0"
-elif test x$libcap_ver7 = xyes ; then
-    libpcap_version=">= 0.7.0"
+    AC_MSG_RESULT([unknown])
 fi
 
 dnl Check for pcap_setnonblock()
@@ -1681,8 +1623,8 @@ int
 main (int argc, char *argv[])
 {
     if (strncmp(PCAPNAV_VERSION, PCAPNAV_TEST, 3) >= 0)
-        exit(0);
-    exit(1);
+        return 0;
+    return 1;
 }           ]])],[libpcapnav_ver=yes
             AC_MSG_RESULT(>= 0.4)],[libpcapnav_ver=no
             AC_MSG_RESULT(< 0.4)],[libpcapnav_ver=no
@@ -1726,26 +1668,27 @@ case "$host_os" in
         #include <sys/types.h>
         #include <sys/wait.h>
         #include <stdio.h>
+        #include <unistd.h>
         unsigned char a[[5]] = { 1, 2, 3, 4, 5 };
-        main() {
+        int main() {
             unsigned int i;
             pid_t pid;
             int status;
             /* avoid "core dumped" message */
             pid = fork();
             if (pid <  0)
-                exit(2);
+                return 2;
             if (pid > 0) {
                 /* parent */
                 pid = waitpid(pid, &status, 0);
                 if (pid < 0)
-                        exit(3);
-                exit(!WIFEXITED(status));
+                        return 3;
+                return !WIFEXITED(status);
             }
             /* child */
             i = *(unsigned int *)&a[[1]];
             printf("%d\n", i);
-            exit(0);
+            return 0;
         }
 EOF
         ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \

+ 9 - 0
docs/CHANGELOG

@@ -1,4 +1,13 @@
+01/01/2023 Version 4.4.3
+    - upgrade autogen/libopts to version 5.18.16 (#759)
+    - avoid implicit int in configure.ac (#757)
+    - remove invalid assert in tree (#756)
+    - program exit after send error (#751)
+    - make libpcap version test more robust (#750)
+    - looping inflates some packet counters (#749)
+
 08/28/2022 Version 4.4.2
+    - fix tests when building in a directory outside source tree (#767)
     - remove autogen.sh from distribution tarballs (#745)
     - CVE-2022-37048 heap-overflow in get_l2len_protocol (#735)
     - replaying on a loopback interface is broken (#732)

+ 4 - 1
docs/CREDIT

@@ -105,5 +105,8 @@ Dave Craig <GitHub @davecraig>
 Vincent Bernat <GitHub @vincentbernat>
     - tcprewrite: fix DLT name for DLT_C_JNPR_ETHER in documentation
 
-Halver <GigHub @Halver>
+Halver <GitHub @Halver>
     - specify directories as files
+
+Florian Weimer <GitHub @fweimer-rh>
+    - Avoid implicit int in configure.ac

+ 5 - 9
docs/Makefile.in

@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -276,7 +276,6 @@ prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
 rmmod = @rmmod@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -314,8 +313,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -339,10 +338,7 @@ ctags CTAGS:
 cscope cscopelist:
 
 
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
+distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \

+ 20 - 33
lib/Makefile.in

@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -132,8 +132,7 @@ am__v_at_0 = @
 am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/strlcat.Po ./$(DEPDIR)/strlcpy.Po
+am__depfiles_maybe = depfiles
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -337,7 +336,6 @@ prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
 rmmod = @rmmod@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -378,8 +376,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -405,14 +403,8 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcat.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Po@am__quote@ # am--include-marker
-
-$(am__depfiles_remade):
-	@$(MKDIR_P) $(@D)
-	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
-
-am--depfiles: $(am__depfiles_remade)
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Po@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -496,10 +488,7 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
+distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -571,8 +560,7 @@ clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
 	mostlyclean-am
 
 distclean: distclean-am
-		-rm -f ./$(DEPDIR)/strlcat.Po
-	-rm -f ./$(DEPDIR)/strlcpy.Po
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -618,8 +606,7 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-		-rm -f ./$(DEPDIR)/strlcat.Po
-	-rm -f ./$(DEPDIR)/strlcpy.Po
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -640,16 +627,16 @@ uninstall-am:
 
 .MAKE: install-am install-strip
 
-.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
-	clean-generic clean-libtool clean-noinstLIBRARIES \
-	cscopelist-am ctags ctags-am distclean distclean-compile \
-	distclean-generic distclean-libtool distclean-tags distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \
+	ctags-am distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am

+ 1 - 1
libopts/COPYING.gplv3

@@ -1,7 +1,7 @@
                     GNU GENERAL PUBLIC LICENSE
                        Version 3, 29 June 2007
 
- Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 

+ 3 - 3
libopts/COPYING.lgplv3

@@ -1,7 +1,7 @@
 		   GNU LESSER GENERAL PUBLIC LICENSE
                        Version 3, 29 June 2007
 
- Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
@@ -10,7 +10,7 @@
 the terms and conditions of version 3 of the GNU General Public
 License, supplemented by the additional permissions listed below.
 
-  0. Additional Definitions. 
+  0. Additional Definitions.
 
   As used herein, "this License" refers to version 3 of the GNU Lesser
 General Public License, and the "GNU GPL" refers to version 3 of the GNU
@@ -111,7 +111,7 @@ the following:
        a copy of the Library already present on the user's computer
        system, and (b) will operate properly with a modified version
        of the Library that is interface-compatible with the Linked
-       Version. 
+       Version.
 
    e) Provide Installation Information, but only if you would otherwise
    be required to provide such information under section 6 of the

+ 1 - 1
libopts/COPYING.mbsd

@@ -1,4 +1,4 @@
-Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
 

+ 14 - 13
libopts/Makefile.am

@@ -7,19 +7,19 @@ noinst_LTLIBRARIES      = libopts.la
 endif
 libopts_la_SOURCES      = libopts.c
 libopts_la_CPPFLAGS     = -I$(srcdir)
-#libopts_la_LDFLAGS      = -version-info  41:1:16
+libopts_la_LDFLAGS      = -version-info  42:1:17
 EXTRA_DIST		=
 BUILT_SOURCES		=
 MOSTLYCLEANFILES	=
 
 libopts.c:		$(BUILT_SOURCES)
-	@: do-nothing rule to avoid default SCCS get
+@: do-nothing rule to avoid default SCCS get
 
 
 # Makefile fragment from gnulib-s stdnoreturn module:
 #
-_NORETURN_H=$(srcdir)/compat/_Noreturn.h
-EXTRA_DIST += $(srcdir)/compat/_Noreturn.h
+_NORETURN_H=$(srcdir)/_Noreturn.h
+EXTRA_DIST += _Noreturn.h
 BUILT_SOURCES += $(STDNORETURN_H)
 if GL_GENERATE_STDNORETURN_H
 stdnoreturn.h: stdnoreturn.in.h $(top_builddir)/config.status $(_NORETURN_H)
@@ -38,11 +38,11 @@ EXTRA_DIST += stdnoreturn.in.h
 
 EXTRA_DIST += \
     COPYING.gplv3           COPYING.lgplv3          COPYING.mbsd  \
-    MakeDefs.inc            README                  ag-char-map.h  \
-    alias.c                 ao-strs.c               ao-strs.h  \
-    autoopts.c              autoopts.h              autoopts/options.h  \
-    autoopts/project.h      autoopts/usage-txt.h    boolean.c  \
-    check.c                 compat/_Noreturn.h      compat/compat.h  \
+    MakeDefs.inc            README                  _Noreturn.h  \
+    ag-char-map.h           alias.c                 ao-strs.c  \
+    ao-strs.h               autoopts.c              autoopts.h  \
+    autoopts/options.h      autoopts/project.h      autoopts/usage-txt.h  \
+    boolean.c               check.c                 compat/compat.h  \
     compat/pathfind.c       compat/snprintf.c       compat/strchr.c  \
     compat/strdup.c         compat/windows-config.h configfile.c  \
     cook.c                  enum.c                  env.c  \
@@ -54,7 +54,8 @@ EXTRA_DIST += \
     option-value-type.h     option-xat-attribute.c  option-xat-attribute.h  \
     parse-duration.c        parse-duration.h        pgusage.c  \
     proto.h                 putshell.c              reset.c  \
-    restore.c               save.c                  sort.c  \
-    stack.c                 stdnoreturn.in.h        streqvcmp.c  \
-    text_mmap.c             time.c                  tokenize.c  \
-    usage.c                 version.c
+    restore.c               save-flags.c            save-flags.h  \
+    save.c                  sort.c                  stack.c  \
+    stdnoreturn.in.h        streqvcmp.c             text_mmap.c  \
+    time.c                  tokenize.c              usage.c  \
+    version.c

+ 45 - 53
libopts/Makefile.in

@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -140,6 +140,9 @@ AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
 am__v_lt_1 = 
+libopts_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(libopts_la_LDFLAGS) $(LDFLAGS) -o $@
 @INSTALL_LIBOPTS_FALSE@am_libopts_la_rpath =
 @INSTALL_LIBOPTS_TRUE@am_libopts_la_rpath = -rpath $(libdir)
 AM_V_P = $(am__v_P_@AM_V@)
@@ -156,8 +159,7 @@ am__v_at_0 = @
 am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/libopts_la-libopts.Plo
+am__depfiles_maybe = depfiles
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -357,7 +359,6 @@ prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
 rmmod = @rmmod@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -377,28 +378,28 @@ MAINTAINERCLEANFILES = Makefile.in
 @INSTALL_LIBOPTS_FALSE@noinst_LTLIBRARIES = libopts.la
 libopts_la_SOURCES = libopts.c
 libopts_la_CPPFLAGS = -I$(srcdir)
-#libopts_la_LDFLAGS      = -version-info  41:1:16
-EXTRA_DIST = $(srcdir)/compat/_Noreturn.h stdnoreturn.in.h \
-	COPYING.gplv3 COPYING.lgplv3 COPYING.mbsd MakeDefs.inc README \
-	ag-char-map.h alias.c ao-strs.c ao-strs.h autoopts.c \
-	autoopts.h autoopts/options.h autoopts/project.h \
-	autoopts/usage-txt.h boolean.c check.c compat/_Noreturn.h \
-	compat/compat.h compat/pathfind.c compat/snprintf.c \
-	compat/strchr.c compat/strdup.c compat/windows-config.h \
-	configfile.c cook.c enum.c env.c file.c find.c genshell.c \
-	genshell.h gettext.h init.c intprops.h load.c m4/libopts.m4 \
-	m4/liboptschk.m4 m4/stdnoreturn.m4 makeshell.c nested.c \
-	numeric.c option-value-type.c option-value-type.h \
-	option-xat-attribute.c option-xat-attribute.h parse-duration.c \
-	parse-duration.h pgusage.c proto.h putshell.c reset.c \
-	restore.c save.c sort.c stack.c stdnoreturn.in.h streqvcmp.c \
-	text_mmap.c time.c tokenize.c usage.c version.c
+libopts_la_LDFLAGS = -version-info  42:1:17
+EXTRA_DIST = _Noreturn.h stdnoreturn.in.h COPYING.gplv3 COPYING.lgplv3 \
+	COPYING.mbsd MakeDefs.inc README _Noreturn.h ag-char-map.h \
+	alias.c ao-strs.c ao-strs.h autoopts.c autoopts.h \
+	autoopts/options.h autoopts/project.h autoopts/usage-txt.h \
+	boolean.c check.c compat/compat.h compat/pathfind.c \
+	compat/snprintf.c compat/strchr.c compat/strdup.c \
+	compat/windows-config.h configfile.c cook.c enum.c env.c \
+	file.c find.c genshell.c genshell.h gettext.h init.c \
+	intprops.h load.c m4/libopts.m4 m4/liboptschk.m4 \
+	m4/stdnoreturn.m4 makeshell.c nested.c numeric.c \
+	option-value-type.c option-value-type.h option-xat-attribute.c \
+	option-xat-attribute.h parse-duration.c parse-duration.h \
+	pgusage.c proto.h putshell.c reset.c restore.c save-flags.c \
+	save-flags.h save.c sort.c stack.c stdnoreturn.in.h \
+	streqvcmp.c text_mmap.c time.c tokenize.c usage.c version.c
 BUILT_SOURCES = $(STDNORETURN_H)
 MOSTLYCLEANFILES = stdnoreturn.h stdnoreturn.h-t
 
 # Makefile fragment from gnulib-s stdnoreturn module:
 #
-_NORETURN_H = $(srcdir)/compat/_Noreturn.h
+_NORETURN_H = $(srcdir)/_Noreturn.h
 all: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) all-am
 
@@ -421,8 +422,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -481,7 +482,7 @@ clean-noinstLTLIBRARIES:
 	}
 
 libopts.la: $(libopts_la_OBJECTS) $(libopts_la_DEPENDENCIES) $(EXTRA_libopts_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(LINK) $(am_libopts_la_rpath) $(libopts_la_OBJECTS) $(libopts_la_LIBADD) $(LIBS)
+	$(AM_V_CCLD)$(libopts_la_LINK) $(am_libopts_la_rpath) $(libopts_la_OBJECTS) $(libopts_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -489,13 +490,7 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopts_la-libopts.Plo@am__quote@ # am--include-marker
-
-$(am__depfiles_remade):
-	@$(MKDIR_P) $(@D)
-	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
-
-am--depfiles: $(am__depfiles_remade)
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopts_la-libopts.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -586,10 +581,7 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
+distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -667,7 +659,7 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
 	clean-noinstLTLIBRARIES mostlyclean-am
 
 distclean: distclean-am
-		-rm -f ./$(DEPDIR)/libopts_la-libopts.Plo
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -713,7 +705,7 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-		-rm -f ./$(DEPDIR)/libopts_la-libopts.Plo
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -734,26 +726,26 @@ uninstall-am: uninstall-libLTLIBRARIES
 
 .MAKE: all check install install-am install-strip
 
-.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
-	clean-generic clean-libLTLIBRARIES clean-libtool \
-	clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \
-	distclean-compile distclean-generic distclean-libtool \
-	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am \
-	install-libLTLIBRARIES install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
+	cscopelist-am ctags ctags-am distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-libLTLIBRARIES \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+	uninstall-am uninstall-libLTLIBRARIES
 
 .PRECIOUS: Makefile
 
 
 libopts.c:		$(BUILT_SOURCES)
-	@: do-nothing rule to avoid default SCCS get
+@: do-nothing rule to avoid default SCCS get
 @GL_GENERATE_STDNORETURN_H_TRUE@stdnoreturn.h: stdnoreturn.in.h $(top_builddir)/config.status $(_NORETURN_H)
 @GL_GENERATE_STDNORETURN_H_TRUE@	$(AM_V_GEN)rm -f $@-t $@ && \
 @GL_GENERATE_STDNORETURN_H_TRUE@	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \

+ 1 - 1
libopts/README

@@ -115,7 +115,7 @@ These macros work as follows:
 
 LICENSING:
 
-This material is Copyright (C) 1992-2015 by Bruce Korb.  You are
+This material is Copyright (C) 1992-2018 by Bruce Korb.  You are
 licensed to use this under the terms of either the GNU Lesser General
 Public License (see: COPYING.lgpl), or, at your option, the modified
 Berkeley Software Distribution License (see: COPYING.mbsd).  Both of

libopts/compat/_Noreturn.h → libopts/_Noreturn.h


+ 2 - 2
libopts/ag-char-map.h

@@ -1,6 +1,6 @@
 /*
  *  29 bits for 46 character classifications
- *  generated by char-mapper on 08/29/16 at 14:35:22
+ *  generated by char-mapper on 08/26/18 at 10:44:22
  *
  *  This file contains the character classifications
  *  used by AutoGen and AutoOpts for identifying tokens.
@@ -8,7 +8,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control

+ 2 - 2
libopts/alias.c

@@ -12,7 +12,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -31,7 +31,7 @@
  *  13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239  COPYING.mbsd
  */
 
-LOCAL tSuccess
+static tSuccess
 too_many_occurrences(tOptions * opts, tOptDesc * od)
 {
     if ((opts->fOptSet & OPTPROC_ERRSTOP) != 0) {

+ 143 - 139
libopts/ao-strs.c

@@ -6,7 +6,7 @@
  * From the definitions    ao-strs.def
  * and the template file   strings
  *
- *  Copyright (C) 2011-2015 Bruce Korb, all rights reserved.
+ *  Copyright (C) 2011-2018 Bruce Korb, all rights reserved.
  *  This is free software. It is licensed for use, modification and
  *  redistribution under the terms of the
  *  Modified (3 clause) Berkeley Software Distribution License
@@ -38,160 +38,164 @@
  */
 #include "ao-strs.h"
 
-char const ao_strs_strtable[6670] =
+char const ao_strs_strtable[6714] =
 /*     0 */ "-_^\0"
 /*     4 */ "  %s%s\n\0"
-/*    12 */ "auto-options\0"
-/*    25 */ "program\0"
-/*    33 */ "%%-%ds %%s\n\0"
-/*    45 */ "\n"
+/*    12 */ "<?auto-options\0"
+/*    27 */ "<?program\0"
+/*    37 */ "%%-%ds %%s\n\0"
+/*    49 */ "<?program %s>\n\0"
+/*    64 */ "\n"
             "%s\n\n\0"
-/*    51 */ "=file\0"
-/*    57 */ "=Mbr\0"
-/*    62 */ "=Cplx\0"
-/*    68 */ "[=arg]\0"
-/*    75 */ "--%2$s%1$s\0"
-/*    86 */ "=Tim\0"
-/*    91 */ "none\0"
-/*    96 */ "#  preset/initialization file\n"
+/*    70 */ "=file\0"
+/*    76 */ "=Mbr\0"
+/*    81 */ "=Cplx\0"
+/*    87 */ "[=arg]\0"
+/*    94 */ "--%2$s%1$s\0"
+/*   105 */ "=Tim\0"
+/*   110 */ "none\0"
+/*   115 */ "#  preset/initialization file\n"
             "#  %s#\n\0"
-/*   134 */ " %3s %-14s %s\0"
-/*   148 */ "%s\0"
-/*   151 */ "T/F\0"
-/*   155 */ "\n"
+/*   153 */ " %3s %-14s %s\0"
+/*   167 */ "%s\0"
+/*   170 */ "T/F\0"
+/*   174 */ "\n"
             "%s\n\n"
             "%s\0"
-/*   163 */ "Fil\0"
-/*   167 */ "KWd\0"
-/*   171 */ "Mbr\0"
-/*   175 */ "Cpx\0"
-/*   179 */ "no \0"
-/*   183 */ "Num\0"
-/*   187 */ "opt\0"
-/*   191 */ "YES\0"
-/*   195 */ "Str\0"
-/*   199 */ "Tim\0"
-/*   203 */ "\t\t\t\t- \0"
-/*   210 */ "\t\t\t\t  \0"
-/*   217 */ "\t\t\t\t-- and \0"
-/*   229 */ "\t\t\t\t%s\n\0"
-/*   237 */ "      \0"
-/*   244 */ "     \0"
-/*   250 */ "   \0"
-/*   254 */ "  \0"
-/*   257 */ "all\0"
-/*   261 */ " \t\n"
+/*   182 */ "Fil\0"
+/*   186 */ "KWd\0"
+/*   190 */ "Mbr\0"
+/*   194 */ "Cpx\0"
+/*   198 */ "no \0"
+/*   202 */ "Num\0"
+/*   206 */ "opt\0"
+/*   210 */ "YES\0"
+/*   214 */ "Str\0"
+/*   218 */ "Tim\0"
+/*   222 */ "\t\t\t\t- \0"
+/*   229 */ "\t\t\t\t  \0"
+/*   236 */ "\t\t\t\t-- and \0"
+/*   248 */ "\t\t\t\t%s\n\0"
+/*   256 */ "      \0"
+/*   263 */ "     \0"
+/*   269 */ "   \0"
+/*   273 */ "  \0"
+/*   276 */ "all\0"
+/*   280 */ " \t\n"
             ":=\0"
-/*   267 */ "%s_%s_%d=\0"
-/*   277 */ "''\0"
-/*   280 */ "        ;;\n\n\0"
-/*   293 */ "'\n\n\0"
-/*   297 */ "</%s>\n\0"
-/*   304 */ "  %s\n\0"
-/*   310 */ "%%-%ds\0"
-/*   317 */ "\n"
+/*   286 */ "%s_%s_%d=\0"
+/*   296 */ "''\0"
+/*   299 */ "        ;;\n\n\0"
+/*   312 */ "'\n\n\0"
+/*   316 */ "</%s>\n\0"
+/*   323 */ "  %s\n\0"
+/*   329 */ "%%-%ds\0"
+/*   336 */ "\n"
             "export %s_%s_%d\n\0"
-/*   335 */ "false\0"
-/*   341 */ "    -* )\n\0"
-/*   351 */ "flag\0"
-/*   356 */ "INVALID-%d\0"
-/*   367 */ "*INVALID*\0"
-/*   377 */ "\\n\\\n\0"
-/*   382 */ "    --* )\n\0"
-/*   393 */ "--\0"
-/*   396 */ "LONGUSAGE\0"
-/*   406 */ "            %s\n\0"
-/*   422 */ "\\%03o\0"
-/*   428 */ "more\0"
-/*   433 */ "<%s type=nested>\n\0"
-/*   451 */ "%s\n\0"
-/*   455 */ "%s\n"
+/*   354 */ "false\0"
+/*   360 */ "    -* )\n\0"
+/*   370 */ "flag\0"
+/*   375 */ "INVALID-%d\0"
+/*   386 */ "*INVALID*\0"
+/*   396 */ "\\n\\\n\0"
+/*   401 */ "    --* )\n\0"
+/*   412 */ "--\0"
+/*   415 */ "LONGUSAGE\0"
+/*   425 */ "            %s\n\0"
+/*   441 */ "\\%03o\0"
+/*   447 */ "more\0"
+/*   452 */ "<%s type=nested>\n\0"
+/*   470 */ "%s\n\0"
+/*   474 */ "%s\n"
             "  \0"
-/*   461 */ "OPT_ARG_NEEDED=NO\0"
-/*   479 */ "<%s/>\n\0"
-/*   486 */ "OPT_ARG_NEEDED=OK\0"
-/*   504 */ "\t\0"
-/*   506 */ "<%s>\0"
-/*   511 */ "option\0"
-/*   518 */ "\n"
+/*   480 */ "OPT_ARG_NEEDED=NO\0"
+/*   498 */ "<%s/>\n\0"
+/*   505 */ "OPT_ARG_NEEDED=OK\0"
+/*   523 */ "\t\0"
+/*   525 */ "<%s>\0"
+/*   530 */ "option\0"
+/*   537 */ "\n"
             "export %s_%s\n\0"
-/*   533 */ "%s_%s=\0"
-/*   540 */ " | \0"
-/*   544 */ "PAGER\0"
-/*   550 */ "%1$s %2$s ; rm -f %2$s\0"
-/*   573 */ " + \0"
-/*   577 */ "  puts(_(%s));\n\0"
-/*   593 */ "\\'\0"
-/*   596 */ "'%s'\0"
-/*   601 */ " -- %s\0"
-/*   608 */ "%s_%s_TEXT='\0"
-/*   621 */ "#! %s\n\0"
-/*   628 */ "\n"
+/*   552 */ "%s_%s=\0"
+/*   559 */ " | \0"
+/*   563 */ "PAGER\0"
+/*   569 */ "%1$s %2$s ; rm -f %2$s\0"
+/*   592 */ " + \0"
+/*   596 */ "  puts(_(%s));\n\0"
+/*   612 */ "\\'\0"
+/*   615 */ "'%s'\0"
+/*   620 */ " -- %s\0"
+/*   627 */ "%s_%s_TEXT='\0"
+/*   640 */ "#! %s\n\0"
+/*   647 */ "\n"
             "env | grep '^%s_'\n\0"
-/*   648 */ "=%1$lu # 0x%1$lX\n\0"
-/*   666 */ "stdout\0"
-/*   673 */ "%A %B %e, %Y at %r %Z\0"
-/*   695 */ "TMPDIR\0"
-/*   702 */ "%s/use-%u.XXXXXX\0"
-/*   719 */ "true\0"
-/*   724 */ "<%s type=%s>\0"
-/*   737 */ "VERSION\0"
-/*   745 */ "#x%02X;\0"
-/*   753 */ "OPT_ARG_NEEDED=YES\0"
-/*   772 */ "'\\''\0"
-/*   777 */ " '%s'\0"
-/*   783 */ "libopts misguessed length of string\n\0"
-/*   820 */ "\n"
+/*   667 */ "=%1$lu # 0x%1$lX\n\0"
+/*   685 */ "stdout\0"
+/*   692 */ "%A %B %e, %Y at %r %Z\0"
+/*   714 */ "TMPDIR\0"
+/*   721 */ "%s/use-%u.XXXXXX\0"
+/*   738 */ "true\0"
+/*   743 */ "<%s type=%s>\0"
+/*   756 */ "VERSION\0"
+/*   764 */ "#x%02X;\0"
+/*   772 */ "OPT_ARG_NEEDED=YES\0"
+/*   791 */ "\n"
+            "# %s -- %s\n\0"
+/*   804 */ "# DEFAULT: \0"
+/*   816 */ "'\\''\0"
+/*   821 */ " '%s'\0"
+/*   827 */ "libopts misguessed length of string\n\0"
+/*   864 */ "\n"
             "OPTION_CT=0\n\0"
-/*   834 */ "set --\0"
-/*   841 */ "/tmp\0"
-/*   846 */ "            ;;\n\n\0"
-/*   863 */ "        '%c' )\n\0"
-/*   879 */ "        '%s' )\n\0"
-/*   895 */ "        '%s' | \\\n\0"
-/*   913 */ "<%1$s type=boolean>%2$s</%1$s>\n\0"
-/*   945 */ "#  From the %s option definitions\n"
+/*   878 */ "set --\0"
+/*   885 */ "/tmp\0"
+/*   890 */ "            ;;\n\n\0"
+/*   907 */ "        '%c' )\n\0"
+/*   923 */ "        '%s' )\n\0"
+/*   939 */ "        '%s' | \\\n\0"
+/*   957 */ "<%1$s type=boolean>%2$s</%1$s>\n\0"
+/*   989 */ "#  From the %s option definitions\n"
             "#\n\0"
-/*   982 */ "echo 'Warning:  Cannot load options files' >&2\0"
-/*  1029 */ "echo 'Warning:  Cannot save options files' >&2\0"
-/*  1076 */ "echo 'Warning:  Cannot suppress the loading of options files' >&2\0"
-/*  1142 */ "<%1$s type=integer>0x%2$lX</%1$s>\n\0"
-/*  1177 */ "%1$s_%2$s_TEXT='no %2$s text'\n\0"
-/*  1208 */ "%1$s_%2$s_MODE='%3$s'\n"
+/*  1026 */ "echo 'Warning:  Cannot load options files' >&2\0"
+/*  1073 */ "echo 'Warning:  Cannot save options files' >&2\0"
+/*  1120 */ "echo 'Warning:  Cannot suppress the loading of options files' >&2\0"
+/*  1186 */ "<%1$s type=integer>0x%2$lX</%1$s>\n\0"
+/*  1221 */ "%1$s_%2$s_TEXT='no %2$s text'\n\0"
+/*  1252 */ "%1$s_%2$s_MODE='%3$s'\n"
             "export %1$s_%2$s_MODE\n\0"
-/*  1253 */ "%1$s_%2$s='%3$s'\n"
+/*  1297 */ "%1$s_%2$s='%3$s'\n"
             "export %1$s_%2$s\n\0"
-/*  1288 */ "%1$s_%2$s_CT=%3$d\n"
+/*  1332 */ "%1$s_%2$s_CT=%3$d\n"
             "export %1$s_%2$s_CT\n\0"
-/*  1327 */ "OPTION_CT=%d\n"
+/*  1371 */ "OPTION_CT=%d\n"
             "export OPTION_CT\n\0"
-/*  1358 */ "%1$s_%2$s=%3$s\n"
+/*  1402 */ "%1$s_%2$s=%3$s\n"
             "export %1$s_%2$s\n\0"
-/*  1391 */ "%1$s_%2$s=%3$d # 0x%3$X\n"
+/*  1435 */ "%1$s_%2$s=%3$d # 0x%3$X\n"
             "export %1$s_%2$s\n\0"
-/*  1433 */ "        case \"${OPT_CODE}\" in\n\0"
-/*  1464 */ "            if [ $%1$s_%2$s_CT -gt %3$u ] ; then\n"
+/*  1477 */ "        case \"${OPT_CODE}\" in\n\0"
+/*  1508 */ "            if [ $%1$s_%2$s_CT -gt %3$u ] ; then\n"
             "                echo 'Error:  more than %3$d %2$s options'\n"
             "                echo \"$%1$s_USAGE_TEXT\"\n"
             "                exit 1\n"
             "            fi >&2\n\0"
-/*  1655 */ "test ${%1$s_%2$s_CT-0} -ge %3$u || {\n"
+/*  1699 */ "test ${%1$s_%2$s_CT-0} -ge %3$u || {\n"
             "    echo %1$s_%2$s has not been set\n"
             "    exit 1\n"
             "} 1>&2\n\0"
-/*  1747 */ "test -n \"$%1$s_%2$s\" || {\n"
+/*  1791 */ "test -n \"$%1$s_%2$s\" || {\n"
             "    echo %1$s_%2$s has not been set\n"
             "    exit 1\n"
             "} 1>&2\n\0"
-/*  1828 */ "            echo \"$%s_%s_TEXT\"\n"
+/*  1872 */ "            echo \"$%s_%s_TEXT\"\n"
             "            exit 0\n\0"
-/*  1879 */ "\n"
+/*  1923 */ "\n"
             "# # # # # # # # # #\n"
             "#\n"
             "#  END OF AUTOMATED OPTION PROCESSING\n"
             "#\n"
             "# # # # # # # # # # -- do not modify this marker --\n\0"
-/*  1995 */ "    if [ -n \"${OPT_ARG_VAL}\" ]\n"
+/*  2039 */ "    if [ -n \"${OPT_ARG_VAL}\" ]\n"
             "    then\n"
             "        eval %1$s_${OPT_NAME}${OPT_ELEMENT}=\"'${OPT_ARG_VAL}'\"\n"
             "        export %1$s_${OPT_NAME}${OPT_ELEMENT}\n"
@@ -206,15 +210,15 @@ char const ao_strs_strtable[6670] =
             "unset OPT_NAME    || :\n"
             "unset OPT_CODE    || :\n"
             "unset OPT_ARG_VAL || :\n\0"
-/*  2374 */ "        OPT_CODE=`echo \"X${OPT_ARG}\"|sed 's/^X-*//'`\n"
+/*  2418 */ "        OPT_CODE=`echo \"X${OPT_ARG}\"|sed 's/^X-*//'`\n"
             "        shift\n"
             "        OPT_ARG=$1\n"
             "        case \"${OPT_CODE}\" in *=* )\n"
             "            OPT_ARG_VAL=`echo \"${OPT_CODE}\"|sed 's/^[^=]*=//'`\n"
             "            OPT_CODE=`echo \"${OPT_CODE}\"|sed 's/=.*$//'` ;; esac\n\0"
-/*  2625 */ "        OPT_CODE=`echo \"X${OPT_ARG}\" | sed 's/X-\\(.\\).*/\\1/'`\n"
+/*  2669 */ "        OPT_CODE=`echo \"X${OPT_ARG}\" | sed 's/X-\\(.\\).*/\\1/'`\n"
             "        OPT_ARG=` echo \"X${OPT_ARG}\" | sed 's/X-.//'`\n\0"
-/*  2742 */ "\n"
+/*  2786 */ "\n"
             "ARG_COUNT=$#\n"
             "OPT_PROCESS=true\n"
             "OPT_ARG=$1\n"
@@ -227,7 +231,7 @@ char const ao_strs_strtable[6670] =
             "        OPT_PROCESS=false\n"
             "        shift\n"
             "        ;;\n\0"
-/*  2949 */ "        case \"${OPT_ARG_NEEDED}\" in\n"
+/*  2993 */ "        case \"${OPT_ARG_NEEDED}\" in\n"
             "        NO )\n"
             "            OPT_ARG_VAL=''\n"
             "            ;;\n"
@@ -255,10 +259,10 @@ char const ao_strs_strtable[6670] =
             "            fi\n"
             "            ;;\n"
             "        esac\n\0"
-/*  3728 */ "            %1$s_%2$s_CT=`expr ${%1$s_%2$s_CT} + 1`\n"
+/*  3772 */ "            %1$s_%2$s_CT=`expr ${%1$s_%2$s_CT} + 1`\n"
             "            OPT_ELEMENT=\"_${%1$s_%2$s_CT}\"\n"
             "            OPT_NAME='%2$s'\n\0"
-/*  3852 */ "\n"
+/*  3896 */ "\n"
             "if test -z \"${%1$s_%2$s}\"\n"
             "then\n"
             "  %1$s_%2$s_CT=0\n"
@@ -268,16 +272,16 @@ char const ao_strs_strtable[6670] =
             "  %1$s_%2$s_1=${%1$s_%2$s}\n"
             "  export %1$s_%2$s_CT %1$s_%2$s_1\n"
             "fi\n\0"
-/*  4010 */ "    * )\n"
+/*  4054 */ "    * )\n"
             "         OPT_PROCESS=false\n"
             "         ;;\n"
             "    esac\n\0"
-/*  4067 */ "            %1$s_%2$s_CT=0\n"
+/*  4111 */ "            %1$s_%2$s_CT=0\n"
             "            OPT_ELEMENT=''\n"
             "            %1$s_%2$s='%3$s'\n"
             "            export %1$s_%2$s\n"
             "            OPT_NAME='%2$s'\n\0"
-/*  4208 */ "            if [ -n \"${%1$s_%2$s}\" ] && ${%1$s_%2$s_set} ; then\n"
+/*  4252 */ "            if [ -n \"${%1$s_%2$s}\" ] && ${%1$s_%2$s_set} ; then\n"
             "                echo 'Error:  duplicate %2$s option'\n"
             "                echo \"$%1$s_USAGE_TEXT\"\n"
             "                exit 1\n"
@@ -286,7 +290,7 @@ char const ao_strs_strtable[6670] =
             "            %1$s_%2$s='%3$s'\n"
             "            export %1$s_%2$s\n"
             "            OPT_NAME='%2$s'\n\0"
-/*  4525 */ "\n"
+/*  4569 */ "\n"
             "ARG_COUNT=$#\n"
             "OPT_ARG=$1\n"
             "while [ $# -gt 0 ]\n"
@@ -294,7 +298,7 @@ char const ao_strs_strtable[6670] =
             "    OPT_ELEMENT=''\n"
             "    OPT_ARG_VAL=''\n"
             "    OPT_ARG=${1}\n\0"
-/*  4628 */ "        case \"${OPT_ARG_NEEDED}\" in\n"
+/*  4672 */ "        case \"${OPT_ARG_NEEDED}\" in\n"
             "        NO )\n"
             "            if [ -n \"${OPT_ARG}\" ]\n"
             "            then\n"
@@ -339,33 +343,33 @@ char const ao_strs_strtable[6670] =
             "            fi\n"
             "            ;;\n"
             "        esac\n\0"
-/*  5782 */ "            echo \"$%s_LONGUSAGE_TEXT\" | ${PAGER-more}\n"
+/*  5826 */ "            echo \"$%s_LONGUSAGE_TEXT\" | ${PAGER-more}\n"
             "            exit 0\n\0"
-/*  5856 */ "%s OF %s\n"
+/*  5900 */ "%s OF %s\n"
             "#\n"
             "#  From here to the next `-- do not modify this marker --',\n"
             "#  the text has been generated %s\n\0"
-/*  5962 */ "            eval %1$s_%2$s${OPT_ELEMENT}=true\n"
+/*  6006 */ "            eval %1$s_%2$s${OPT_ELEMENT}=true\n"
             "            export %1$s_%2$s${OPT_ELEMENT}\n\0"
-/*  6052 */ "            if [ -n \"${%1$s_%2$s}\" ] && ${%1$s_%2$s_set} ; then\n"
+/*  6096 */ "            if [ -n \"${%1$s_%2$s}\" ] && ${%1$s_%2$s_set} ; then\n"
             "                echo 'Error:  duplicate %2$s option'\n"
             "                echo \"$%1$s_USAGE_TEXT\"\n"
             "                exit 1\n"
             "            fi >&2\n"
             "            %1$s_%2$s_set=true\n"
             "            OPT_NAME='%2$s'\n\0"
-/*  6311 */ "\n"
+/*  6355 */ "\n"
             "%1$s_%2$s=${%1$s_%2$s-'%3$s'}\n"
             "%1$s_%2$s_set=false\n"
             "export %1$s_%2$s\n\0"
-/*  6380 */ "\n"
+/*  6424 */ "\n"
             "%1$s_%2$s=${%1$s_%2$s}\n"
             "%1$s_%2$s_set=false\n"
             "export %1$s_%2$s\n\0"
-/*  6442 */ "# # # # # # # # # # -- do not modify this marker --\n"
+/*  6486 */ "# # # # # # # # # # -- do not modify this marker --\n"
             "#\n"
             "#  DO NOT EDIT THIS SECTION\n\0"
-/*  6525 */ "        * )\n"
+/*  6569 */ "        * )\n"
             "            echo Unknown %s: \"${OPT_CODE}\" >&2\n"
             "            echo \"$%s_USAGE_TEXT\" >&2\n"
             "            exit 1\n"

+ 151 - 145
libopts/ao-strs.h

@@ -6,7 +6,7 @@
  * From the definitions    ao-strs.def
  * and the template file   strings
  *
- *  Copyright (C) 2011-2015 Bruce Korb, all rights reserved.
+ *  Copyright (C) 2011-2018 Bruce Korb, all rights reserved.
  *  This is free software. It is licensed for use, modification and
  *  redistribution under the terms of the
  *  Modified (3 clause) Berkeley Software Distribution License
@@ -39,294 +39,300 @@
 #ifndef STRINGS_AO_STRS_H_GUARD
 #define STRINGS_AO_STRS_H_GUARD 1
 /*
- * 143 strings in ao_strs_strtable string table
+ * 146 strings in ao_strs_strtable string table
  */
-#define ARG_BREAK_STR         (ao_strs_strtable+261)
+#define ARG_BREAK_STR         (ao_strs_strtable+280)
 #define ARG_BREAK_STR_LEN     5
-#define ARG_BY_NUM_FMT        (ao_strs_strtable+267)
+#define ARG_BY_NUM_FMT        (ao_strs_strtable+286)
 #define ARG_BY_NUM_FMT_LEN    9
-#define BOOL_ATR_FMT          (ao_strs_strtable+913)
+#define BOOL_ATR_FMT          (ao_strs_strtable+957)
 #define BOOL_ATR_FMT_LEN      31
-#define CHK_MAX_COUNT         (ao_strs_strtable+1464)
+#define CHK_MAX_COUNT         (ao_strs_strtable+1508)
 #define CHK_MAX_COUNT_LEN     190
-#define CHK_MIN_COUNT         (ao_strs_strtable+1655)
+#define CHK_MIN_COUNT         (ao_strs_strtable+1699)
 #define CHK_MIN_COUNT_LEN     91
-#define CHK_ONE_REQUIRED      (ao_strs_strtable+1747)
+#define CHK_ONE_REQUIRED      (ao_strs_strtable+1791)
 #define CHK_ONE_REQUIRED_LEN  80
-#define ECHO_N_EXIT           (ao_strs_strtable+1828)
+#define ECHO_N_EXIT           (ao_strs_strtable+1872)
 #define ECHO_N_EXIT_LEN       50
-#define EMPTY_ARG             (ao_strs_strtable+277)
+#define EMPTY_ARG             (ao_strs_strtable+296)
 #define EMPTY_ARG_LEN         2
-#define END_MARK              (ao_strs_strtable+1879)
+#define END_MARK              (ao_strs_strtable+1923)
 #define END_MARK_LEN          115
-#define END_OPT_SEL_STR       (ao_strs_strtable+280)
+#define END_OPT_SEL_STR       (ao_strs_strtable+299)
 #define END_OPT_SEL_STR_LEN   12
-#define END_PRE_FMT           (ao_strs_strtable+945)
+#define END_PRE_FMT           (ao_strs_strtable+989)
 #define END_PRE_FMT_LEN       36
-#define END_SET_TEXT          (ao_strs_strtable+293)
+#define END_SET_TEXT          (ao_strs_strtable+312)
 #define END_SET_TEXT_LEN      3
-#define END_XML_FMT           (ao_strs_strtable+297)
+#define END_XML_FMT           (ao_strs_strtable+316)
 #define END_XML_FMT_LEN       6
-#define ENUM_ERR_LINE         (ao_strs_strtable+304)
+#define ENUM_ERR_LINE         (ao_strs_strtable+323)
 #define ENUM_ERR_LINE_LEN     5
-#define ENUM_ERR_WIDTH        (ao_strs_strtable+310)
+#define ENUM_ERR_WIDTH        (ao_strs_strtable+329)
 #define ENUM_ERR_WIDTH_LEN    6
-#define EXPORT_ARG_FMT        (ao_strs_strtable+317)
+#define EXPORT_ARG_FMT        (ao_strs_strtable+336)
 #define EXPORT_ARG_FMT_LEN    17
-#define FALSE_STR             (ao_strs_strtable+335)
+#define FALSE_STR             (ao_strs_strtable+354)
 #define FALSE_STR_LEN         5
-#define FINISH_LOOP           (ao_strs_strtable+1995)
+#define FINISH_LOOP           (ao_strs_strtable+2039)
 #define FINISH_LOOP_LEN       378
-#define FLAG_OPT_MARK         (ao_strs_strtable+341)
+#define FLAG_OPT_MARK         (ao_strs_strtable+360)
 #define FLAG_OPT_MARK_LEN     9
-#define FLAG_STR              (ao_strs_strtable+351)
+#define FLAG_STR              (ao_strs_strtable+370)
 #define FLAG_STR_LEN          4
-#define INIT_LOPT_STR         (ao_strs_strtable+2374)
+#define INIT_LOPT_STR         (ao_strs_strtable+2418)
 #define INIT_LOPT_STR_LEN     250
-#define INIT_OPT_STR          (ao_strs_strtable+2625)
+#define INIT_OPT_STR          (ao_strs_strtable+2669)
 #define INIT_OPT_STR_LEN      116
-#define INVALID_FMT           (ao_strs_strtable+356)
+#define INVALID_FMT           (ao_strs_strtable+375)
 #define INVALID_FMT_LEN       10
-#define INVALID_STR           (ao_strs_strtable+367)
+#define INVALID_STR           (ao_strs_strtable+386)
 #define INVALID_STR_LEN       9
-#define LINE_SPLICE           (ao_strs_strtable+377)
+#define LINE_SPLICE           (ao_strs_strtable+396)
 #define LINE_SPLICE_LEN       4
-#define LONG_OPT_MARK         (ao_strs_strtable+382)
-#define LONG_OPT_MARKER       (ao_strs_strtable+393)
+#define LONG_OPT_MARK         (ao_strs_strtable+401)
+#define LONG_OPT_MARKER       (ao_strs_strtable+412)
 #define LONG_OPT_MARKER_LEN   2
 #define LONG_OPT_MARK_LEN     10
-#define LONG_USE_STR          (ao_strs_strtable+396)
+#define LONG_USE_STR          (ao_strs_strtable+415)
 #define LONG_USE_STR_LEN      9
-#define LOOP_STR              (ao_strs_strtable+2742)
+#define LOOP_STR              (ao_strs_strtable+2786)
 #define LOOP_STR_LEN          206
-#define LOPT_ARG_FMT          (ao_strs_strtable+2949)
+#define LOPT_ARG_FMT          (ao_strs_strtable+2993)
 #define LOPT_ARG_FMT_LEN      778
-#define LVL3_CMD              (ao_strs_strtable+406)
+#define LVL3_CMD              (ao_strs_strtable+425)
 #define LVL3_CMD_LEN          15
-#define MK_STR_OCT_FMT        (ao_strs_strtable+422)
+#define MK_STR_OCT_FMT        (ao_strs_strtable+441)
 #define MK_STR_OCT_FMT_LEN    5
-#define MORE_STR              (ao_strs_strtable+428)
+#define MORE_STR              (ao_strs_strtable+447)
 #define MORE_STR_LEN          4
-#define MULTI_ARG_FMT         (ao_strs_strtable+3728)
+#define MULTI_ARG_FMT         (ao_strs_strtable+3772)
 #define MULTI_ARG_FMT_LEN     123
-#define MULTI_DEF_FMT         (ao_strs_strtable+3852)
+#define MULTI_DEF_FMT         (ao_strs_strtable+3896)
 #define MULTI_DEF_FMT_LEN     157
-#define NESTED_OPT_FMT        (ao_strs_strtable+433)
+#define NESTED_OPT_FMT        (ao_strs_strtable+452)
 #define NESTED_OPT_FMT_LEN    17
-#define NLSTR_FMT             (ao_strs_strtable+451)
+#define NLSTR_FMT             (ao_strs_strtable+470)
 #define NLSTR_FMT_LEN         3
-#define NLSTR_SPACE_FMT       (ao_strs_strtable+455)
+#define NLSTR_SPACE_FMT       (ao_strs_strtable+474)
 #define NLSTR_SPACE_FMT_LEN   5
-#define NONE_STR              (ao_strs_strtable+91)
+#define NONE_STR              (ao_strs_strtable+110)
 #define NONE_STR_LEN          4
-#define NOT_FOUND_STR         (ao_strs_strtable+4010)
+#define NOT_FOUND_STR         (ao_strs_strtable+4054)
 #define NOT_FOUND_STR_LEN     56
-#define NO_ARG_NEEDED         (ao_strs_strtable+461)
+#define NO_ARG_NEEDED         (ao_strs_strtable+480)
 #define NO_ARG_NEEDED_LEN     17
-#define NO_LOAD_WARN          (ao_strs_strtable+982)
+#define NO_LOAD_WARN          (ao_strs_strtable+1026)
 #define NO_LOAD_WARN_LEN      46
-#define NO_MULTI_ARG_FMT      (ao_strs_strtable+4067)
+#define NO_MULTI_ARG_FMT      (ao_strs_strtable+4111)
 #define NO_MULTI_ARG_FMT_LEN  140
-#define NO_SAVE_OPTS          (ao_strs_strtable+1029)
+#define NO_SAVE_OPTS          (ao_strs_strtable+1073)
 #define NO_SAVE_OPTS_LEN      46
-#define NO_SGL_ARG_FMT        (ao_strs_strtable+4208)
+#define NO_SGL_ARG_FMT        (ao_strs_strtable+4252)
 #define NO_SGL_ARG_FMT_LEN    316
-#define NO_SUPPRESS_LOAD      (ao_strs_strtable+1076)
+#define NO_SUPPRESS_LOAD      (ao_strs_strtable+1120)
 #define NO_SUPPRESS_LOAD_LEN  65
-#define NULL_ATR_FMT          (ao_strs_strtable+479)
+#define NULL_ATR_FMT          (ao_strs_strtable+498)
 #define NULL_ATR_FMT_LEN      6
-#define NUMB_ATR_FMT          (ao_strs_strtable+1142)
+#define NUMB_ATR_FMT          (ao_strs_strtable+1186)
 #define NUMB_ATR_FMT_LEN      34
-#define OK_NEED_OPT_ARG       (ao_strs_strtable+486)
+#define OK_NEED_OPT_ARG       (ao_strs_strtable+505)
 #define OK_NEED_OPT_ARG_LEN   17
-#define ONE_TAB_STR           (ao_strs_strtable+504)
+#define ONE_TAB_STR           (ao_strs_strtable+523)
 #define ONE_TAB_STR_LEN       1
-#define ONLY_OPTS_LOOP        (ao_strs_strtable+4525)
+#define ONLY_OPTS_LOOP        (ao_strs_strtable+4569)
 #define ONLY_OPTS_LOOP_LEN    102
-#define OPEN_CLOSE_FMT        (ao_strs_strtable+479)
+#define OPEN_CLOSE_FMT        (ao_strs_strtable+498)
 #define OPEN_CLOSE_FMT_LEN    6
-#define OPEN_XML_FMT          (ao_strs_strtable+506)
+#define OPEN_XML_FMT          (ao_strs_strtable+525)
 #define OPEN_XML_FMT_LEN      4
-#define OPTION_STR            (ao_strs_strtable+511)
+#define OPTION_STR            (ao_strs_strtable+530)
 #define OPTION_STR_LEN        6
-#define OPT_ARG_FMT           (ao_strs_strtable+4628)
+#define OPT_ARG_FMT           (ao_strs_strtable+4672)
 #define OPT_ARG_FMT_LEN       1153
-#define OPT_END_FMT           (ao_strs_strtable+518)
+#define OPT_END_FMT           (ao_strs_strtable+537)
 #define OPT_END_FMT_LEN       14
-#define OPT_VAL_FMT           (ao_strs_strtable+533)
+#define OPT_VAL_FMT           (ao_strs_strtable+552)
 #define OPT_VAL_FMT_LEN       6
-#define OR_STR                (ao_strs_strtable+540)
+#define OR_STR                (ao_strs_strtable+559)
 #define OR_STR_LEN            3
-#define PAGER_NAME            (ao_strs_strtable+544)
+#define PAGER_NAME            (ao_strs_strtable+563)
 #define PAGER_NAME_LEN        5
-#define PAGE_USAGE_FMT        (ao_strs_strtable+550)
+#define PAGE_USAGE_FMT        (ao_strs_strtable+569)
 #define PAGE_USAGE_FMT_LEN    22
-#define PAGE_USAGE_TEXT       (ao_strs_strtable+5782)
+#define PAGE_USAGE_TEXT       (ao_strs_strtable+5826)
 #define PAGE_USAGE_TEXT_LEN   73
-#define PLUS_STR              (ao_strs_strtable+573)
+#define PLUS_STR              (ao_strs_strtable+592)
 #define PLUS_STR_LEN          3
-#define PREAMBLE_FMT          (ao_strs_strtable+5856)
+#define PREAMBLE_FMT          (ao_strs_strtable+5900)
 #define PREAMBLE_FMT_LEN      105
-#define PUTS_FMT              (ao_strs_strtable+577)
+#define PUTS_FMT              (ao_strs_strtable+596)
 #define PUTS_FMT_LEN          15
-#define QUOT_APOS             (ao_strs_strtable+593)
+#define QUOT_APOS             (ao_strs_strtable+612)
 #define QUOT_APOS_LEN         2
-#define QUOT_ARG_FMT          (ao_strs_strtable+596)
+#define QUOT_ARG_FMT          (ao_strs_strtable+615)
 #define QUOT_ARG_FMT_LEN      4
-#define SET_MULTI_ARG         (ao_strs_strtable+5962)
+#define SET_MULTI_ARG         (ao_strs_strtable+6006)
 #define SET_MULTI_ARG_LEN     89
-#define SET_NO_TEXT_FMT       (ao_strs_strtable+1177)
+#define SET_NO_TEXT_FMT       (ao_strs_strtable+1221)
 #define SET_NO_TEXT_FMT_LEN   30
-#define SET_OFF_FMT           (ao_strs_strtable+601)
+#define SET_OFF_FMT           (ao_strs_strtable+620)
 #define SET_OFF_FMT_LEN       6
-#define SET_TEXT_FMT          (ao_strs_strtable+608)
+#define SET_TEXT_FMT          (ao_strs_strtable+627)
 #define SET_TEXT_FMT_LEN      12
-#define SGL_ARG_FMT           (ao_strs_strtable+6052)
+#define SGL_ARG_FMT           (ao_strs_strtable+6096)
 #define SGL_ARG_FMT_LEN       258
-#define SGL_DEF_FMT           (ao_strs_strtable+6311)
+#define SGL_DEF_FMT           (ao_strs_strtable+6355)
 #define SGL_DEF_FMT_LEN       68
-#define SGL_NO_DEF_FMT        (ao_strs_strtable+6380)
+#define SGL_NO_DEF_FMT        (ao_strs_strtable+6424)
 #define SGL_NO_DEF_FMT_LEN    61
-#define SHELL_MAGIC           (ao_strs_strtable+621)
+#define SHELL_MAGIC           (ao_strs_strtable+640)
 #define SHELL_MAGIC_LEN       6
-#define SHOW_PROG_ENV         (ao_strs_strtable+628)
+#define SHOW_PROG_ENV         (ao_strs_strtable+647)
 #define SHOW_PROG_ENV_LEN     19
-#define SHOW_VAL_FMT          (ao_strs_strtable+648)
+#define SHOW_VAL_FMT          (ao_strs_strtable+667)
 #define SHOW_VAL_FMT_LEN      17
-#define START_MARK            (ao_strs_strtable+6442)
+#define START_MARK            (ao_strs_strtable+6486)
 #define START_MARK_LEN        82
-#define STDOUT                (ao_strs_strtable+666)
+#define STDOUT                (ao_strs_strtable+685)
 #define STDOUT_LEN            6
-#define TIME_FMT              (ao_strs_strtable+673)
+#define TIME_FMT              (ao_strs_strtable+692)
 #define TIME_FMT_LEN          21
-#define TMPDIR                (ao_strs_strtable+695)
+#define TMPDIR                (ao_strs_strtable+714)
 #define TMPDIR_LEN            6
-#define TMP_FILE_FMT          (ao_strs_strtable+702)
+#define TMP_FILE_FMT          (ao_strs_strtable+721)
 #define TMP_FILE_FMT_LEN      16
-#define TMP_USAGE_FMT         (ao_strs_strtable+702)
+#define TMP_USAGE_FMT         (ao_strs_strtable+721)
 #define TMP_USAGE_FMT_LEN     16
-#define TRUE_STR              (ao_strs_strtable+719)
+#define TRUE_STR              (ao_strs_strtable+738)
 #define TRUE_STR_LEN          4
-#define TWO_SPACES_STR        (ao_strs_strtable+254)
+#define TWO_SPACES_STR        (ao_strs_strtable+273)
 #define TWO_SPACES_STR_LEN    2
-#define TYPE_ATR_FMT          (ao_strs_strtable+724)
+#define TYPE_ATR_FMT          (ao_strs_strtable+743)
 #define TYPE_ATR_FMT_LEN      12
-#define UNK_OPT_FMT           (ao_strs_strtable+6525)
+#define UNK_OPT_FMT           (ao_strs_strtable+6569)
 #define UNK_OPT_FMT_LEN       144
-#define VER_STR               (ao_strs_strtable+737)
+#define VER_STR               (ao_strs_strtable+756)
 #define VER_STR_LEN           7
-#define XML_HEX_BYTE_FMT      (ao_strs_strtable+745)
+#define XML_HEX_BYTE_FMT      (ao_strs_strtable+764)
 #define XML_HEX_BYTE_FMT_LEN  7
-#define YES_NEED_OPT_ARG      (ao_strs_strtable+753)
+#define YES_NEED_OPT_ARG      (ao_strs_strtable+772)
 #define YES_NEED_OPT_ARG_LEN  18
-#define apostrophe            (ao_strs_strtable+772)
+#define ao_default_use        (ao_strs_strtable+804)
+#define ao_default_use_LEN    11
+#define ao_name_use_fmt       (ao_strs_strtable+791)
+#define ao_name_use_fmt_LEN   12
+#define apostrophe            (ao_strs_strtable+816)
 #define apostrophe_LEN        4
-#define arg_fmt               (ao_strs_strtable+777)
+#define arg_fmt               (ao_strs_strtable+821)
 #define arg_fmt_LEN           5
-#define init_optct            (ao_strs_strtable+820)
+#define init_optct            (ao_strs_strtable+864)
 #define init_optct_LEN        13
-#define misguess_len          (ao_strs_strtable+783)
+#define misguess_len          (ao_strs_strtable+827)
 #define misguess_len_LEN      36
-#define set_dash              (ao_strs_strtable+834)
+#define set_dash              (ao_strs_strtable+878)
 #define set_dash_LEN          6
-#define tmp_dir               (ao_strs_strtable+841)
+#define tmp_dir               (ao_strs_strtable+885)
 #define tmp_dir_LEN           4
-#define zAll                  (ao_strs_strtable+257)
+#define zAll                  (ao_strs_strtable+276)
 #define zAll_LEN              3
 #define zCfgAO_Flags          (ao_strs_strtable+12)
-#define zCfgAO_Flags_LEN      12
-#define zCfgProg              (ao_strs_strtable+25)
-#define zCfgProg_LEN          7
-#define zEquivMode            (ao_strs_strtable+1208)
+#define zCfgAO_Flags_LEN      14
+#define zCfgProg              (ao_strs_strtable+27)
+#define zCfgProg_LEN          9
+#define zEquivMode            (ao_strs_strtable+1252)
 #define zEquivMode_LEN        44
-#define zFiveSpaces           (ao_strs_strtable+244)
+#define zFiveSpaces           (ao_strs_strtable+263)
 #define zFiveSpaces_LEN       5
-#define zFmtFmt               (ao_strs_strtable+33)
+#define zFmtFmt               (ao_strs_strtable+37)
 #define zFmtFmt_LEN           11
-#define zFullOptFmt           (ao_strs_strtable+1253)
+#define zFmtProg              (ao_strs_strtable+49)
+#define zFmtProg_LEN          14
+#define zFullOptFmt           (ao_strs_strtable+1297)
 #define zFullOptFmt_LEN       34
-#define zGnuBreak             (ao_strs_strtable+45)
+#define zGnuBreak             (ao_strs_strtable+64)
 #define zGnuBreak_LEN         5
-#define zGnuFileArg           (ao_strs_strtable+51)
+#define zGnuFileArg           (ao_strs_strtable+70)
 #define zGnuFileArg_LEN       5
-#define zGnuKeyLArg           (ao_strs_strtable+57)
+#define zGnuKeyLArg           (ao_strs_strtable+76)
 #define zGnuKeyLArg_LEN       4
-#define zGnuNestArg           (ao_strs_strtable+62)
+#define zGnuNestArg           (ao_strs_strtable+81)
 #define zGnuNestArg_LEN       5
-#define zGnuOptArg            (ao_strs_strtable+68)
+#define zGnuOptArg            (ao_strs_strtable+87)
 #define zGnuOptArg_LEN        6
-#define zGnuOptFmt            (ao_strs_strtable+75)
+#define zGnuOptFmt            (ao_strs_strtable+94)
 #define zGnuOptFmt_LEN        10
-#define zGnuTimeArg           (ao_strs_strtable+86)
+#define zGnuTimeArg           (ao_strs_strtable+105)
 #define zGnuTimeArg_LEN       4
-#define zNone                 (ao_strs_strtable+91)
+#define zNone                 (ao_strs_strtable+110)
 #define zNone_LEN             4
-#define zOptCookieCt          (ao_strs_strtable+1288)
+#define zOptCookieCt          (ao_strs_strtable+1332)
 #define zOptCookieCt_LEN      38
-#define zOptCtFmt             (ao_strs_strtable+1327)
+#define zOptCtFmt             (ao_strs_strtable+1371)
 #define zOptCtFmt_LEN         30
-#define zOptDisabl            (ao_strs_strtable+1358)
+#define zOptDisabl            (ao_strs_strtable+1402)
 #define zOptDisabl_LEN        32
-#define zOptNumFmt            (ao_strs_strtable+1391)
+#define zOptNumFmt            (ao_strs_strtable+1435)
 #define zOptNumFmt_LEN        41
-#define zOptionCase           (ao_strs_strtable+1433)
+#define zOptionCase           (ao_strs_strtable+1477)
 #define zOptionCase_LEN       30
-#define zOptionEndSelect      (ao_strs_strtable+846)
+#define zOptionEndSelect      (ao_strs_strtable+890)
 #define zOptionEndSelect_LEN  16
-#define zOptionFlag           (ao_strs_strtable+863)
+#define zOptionFlag           (ao_strs_strtable+907)
 #define zOptionFlag_LEN       15
-#define zOptionFullName       (ao_strs_strtable+879)
+#define zOptionFullName       (ao_strs_strtable+923)
 #define zOptionFullName_LEN   15
-#define zOptionPartName       (ao_strs_strtable+895)
+#define zOptionPartName       (ao_strs_strtable+939)
 #define zOptionPartName_LEN   17
-#define zPresetFile           (ao_strs_strtable+96)
+#define zPresetFile           (ao_strs_strtable+115)
 #define zPresetFile_LEN       37
-#define zReqOptFmt            (ao_strs_strtable+134)
+#define zReqOptFmt            (ao_strs_strtable+153)
 #define zReqOptFmt_LEN        13
 #define zSepChars             (ao_strs_strtable+0)
 #define zSepChars_LEN         3
-#define zShrtGnuOptFmt        (ao_strs_strtable+148)
+#define zShrtGnuOptFmt        (ao_strs_strtable+167)
 #define zShrtGnuOptFmt_LEN    2
-#define zSixSpaces            (ao_strs_strtable+237)
+#define zSixSpaces            (ao_strs_strtable+256)
 #define zSixSpaces_LEN        6
-#define zStdBoolArg           (ao_strs_strtable+151)
+#define zStdBoolArg           (ao_strs_strtable+170)
 #define zStdBoolArg_LEN       3
-#define zStdBreak             (ao_strs_strtable+155)
+#define zStdBreak             (ao_strs_strtable+174)
 #define zStdBreak_LEN         7
-#define zStdFileArg           (ao_strs_strtable+163)
+#define zStdFileArg           (ao_strs_strtable+182)
 #define zStdFileArg_LEN       3
-#define zStdKeyArg            (ao_strs_strtable+167)
+#define zStdKeyArg            (ao_strs_strtable+186)
 #define zStdKeyArg_LEN        3
-#define zStdKeyLArg           (ao_strs_strtable+171)
+#define zStdKeyLArg           (ao_strs_strtable+190)
 #define zStdKeyLArg_LEN       3
-#define zStdNestArg           (ao_strs_strtable+175)
+#define zStdNestArg           (ao_strs_strtable+194)
 #define zStdNestArg_LEN       3
-#define zStdNoArg             (ao_strs_strtable+179)
+#define zStdNoArg             (ao_strs_strtable+198)
 #define zStdNoArg_LEN         3
-#define zStdNumArg            (ao_strs_strtable+183)
+#define zStdNumArg            (ao_strs_strtable+202)
 #define zStdNumArg_LEN        3
-#define zStdOptArg            (ao_strs_strtable+187)
+#define zStdOptArg            (ao_strs_strtable+206)
 #define zStdOptArg_LEN        3
-#define zStdReqArg            (ao_strs_strtable+191)
+#define zStdReqArg            (ao_strs_strtable+210)
 #define zStdReqArg_LEN        3
-#define zStdStrArg            (ao_strs_strtable+195)
+#define zStdStrArg            (ao_strs_strtable+214)
 #define zStdStrArg_LEN        3
-#define zStdTimeArg           (ao_strs_strtable+199)
+#define zStdTimeArg           (ao_strs_strtable+218)
 #define zStdTimeArg_LEN       3
-#define zTabHyp               (ao_strs_strtable+203)
-#define zTabHypAnd            (ao_strs_strtable+217)
+#define zTabHyp               (ao_strs_strtable+222)
+#define zTabHypAnd            (ao_strs_strtable+236)
 #define zTabHypAnd_LEN        11
 #define zTabHyp_LEN           6
-#define zTabSpace             (ao_strs_strtable+210)
+#define zTabSpace             (ao_strs_strtable+229)
 #define zTabSpace_LEN         6
-#define zTabout               (ao_strs_strtable+229)
+#define zTabout               (ao_strs_strtable+248)
 #define zTabout_LEN           7
-#define zThreeSpaces          (ao_strs_strtable+250)
+#define zThreeSpaces          (ao_strs_strtable+269)
 #define zThreeSpaces_LEN      3
-#define zTwoSpaces            (ao_strs_strtable+254)
+#define zTwoSpaces            (ao_strs_strtable+273)
 #define zTwoSpaces_LEN        2
 #define zambig_file           (ao_strs_strtable+4)
 #define zambig_file_LEN       7
-extern char const ao_strs_strtable[6670];
+extern char const ao_strs_strtable[6714];
 
 #endif /* STRINGS_AO_STRS_H_GUARD */

+ 8 - 14
libopts/autoopts.c

@@ -13,7 +13,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -35,7 +35,7 @@
 /**
  * The number of tab characters to skip when printing continuation lines.
  */
-static unsigned int tab_skip_ct          = 0;
+  static unsigned int tab_skip_ct          = 0;
 
 #ifndef HAVE_PATHFIND
 #  define  pathfind(_p, _n, _m) option_pathfind(_p, _n, _m)
@@ -59,7 +59,7 @@ static unsigned int tab_skip_ct          = 0;
 #  include "compat/strchr.c"
 #endif
 
-LOCAL void *
+static void *
 ao_malloc(size_t sz)
 {
     void * res = malloc(sz);
@@ -69,10 +69,8 @@ ao_malloc(size_t sz)
     }
     return res;
 }
-#undef  malloc
-#define malloc(_s)        ao_malloc(_s)
 
-LOCAL void *
+static void *
 ao_realloc(void *p, size_t sz)
 {
     void * res = (p == NULL) ? malloc(sz) : realloc(p, sz);
@@ -82,10 +80,8 @@ ao_realloc(void *p, size_t sz)
     }
     return res;
 }
-#undef  realloc
-#define realloc(_p,_s)    ao_realloc(_p,_s)
 
-LOCAL char *
+static char *
 ao_strdup(char const *str)
 {
     char * res = strdup(str);
@@ -95,8 +91,6 @@ ao_strdup(char const *str)
     }
     return res;
 }
-#undef  strdup
-#define strdup(_p)        ao_strdup(_p)
 
 /**
  *  handle an option.
@@ -104,7 +98,7 @@ ao_strdup(char const *str)
  *  This routine handles equivalencing, sets the option state flags and
  *  invokes the handler procedure, if any.
  */
-LOCAL tSuccess
+static tSuccess
 handle_opt(tOptions * opts, tOptState * o_st)
 {
     /*
@@ -217,7 +211,7 @@ handle_opt(tOptions * opts, tOptState * o_st)
  * @param opts the program option descriptor
  * @param o_st  the state of the next found option
  */
-LOCAL tSuccess
+static tSuccess
 next_opt(tOptions * opts, tOptState * o_st)
 {
     {
@@ -244,7 +238,7 @@ next_opt(tOptions * opts, tOptState * o_st)
  *  @param[in,out] opts   program options descriptor
  *  @returns SUCCESS or FAILURE
  */
-LOCAL tSuccess
+static tSuccess
 regular_opts(tOptions * opts)
 {
     /* assert:  opts->fOptSet & OPTPROC_IMMEDIATE == 0 */

+ 8 - 1
libopts/autoopts.h

@@ -11,7 +11,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -463,6 +463,13 @@ static char const * program_pkgdatadir   = pkgdatadir_default;
 static tOptionLoadMode option_load_mode  = OPTION_LOAD_UNCOOKED;
 static tePagerState pagerState           = PAGER_STATE_INITIAL;
 
+static noreturn void option_exits(int exit_code);
+static noreturn void fserr_exit(char const * prog, char const * op,
+                                char const * fname);
+static          void fserr_warn(char const * prog, char const * op,
+                                char const * fname);
+static noreturn void ao_bug(char const * msg);
+
        FILE *       option_usage_fp      = NULL;
 
 static char const * pz_enum_err_fmt;

+ 44 - 11
libopts/autoopts/options.h

@@ -9,11 +9,11 @@
  *  This file defines all the global structures and special values
  *  used in the automated option processing library.
  *
- *  Automated Options Copyright (C) 1992-2016 by Bruce Korb
+ *  Automated Options Copyright (C) 1992-2018 by Bruce Korb
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -40,9 +40,40 @@
  */
 #include <sys/types.h>
 #include <stdio.h>
-#include <stdint.h>
-#include <limits.h>
-#include <stdbool.h>
+
+#ifndef COMPAT_H_GUARD
+/*
+ * This is needed for test compilations where the "compat.h"
+ * header is not usually available.
+ */
+#  if defined(HAVE_STDINT_H)
+#    include <stdint.h>
+#  elif defined(HAVE_INTTYPES_H)
+#    include <inttypes.h>
+#  endif /* HAVE_STDINT/INTTYPES_H */
+
+#  if defined(HAVE_LIMITS_H)
+#    include <limits.h>
+#  elif defined(HAVE_SYS_LIMITS_H)
+#    include <sys/limits.h>
+#  endif /* HAVE_LIMITS/SYS_LIMITS_H */
+
+#  if defined(HAVE_SYSEXITS_H)
+#    include <sysexits.h>
+#  endif /* HAVE_SYSEXITS_H */
+
+#  if defined(HAVE_STDBOOL_H)
+#    include <stdbool.h>
+#  elif ! defined(bool)
+     typedef enum { false = 0, true = 1 } _Bool;
+#    define bool _Bool
+
+     /* The other macros must be usable in preprocessor directives.  */
+#    define false 0
+#    define true 1
+#  endif /* HAVE_SYSEXITS_H */
+#endif /* COMPAT_H_GUARD */
+// END-CONFIGURED-HEADERS
 
 /**
  * Defined to abnormal value of EX_USAGE.  Used to indicate that paged usage
@@ -78,15 +109,15 @@
  * @{
  */
 /// autoopts structure version
-#define OPTIONS_STRUCT_VERSION      167937
+#define OPTIONS_STRUCT_VERSION      172033
 /// autoopts structure version string
-#define OPTIONS_VERSION_STRING      "41:1:16"
+#define OPTIONS_VERSION_STRING      "42:1:17"
 /// minimum version the autoopts library supports
 #define OPTIONS_MINIMUM_VERSION     102400
 /// minimum version the autoopts library supports as a string
 #define OPTIONS_MIN_VER_STRING      "25:0:0"
 /// the display version of the autoopts library, as a string
-#define OPTIONS_DOTTED_VERSION      "41.1"
+#define OPTIONS_DOTTED_VERSION      "42.1"
 /// convert a version/release number pair to an integer value
 #define OPTIONS_VER_TO_NUM(_v, _r)  (((_v) * 4096) + (_r))
 /// @}
@@ -109,7 +140,8 @@ typedef enum {
     OPARG_TYPE_FLOAT        =  9, ///< opt arg is a floating point num
     OPARG_TYPE_DOUBLE       = 10, ///< opt arg is a double prec. float
     OPARG_TYPE_LONG_DOUBLE  = 11, ///< opt arg is a long double prec.
-    OPARG_TYPE_LONG_LONG    = 12  ///< opt arg is a long long int
+    OPARG_TYPE_LONG_LONG    = 12, ///< opt arg is a long long int
+    OPARG_TYPE_STATIC       = 13  ///< 
 } teOptArgType;
 
 /**
@@ -610,6 +642,7 @@ struct options {
     void *                      pSavedState;
 
     /// The procedure to call to print usage text
+    /* __attribute__((__noreturn__)) */
     // coverity[+kill]
     tpUsageProc                 pUsageProc;
     /// The procedure to call to translate translatable option messages
@@ -808,7 +841,7 @@ extern int optionFileLoad(tOptions *, char const *);
 
 
 /**
- * optionFindNextValue - find a hierarchically valued option instance
+ * optionFindNextValue - find a hierarcicaly valued option instance
  *
  *  This routine will find the next entry in a nested value option or
  *  configurable.  It will search through the list and return the next entry
@@ -825,7 +858,7 @@ extern const tOptionValue * optionFindNextValue(const tOptDesc *, const tOptionV
 
 
 /**
- * optionFindValue - find a hierarchically valued option instance
+ * optionFindValue - find a hierarcicaly valued option instance
  *
  *  This routine will find an entry in a nested value option or configurable.
  *  It will search through the list and return a matching entry.

+ 5 - 1
libopts/autoopts/project.h

@@ -4,7 +4,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -71,6 +71,10 @@ typedef int tSuccess;
 #  define MODE extern
 #endif
 
+#undef NUL
+#define NUL '\0'
+
+#define MOD_LOCAL static
 #define parse_duration option_parse_duration
 
 #endif /* AUTOGEN_PROJECT_H */

+ 247 - 253
libopts/autoopts/usage-txt.h

@@ -8,7 +8,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2017 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -29,7 +29,7 @@
 /** @file usage-txt.h
  *
  *  This file handles all the bookkeeping required for tracking all the little
- *  tiny strings used by the AutoOpts library.  There are 108
+ *  tiny strings used by the AutoOpts library.  There are 107
  *  of them.  This is not versioned because it is entirely internal to the
  *  library and accessed by client code only in a very well-controlled way:
  *  they may substitute translated strings using a procedure that steps through
@@ -47,7 +47,7 @@ typedef struct {
   char *        utpz_GnuKeyArg;
   char *        utpz_GnuNumArg;
   char *        utpz_GnuStrArg;
-  char const *  apz_str[104];
+  char const *  apz_str[103];
 } usage_text_t;
 
 /*
@@ -55,7 +55,7 @@ typedef struct {
  *  strings and the text array containing untranslatable strings.
  */
 extern usage_text_t option_xlateable_txt;
-extern char const option_lib_text[4285];
+extern char const option_lib_text[4267];
 
 #if defined(AUTOOPTS_INTERNAL)
 /*
@@ -110,67 +110,66 @@ extern char const option_lib_text[4285];
 #define zNoState              (option_xlateable_txt.apz_str[ 40])
 #define zNotCmdOpt            (option_xlateable_txt.apz_str[ 41])
 #define zNotDate              (option_xlateable_txt.apz_str[ 42])
-#define zNotDef               (option_xlateable_txt.apz_str[ 43])
-#define zNotDuration          (option_xlateable_txt.apz_str[ 44])
-#define zneed_more            (option_xlateable_txt.apz_str[ 45])
-#define zNotNumber            (option_xlateable_txt.apz_str[ 46])
-#define znum_too_large        (option_xlateable_txt.apz_str[ 47])
-#define zoffer_usage_fmt      (option_xlateable_txt.apz_str[ 48])
-#define zonly_one             (option_xlateable_txt.apz_str[ 49])
-#define zstdout_name          (option_xlateable_txt.apz_str[ 50])
-#define zstderr_name          (option_xlateable_txt.apz_str[ 51])
-#define zwriting              (option_xlateable_txt.apz_str[ 52])
-#define zRangeErr             (option_xlateable_txt.apz_str[ 53])
-#define zneed_fmt             (option_xlateable_txt.apz_str[ 54])
-#define zsave_warn            (option_xlateable_txt.apz_str[ 55])
-#define zalt_opt              (option_xlateable_txt.apz_str[ 56])
-#define zAuto                 (option_xlateable_txt.apz_str[ 57])
-#define zDefaultOpt           (option_xlateable_txt.apz_str[ 58])
-#define zDis                  (option_xlateable_txt.apz_str[ 59])
-#define zDisabledOpt          (option_xlateable_txt.apz_str[ 60])
-#define zDisabledWhy          (option_xlateable_txt.apz_str[ 61])
-#define zEnab                 (option_xlateable_txt.apz_str[ 62])
-#define ztoo_often_fmt        (option_xlateable_txt.apz_str[ 63])
-#define zExamineFmt           (option_xlateable_txt.apz_str[ 64])
-#define zFileCannotExist      (option_xlateable_txt.apz_str[ 65])
-#define zFileMustExist        (option_xlateable_txt.apz_str[ 66])
-#define zFlagOkay             (option_xlateable_txt.apz_str[ 67])
-#define zGenshell             (option_xlateable_txt.apz_str[ 68])
-#define zLowerBits            (option_xlateable_txt.apz_str[ 69])
-#define zMembers              (option_xlateable_txt.apz_str[ 70])
-#define zMust                 (option_xlateable_txt.apz_str[ 71])
-#define zNoFlags              (option_xlateable_txt.apz_str[ 72])
-#define zNoLim                (option_xlateable_txt.apz_str[ 73])
-#define zNoPreset             (option_xlateable_txt.apz_str[ 74])
-#define zNoRq_NoShrtTtl       (option_xlateable_txt.apz_str[ 75])
-#define zNoRq_ShrtTtl         (option_xlateable_txt.apz_str[ 76])
-#define zNrmOptFmt            (option_xlateable_txt.apz_str[ 77])
-#define zNumberOpt            (option_xlateable_txt.apz_str[ 78])
-#define zOptsOnly             (option_xlateable_txt.apz_str[ 79])
-#define zPathFmt              (option_xlateable_txt.apz_str[ 80])
-#define zPlsSendBugs          (option_xlateable_txt.apz_str[ 81])
-#define zPreset               (option_xlateable_txt.apz_str[ 82])
-#define zPresetIntro          (option_xlateable_txt.apz_str[ 83])
-#define zProhib               (option_xlateable_txt.apz_str[ 84])
-#define zProhibOne            (option_xlateable_txt.apz_str[ 85])
-#define zRange                (option_xlateable_txt.apz_str[ 86])
-#define zRangeAbove           (option_xlateable_txt.apz_str[ 87])
-#define zRangeExact           (option_xlateable_txt.apz_str[ 88])
-#define zRangeLie             (option_xlateable_txt.apz_str[ 89])
-#define zRangeOnly            (option_xlateable_txt.apz_str[ 90])
-#define zRangeOr              (option_xlateable_txt.apz_str[ 91])
-#define zRangeScaled          (option_xlateable_txt.apz_str[ 92])
-#define zRangeUpto            (option_xlateable_txt.apz_str[ 93])
-#define zReorder              (option_xlateable_txt.apz_str[ 94])
-#define zReqOne               (option_xlateable_txt.apz_str[ 95])
-#define zReqThese             (option_xlateable_txt.apz_str[ 96])
-#define zReq_NoShrtTtl        (option_xlateable_txt.apz_str[ 97])
-#define zReq_ShrtTtl          (option_xlateable_txt.apz_str[ 98])
-#define zSetMemberSettings    (option_xlateable_txt.apz_str[ 99])
-#define zUpTo                 (option_xlateable_txt.apz_str[100])
-#define zValidKeys            (option_xlateable_txt.apz_str[101])
-#define zVendIntro            (option_xlateable_txt.apz_str[102])
-#define zVendOptsAre          (option_xlateable_txt.apz_str[103])
+#define zNotDuration          (option_xlateable_txt.apz_str[ 43])
+#define zneed_more            (option_xlateable_txt.apz_str[ 44])
+#define zNotNumber            (option_xlateable_txt.apz_str[ 45])
+#define znum_too_large        (option_xlateable_txt.apz_str[ 46])
+#define zoffer_usage_fmt      (option_xlateable_txt.apz_str[ 47])
+#define zonly_one             (option_xlateable_txt.apz_str[ 48])
+#define zstdout_name          (option_xlateable_txt.apz_str[ 49])
+#define zstderr_name          (option_xlateable_txt.apz_str[ 50])
+#define zwriting              (option_xlateable_txt.apz_str[ 51])
+#define zRangeErr             (option_xlateable_txt.apz_str[ 52])
+#define zneed_fmt             (option_xlateable_txt.apz_str[ 53])
+#define zsave_warn            (option_xlateable_txt.apz_str[ 54])
+#define zalt_opt              (option_xlateable_txt.apz_str[ 55])
+#define zAuto                 (option_xlateable_txt.apz_str[ 56])
+#define zDefaultOpt           (option_xlateable_txt.apz_str[ 57])
+#define zDis                  (option_xlateable_txt.apz_str[ 58])
+#define zDisabledOpt          (option_xlateable_txt.apz_str[ 59])
+#define zDisabledWhy          (option_xlateable_txt.apz_str[ 60])
+#define zEnab                 (option_xlateable_txt.apz_str[ 61])
+#define ztoo_often_fmt        (option_xlateable_txt.apz_str[ 62])
+#define zExamineFmt           (option_xlateable_txt.apz_str[ 63])
+#define zFileCannotExist      (option_xlateable_txt.apz_str[ 64])
+#define zFileMustExist        (option_xlateable_txt.apz_str[ 65])
+#define zFlagOkay             (option_xlateable_txt.apz_str[ 66])
+#define zGenshell             (option_xlateable_txt.apz_str[ 67])
+#define zLowerBits            (option_xlateable_txt.apz_str[ 68])
+#define zMembers              (option_xlateable_txt.apz_str[ 69])
+#define zMust                 (option_xlateable_txt.apz_str[ 70])
+#define zNoFlags              (option_xlateable_txt.apz_str[ 71])
+#define zNoLim                (option_xlateable_txt.apz_str[ 72])
+#define zNoPreset             (option_xlateable_txt.apz_str[ 73])
+#define zNoRq_NoShrtTtl       (option_xlateable_txt.apz_str[ 74])
+#define zNoRq_ShrtTtl         (option_xlateable_txt.apz_str[ 75])
+#define zNrmOptFmt            (option_xlateable_txt.apz_str[ 76])
+#define zNumberOpt            (option_xlateable_txt.apz_str[ 77])
+#define zOptsOnly             (option_xlateable_txt.apz_str[ 78])
+#define zPathFmt              (option_xlateable_txt.apz_str[ 79])
+#define zPlsSendBugs          (option_xlateable_txt.apz_str[ 80])
+#define zPreset               (option_xlateable_txt.apz_str[ 81])
+#define zPresetIntro          (option_xlateable_txt.apz_str[ 82])
+#define zProhib               (option_xlateable_txt.apz_str[ 83])
+#define zProhibOne            (option_xlateable_txt.apz_str[ 84])
+#define zRange                (option_xlateable_txt.apz_str[ 85])
+#define zRangeAbove           (option_xlateable_txt.apz_str[ 86])
+#define zRangeExact           (option_xlateable_txt.apz_str[ 87])
+#define zRangeLie             (option_xlateable_txt.apz_str[ 88])
+#define zRangeOnly            (option_xlateable_txt.apz_str[ 89])
+#define zRangeOr              (option_xlateable_txt.apz_str[ 90])
+#define zRangeScaled          (option_xlateable_txt.apz_str[ 91])
+#define zRangeUpto            (option_xlateable_txt.apz_str[ 92])
+#define zReorder              (option_xlateable_txt.apz_str[ 93])
+#define zReqOne               (option_xlateable_txt.apz_str[ 94])
+#define zReqThese             (option_xlateable_txt.apz_str[ 95])
+#define zReq_NoShrtTtl        (option_xlateable_txt.apz_str[ 96])
+#define zReq_ShrtTtl          (option_xlateable_txt.apz_str[ 97])
+#define zSetMemberSettings    (option_xlateable_txt.apz_str[ 98])
+#define zUpTo                 (option_xlateable_txt.apz_str[ 99])
+#define zValidKeys            (option_xlateable_txt.apz_str[100])
+#define zVendIntro            (option_xlateable_txt.apz_str[101])
+#define zVendOptsAre          (option_xlateable_txt.apz_str[102])
 
   /*
    *  First, set up the strings.  Some of these are writable.  These are all in
@@ -181,7 +180,7 @@ static char eng_zGnuBoolArg[]  = "=T/F";
 static char eng_zGnuKeyArg[]   = "=KWd";
 static char eng_zGnuNumArg[]   = "=num";
 static char eng_zGnuStrArg[]   = "=str";
-char const option_lib_text[4285] =
+char const option_lib_text[4267] =
 /*     0 */ "allocation of %d bytes failed\n\0"
 /*    31 */ "AutoOpts function called without option descriptor\n\0"
 /*    83 */ "\tThis exceeds the compiled library version:  \0"
@@ -190,7 +189,7 @@ char const option_lib_text[4285] =
 /*   228 */ "realloc of %d bytes at 0x%p failed\n\0"
 /*   264 */ "\tThis is less than the minimum library version:  \0"
 /*   314 */ "Automated Options version %s\n"
-            "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n\0"
+            "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n\0"
 /*   405 */ "(AutoOpts bug):  %s.\n\0"
 /*   427 */ "optionResetOpt() called, but reset-option not configured\0"
 /*   484 */ "could not locate the 'help' option\0"
@@ -231,76 +230,75 @@ char const option_lib_text[4285] =
 /*  1771 */ "%s error: no saved option state\n\0"
 /*  1804 */ "'%s' is not a command line option.\n\0"
 /*  1840 */ "%s error:  '%s' is not a recognizable date/time.\n\0"
-/*  1890 */ "'%s' not defined\n\0"
-/*  1908 */ "%s error:  '%s' is not a recognizable time duration.\n\0"
-/*  1962 */ "%s error:  The %s option must appear %d times.\n\0"
-/*  2010 */ "%s error:  '%s' is not a recognizable number.\n\0"
-/*  2057 */ "%s error:  %s exceeds %s keyword count\n\0"
-/*  2097 */ "Try '%s %s' for more information.\n\0"
-/*  2132 */ "one %s%s option allowed\n\0"
-/*  2157 */ "standard output\0"
-/*  2173 */ "standard error\0"
-/*  2188 */ "write\0"
-/*  2194 */ "%s error:  %s option value %ld is out of range.\n\0"
-/*  2243 */ "%s error:  %s option requires the %s option\n\0"
-/*  2288 */ "%s warning:  cannot save options - %s not regular file\n\0"
-/*  2344 */ "\t\t\t\t- an alternate for '%s'\n\0"
-/*  2373 */ "Version, usage and configuration options:\0"
-/*  2415 */ "\t\t\t\t- default option for unnamed options\n\0"
-/*  2457 */ "\t\t\t\t- disabled as '--%s'\n\0"
-/*  2483 */ " --- %-14s %s\n\0"
-/*  2498 */ "This option has been disabled\0"
-/*  2528 */ "\t\t\t\t- enabled by default\n\0"
-/*  2554 */ "%s error:  only \0"
-/*  2571 */ " - examining environment variables named %s_*\n\0"
-/*  2618 */ "\t\t\t\t- file must not pre-exist\n\0"
-/*  2649 */ "\t\t\t\t- file must pre-exist\n\0"
-/*  2676 */ "Options are specified by doubled hyphens and their name or by a single\n"
+/*  1890 */ "%s error:  '%s' is not a recognizable time duration.\n\0"
+/*  1944 */ "%s error:  The %s option must appear %d times.\n\0"
+/*  1992 */ "%s error:  '%s' is not a recognizable number.\n\0"
+/*  2039 */ "%s error:  %s exceeds %s keyword count\n\0"
+/*  2079 */ "Try '%s %s' for more information.\n\0"
+/*  2114 */ "one %s%s option allowed\n\0"
+/*  2139 */ "standard output\0"
+/*  2155 */ "standard error\0"
+/*  2170 */ "write\0"
+/*  2176 */ "%s error:  %s option value %ld is out of range.\n\0"
+/*  2225 */ "%s error:  %s option requires the %s option\n\0"
+/*  2270 */ "%s warning:  cannot save options - %s not regular file\n\0"
+/*  2326 */ "\t\t\t\t- an alternate for '%s'\n\0"
+/*  2355 */ "Version, usage and configuration options:\0"
+/*  2397 */ "\t\t\t\t- default option for unnamed options\n\0"
+/*  2439 */ "\t\t\t\t- disabled as '--%s'\n\0"
+/*  2465 */ " --- %-14s %s\n\0"
+/*  2480 */ "This option has been disabled\0"
+/*  2510 */ "\t\t\t\t- enabled by default\n\0"
+/*  2536 */ "%s error:  only \0"
+/*  2553 */ " - examining environment variables named %s_*\n\0"
+/*  2600 */ "\t\t\t\t- file must not pre-exist\n\0"
+/*  2631 */ "\t\t\t\t- file must pre-exist\n\0"
+/*  2658 */ "Options are specified by doubled hyphens and their name or by a single\n"
             "hyphen and the flag character.\n\0"
-/*  2779 */ "\n"
+/*  2761 */ "\n"
             "= = = = = = = =\n\n"
             "This incarnation of genshell will produce\n"
             "a shell script to parse the options for %s:\n\n\0"
-/*  2885 */ "  or an integer mask with any of the lower %d bits set\n\0"
-/*  2941 */ "\t\t\t\t- is a set membership option\n\0"
-/*  2975 */ "\t\t\t\t- must appear between %d and %d times\n\0"
-/*  3018 */ "Options are specified by single or double hyphens and their name.\n\0"
-/*  3085 */ "\t\t\t\t- may appear multiple times\n\0"
-/*  3118 */ "\t\t\t\t- may not be preset\n\0"
-/*  3143 */ "   Arg Option-Name    Description\n\0"
-/*  3178 */ "  Flg Arg Option-Name    Description\n\0"
-/*  3216 */ " %3s %s\0"
-/*  3224 */ "The '-#<number>' option may omit the hash char\n\0"
-/*  3272 */ "All arguments are named options.\n\0"
-/*  3306 */ " - reading file %s\0"
-/*  3325 */ "\n"
+/*  2867 */ "  or an integer mask with any of the lower %d bits set\n\0"
+/*  2923 */ "\t\t\t\t- is a set membership option\n\0"
+/*  2957 */ "\t\t\t\t- must appear between %d and %d times\n\0"
+/*  3000 */ "Options are specified by single or double hyphens and their name.\n\0"
+/*  3067 */ "\t\t\t\t- may appear multiple times\n\0"
+/*  3100 */ "\t\t\t\t- may not be preset\n\0"
+/*  3125 */ "   Arg Option-Name    Description\n\0"
+/*  3160 */ "  Flg Arg Option-Name    Description\n\0"
+/*  3198 */ " %3s %s\0"
+/*  3206 */ "The '-#<number>' option may omit the hash char\n\0"
+/*  3254 */ "All arguments are named options.\n\0"
+/*  3288 */ " - reading file %s\0"
+/*  3307 */ "\n"
             "Please send bug reports to:  <%s>\n\0"
-/*  3361 */ "\t\t\t\t- may NOT appear - preset only\n\0"
-/*  3397 */ "\n"
+/*  3343 */ "\t\t\t\t- may NOT appear - preset only\n\0"
+/*  3379 */ "\n"
             "The following option preset mechanisms are supported:\n\0"
-/*  3453 */ "prohibits these options:\n\0"
-/*  3479 */ "prohibits the option '%s'\n\0"
-/*  3506 */ "%s%ld to %ld\0"
-/*  3519 */ "%sgreater than or equal to %ld\0"
-/*  3550 */ "%s%ld exactly\0"
-/*  3564 */ "%sit must lie in one of the ranges:\n\0"
-/*  3601 */ "%sit must be in the range:\n\0"
-/*  3629 */ ", or\n\0"
-/*  3635 */ "%sis scalable with a suffix: k/K/m/M/g/G/t/T\n\0"
-/*  3681 */ "%sless than or equal to %ld\0"
-/*  3709 */ "Operands and options may be intermixed.  They will be reordered.\n\0"
-/*  3775 */ "requires the option '%s'\n\0"
-/*  3801 */ "requires these options:\n\0"
-/*  3826 */ "   Arg Option-Name   Req?  Description\n\0"
-/*  3866 */ "  Flg Arg Option-Name   Req?  Description\n\0"
-/*  3909 */ "or you may use a numeric representation.  Preceding these with a '!'\n"
+/*  3435 */ "prohibits these options:\n\0"
+/*  3461 */ "prohibits the option '%s'\n\0"
+/*  3488 */ "%s%ld to %ld\0"
+/*  3501 */ "%sgreater than or equal to %ld\0"
+/*  3532 */ "%s%ld exactly\0"
+/*  3546 */ "%sit must lie in one of the ranges:\n\0"
+/*  3583 */ "%sit must be in the range:\n\0"
+/*  3611 */ ", or\n\0"
+/*  3617 */ "%sis scalable with a suffix: k/K/m/M/g/G/t/T\n\0"
+/*  3663 */ "%sless than or equal to %ld\0"
+/*  3691 */ "Operands and options may be intermixed.  They will be reordered.\n\0"
+/*  3757 */ "requires the option '%s'\n\0"
+/*  3783 */ "requires these options:\n\0"
+/*  3808 */ "   Arg Option-Name   Req?  Description\n\0"
+/*  3848 */ "  Flg Arg Option-Name   Req?  Description\n\0"
+/*  3891 */ "or you may use a numeric representation.  Preceding these with a '!'\n"
             "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
             "will set them all.  Multiple entries may be passed as an option\n"
             "argument list.\n\0"
-/*  4128 */ "\t\t\t\t- may appear up to %d times\n\0"
-/*  4161 */ "The valid \"%s\" option keywords are:\n\0"
-/*  4198 */ "The next option supports vendor supported extra options:\0"
-/*  4255 */ "These additional options are:";
+/*  4110 */ "\t\t\t\t- may appear up to %d times\n\0"
+/*  4143 */ "The valid \"%s\" option keywords are:\n\0"
+/*  4180 */ "The next option supports vendor supported extra options:\0"
+/*  4237 */ "These additional options are:";
 
 /*
  *  Now, define (and initialize) the structure that contains
@@ -308,7 +306,7 @@ char const option_lib_text[4285] =
  *  Aren't you glad you don't maintain this by hand?
  */
 usage_text_t option_xlateable_txt = {
-  108,
+  107,
   eng_zGnuBoolArg, eng_zGnuKeyArg,  eng_zGnuNumArg,  eng_zGnuStrArg,
     {
     option_lib_text +    0, option_lib_text +   31, option_lib_text +   83,
@@ -325,27 +323,27 @@ usage_text_t option_xlateable_txt = {
     option_lib_text + 1490, option_lib_text + 1528, option_lib_text + 1574,
     option_lib_text + 1619, option_lib_text + 1646, option_lib_text + 1695,
     option_lib_text + 1744, option_lib_text + 1771, option_lib_text + 1804,
-    option_lib_text + 1840, option_lib_text + 1890, option_lib_text + 1908,
-    option_lib_text + 1962, option_lib_text + 2010, option_lib_text + 2057,
-    option_lib_text + 2097, option_lib_text + 2132, option_lib_text + 2157,
-    option_lib_text + 2173, option_lib_text + 2188, option_lib_text + 2194,
-    option_lib_text + 2243, option_lib_text + 2288, option_lib_text + 2344,
-    option_lib_text + 2373, option_lib_text + 2415, option_lib_text + 2457,
-    option_lib_text + 2483, option_lib_text + 2498, option_lib_text + 2528,
-    option_lib_text + 2554, option_lib_text + 2571, option_lib_text + 2618,
-    option_lib_text + 2649, option_lib_text + 2676, option_lib_text + 2779,
-    option_lib_text + 2885, option_lib_text + 2941, option_lib_text + 2975,
-    option_lib_text + 3018, option_lib_text + 3085, option_lib_text + 3118,
-    option_lib_text + 3143, option_lib_text + 3178, option_lib_text + 3216,
-    option_lib_text + 3224, option_lib_text + 3272, option_lib_text + 3306,
-    option_lib_text + 3325, option_lib_text + 3361, option_lib_text + 3397,
-    option_lib_text + 3453, option_lib_text + 3479, option_lib_text + 3506,
-    option_lib_text + 3519, option_lib_text + 3550, option_lib_text + 3564,
-    option_lib_text + 3601, option_lib_text + 3629, option_lib_text + 3635,
-    option_lib_text + 3681, option_lib_text + 3709, option_lib_text + 3775,
-    option_lib_text + 3801, option_lib_text + 3826, option_lib_text + 3866,
-    option_lib_text + 3909, option_lib_text + 4128, option_lib_text + 4161,
-    option_lib_text + 4198, option_lib_text + 4255
+    option_lib_text + 1840, option_lib_text + 1890, option_lib_text + 1944,
+    option_lib_text + 1992, option_lib_text + 2039, option_lib_text + 2079,
+    option_lib_text + 2114, option_lib_text + 2139, option_lib_text + 2155,
+    option_lib_text + 2170, option_lib_text + 2176, option_lib_text + 2225,
+    option_lib_text + 2270, option_lib_text + 2326, option_lib_text + 2355,
+    option_lib_text + 2397, option_lib_text + 2439, option_lib_text + 2465,
+    option_lib_text + 2480, option_lib_text + 2510, option_lib_text + 2536,
+    option_lib_text + 2553, option_lib_text + 2600, option_lib_text + 2631,
+    option_lib_text + 2658, option_lib_text + 2761, option_lib_text + 2867,
+    option_lib_text + 2923, option_lib_text + 2957, option_lib_text + 3000,
+    option_lib_text + 3067, option_lib_text + 3100, option_lib_text + 3125,
+    option_lib_text + 3160, option_lib_text + 3198, option_lib_text + 3206,
+    option_lib_text + 3254, option_lib_text + 3288, option_lib_text + 3307,
+    option_lib_text + 3343, option_lib_text + 3379, option_lib_text + 3435,
+    option_lib_text + 3461, option_lib_text + 3488, option_lib_text + 3501,
+    option_lib_text + 3532, option_lib_text + 3546, option_lib_text + 3583,
+    option_lib_text + 3611, option_lib_text + 3617, option_lib_text + 3663,
+    option_lib_text + 3691, option_lib_text + 3757, option_lib_text + 3783,
+    option_lib_text + 3808, option_lib_text + 3848, option_lib_text + 3891,
+    option_lib_text + 4110, option_lib_text + 4143, option_lib_text + 4180,
+    option_lib_text + 4237
   } };
 #endif /* AUTOOPTS_INTERNAL */
 
@@ -364,234 +362,230 @@ static void dummy_func(void) {
   /* LIBOPTS-MESSAGES: */
 #line 67 "../autoopts.c"
   puts(_("allocation of %d bytes failed\n"));
-#line 93 "../autoopts.c"
+#line 89 "../autoopts.c"
   puts(_("allocation of %d bytes failed\n"));
-#line 53 "../init.c"
+#line 48 "../init.c"
   puts(_("AutoOpts function called without option descriptor\n"));
-#line 86 "../init.c"
+#line 81 "../init.c"
   puts(_("\tThis exceeds the compiled library version:  "));
-#line 84 "../init.c"
+#line 79 "../init.c"
   puts(_("Automated Options Processing Error!\n"
        "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
-#line 80 "../autoopts.c"
+#line 78 "../autoopts.c"
   puts(_("realloc of %d bytes at 0x%p failed\n"));
-#line 88 "../init.c"
+#line 83 "../init.c"
   puts(_("\tThis is less than the minimum library version:  "));
 #line 121 "../version.c"
   puts(_("Automated Options version %s\n"
-       "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
-#line 87 "../makeshell.c"
+       "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
+#line 49 "../makeshell.c"
   puts(_("(AutoOpts bug):  %s.\n"));
 #line 90 "../reset.c"
   puts(_("optionResetOpt() called, but reset-option not configured"));
-#line 295 "../usage.c"
+#line 241 "../usage.c"
   puts(_("could not locate the 'help' option"));
-#line 336 "../autoopts.c"
+#line 330 "../autoopts.c"
   puts(_("optionProcess() was called with invalid data"));
-#line 751 "../usage.c"
+#line 697 "../usage.c"
   puts(_("invalid argument type specified"));
-#line 598 "../find.c"
+#line 568 "../find.c"
   puts(_("defaulted to option with optional arg"));
 #line 76 "../alias.c"
   puts(_("aliasing option is out of range."));
-#line 235 "../enum.c"
+#line 210 "../enum.c"
   puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
-#line 108 "../find.c"
+#line 78 "../find.c"
   puts(_("  The following options match:\n"));
-#line 293 "../find.c"
+#line 263 "../find.c"
   puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
 #line 161 "../check.c"
   puts(_("%s: Command line arguments required\n"));
 #line 43 "../alias.c"
   puts(_("%d %s%s options allowed\n"));
-#line 94 "../makeshell.c"
+#line 56 "../makeshell.c"
   puts(_("%s error %d (%s) calling %s for '%s'\n"));
-#line 306 "../makeshell.c"
+#line 268 "../makeshell.c"
   puts(_("interprocess pipe"));
-#line 168 "../version.c"
+#line 171 "../version.c"
   puts(_("error: version option argument '%c' invalid.  Use:\n"
        "\t'v' - version only\n"
        "\t'c' - version and copyright\n"
        "\t'n' - version and full copyright notice\n"));
 #line 58 "../check.c"
   puts(_("%s error:  the '%s' and '%s' options conflict\n"));
-#line 217 "../find.c"
+#line 187 "../find.c"
   puts(_("%s: The '%s' option has been disabled."));
-#line 430 "../find.c"
+#line 400 "../find.c"
   puts(_("%s: The '%s' option has been disabled."));
 #line 38 "../alias.c"
   puts(_("-equivalence"));
-#line 469 "../find.c"
+#line 439 "../find.c"
   puts(_("%s: illegal option -- %c\n"));
 #line 110 "../reset.c"
   puts(_("%s: illegal option -- %c\n"));
-#line 271 "../find.c"
+#line 241 "../find.c"
   puts(_("%s: illegal option -- %s\n"));
-#line 755 "../find.c"
+#line 740 "../find.c"
   puts(_("%s: illegal option -- %s\n"));
 #line 118 "../reset.c"
   puts(_("%s: illegal option -- %s\n"));
-#line 335 "../find.c"
+#line 305 "../find.c"
   puts(_("%s: unknown vendor extension option -- %s\n"));
-#line 160 "../enum.c"
+#line 135 "../enum.c"
   puts(_("  or an integer from %d through %d\n"));
-#line 170 "../enum.c"
+#line 145 "../enum.c"
   puts(_("  or an integer from %d through %d\n"));
-#line 750 "../usage.c"
+#line 696 "../usage.c"
   puts(_("%s error:  invalid option descriptor for %s\n"));
-#line 1084 "../usage.c"
+#line 1030 "../usage.c"
   puts(_("%s error:  invalid option descriptor for %s\n"));
-#line 385 "../find.c"
+#line 355 "../find.c"
   puts(_("%s: invalid option name: %s\n"));
-#line 527 "../find.c"
+#line 497 "../find.c"
   puts(_("%s: The '%s' option requires an argument.\n"));
-#line 156 "../autoopts.c"
+#line 150 "../autoopts.c"
   puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
        "\t'%s' and '%s'."));
 #line 94 "../check.c"
   puts(_("%s error:  The %s option is required\n"));
-#line 632 "../find.c"
+#line 602 "../find.c"
   puts(_("%s: The '%s' option cannot have an argument.\n"));
 #line 151 "../check.c"
   puts(_("%s: Command line arguments are not allowed.\n"));
-#line 536 "../save.c"
+#line 568 "../save.c"
   puts(_("error %d (%s) creating %s\n"));
-#line 235 "../enum.c"
+#line 210 "../enum.c"
   puts(_("%s error:  '%s' does not match any %s keywords.\n"));
 #line 93 "../reset.c"
   puts(_("%s error: The '%s' option requires an argument.\n"));
-#line 186 "../save.c"
+#line 122 "../save.c"
   puts(_("error %d (%s) stat-ing %s\n"));
-#line 239 "../save.c"
+#line 175 "../save.c"
   puts(_("error %d (%s) stat-ing %s\n"));
 #line 143 "../restore.c"
   puts(_("%s error: no saved option state\n"));
-#line 231 "../autoopts.c"
+#line 225 "../autoopts.c"
   puts(_("'%s' is not a command line option.\n"));
 #line 113 "../time.c"
   puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
-#line 131 "../save.c"
-  puts(_("'%s' not defined\n"));
 #line 50 "../time.c"
   puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
 #line 92 "../check.c"
   puts(_("%s error:  The %s option must appear %d times.\n"));
 #line 165 "../numeric.c"
   puts(_("%s error:  '%s' is not a recognizable number.\n"));
-#line 201 "../enum.c"
+#line 176 "../enum.c"
   puts(_("%s error:  %s exceeds %s keyword count\n"));
-#line 333 "../usage.c"
+#line 279 "../usage.c"
   puts(_("Try '%s %s' for more information.\n"));
 #line 45 "../alias.c"
   puts(_("one %s%s option allowed\n"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
   puts(_("standard output"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
   puts(_("standard output"));
-#line 277 "../usage.c"
+#line 223 "../usage.c"
   puts(_("standard output"));
-#line 418 "../usage.c"
+#line 364 "../usage.c"
   puts(_("standard output"));
-#line 628 "../usage.c"
+#line 574 "../usage.c"
   puts(_("standard output"));
-#line 175 "../version.c"
+#line 178 "../version.c"
   puts(_("standard output"));
-#line 277 "../usage.c"
+#line 223 "../usage.c"
   puts(_("standard error"));
-#line 418 "../usage.c"
+#line 364 "../usage.c"
   puts(_("standard error"));
-#line 628 "../usage.c"
+#line 574 "../usage.c"
   puts(_("standard error"));
-#line 175 "../version.c"
+#line 178 "../version.c"
   puts(_("standard error"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
   puts(_("write"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
   puts(_("write"));
-#line 276 "../usage.c"
+#line 222 "../usage.c"
   puts(_("write"));
-#line 417 "../usage.c"
+#line 363 "../usage.c"
   puts(_("write"));
-#line 627 "../usage.c"
+#line 573 "../usage.c"
   puts(_("write"));
-#line 174 "../version.c"
+#line 177 "../version.c"
   puts(_("write"));
 #line 60 "../numeric.c"
   puts(_("%s error:  %s option value %ld is out of range.\n"));
 #line 44 "../check.c"
   puts(_("%s error:  %s option requires the %s option\n"));
-#line 130 "../save.c"
+#line 121 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 185 "../save.c"
+#line 174 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 238 "../save.c"
+#line 193 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 257 "../save.c"
-  puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 535 "../save.c"
+#line 567 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
   /* END-LIBOPTS-MESSAGES */
 
   /* USAGE-TEXT: */
-#line 876 "../usage.c"
+#line 822 "../usage.c"
   puts(_("\t\t\t\t- an alternate for '%s'\n"));
-#line 1151 "../usage.c"
+#line 1097 "../usage.c"
   puts(_("Version, usage and configuration options:"));
-#line 927 "../usage.c"
+#line 873 "../usage.c"
   puts(_("\t\t\t\t- default option for unnamed options\n"));
-#line 840 "../usage.c"
+#line 786 "../usage.c"
   puts(_("\t\t\t\t- disabled as '--%s'\n"));
-#line 1120 "../usage.c"
+#line 1066 "../usage.c"
   puts(_(" --- %-14s %s\n"));
-#line 1118 "../usage.c"
+#line 1064 "../usage.c"
   puts(_("This option has been disabled"));
-#line 867 "../usage.c"
+#line 813 "../usage.c"
   puts(_("\t\t\t\t- enabled by default\n"));
 #line 40 "../alias.c"
   puts(_("%s error:  only "));
-#line 1197 "../usage.c"
+#line 1143 "../usage.c"
   puts(_(" - examining environment variables named %s_*\n"));
 #line 168 "../file.c"
   puts(_("\t\t\t\t- file must not pre-exist\n"));
 #line 172 "../file.c"
   puts(_("\t\t\t\t- file must pre-exist\n"));
-#line 383 "../usage.c"
+#line 329 "../usage.c"
   puts(_("Options are specified by doubled hyphens and their name or by a single\n"
        "hyphen and the flag character.\n"));
-#line 921 "../makeshell.c"
+#line 882 "../makeshell.c"
   puts(_("\n"
        "= = = = = = = =\n\n"
        "This incarnation of genshell will produce\n"
        "a shell script to parse the options for %s:\n\n"));
-#line 167 "../enum.c"
+#line 142 "../enum.c"
   puts(_("  or an integer mask with any of the lower %d bits set\n"));
-#line 900 "../usage.c"
+#line 846 "../usage.c"
   puts(_("\t\t\t\t- is a set membership option\n"));
-#line 921 "../usage.c"
+#line 867 "../usage.c"
   puts(_("\t\t\t\t- must appear between %d and %d times\n"));
-#line 385 "../usage.c"
+#line 331 "../usage.c"
   puts(_("Options are specified by single or double hyphens and their name.\n"));
-#line 907 "../usage.c"
+#line 853 "../usage.c"
   puts(_("\t\t\t\t- may appear multiple times\n"));
-#line 894 "../usage.c"
+#line 840 "../usage.c"
   puts(_("\t\t\t\t- may not be preset\n"));
-#line 1312 "../usage.c"
+#line 1258 "../usage.c"
   puts(_("   Arg Option-Name    Description\n"));
-#line 1248 "../usage.c"
+#line 1194 "../usage.c"
   puts(_("  Flg Arg Option-Name    Description\n"));
-#line 1306 "../usage.c"
+#line 1252 "../usage.c"
   puts(_("  Flg Arg Option-Name    Description\n"));
-#line 1307 "../usage.c"
+#line 1253 "../usage.c"
   puts(_(" %3s %s"));
-#line 1313 "../usage.c"
+#line 1259 "../usage.c"
   puts(_(" %3s %s"));
-#line 390 "../usage.c"
+#line 336 "../usage.c"
   puts(_("The '-#<number>' option may omit the hash char\n"));
-#line 386 "../usage.c"
+#line 332 "../usage.c"
   puts(_("All arguments are named options.\n"));
-#line 974 "../usage.c"
+#line 920 "../usage.c"
   puts(_(" - reading file %s"));
-#line 412 "../usage.c"
+#line 358 "../usage.c"
   puts(_("\n"
        "Please send bug reports to:  <%s>\n"));
 #line 100 "../version.c"
@@ -600,17 +594,17 @@ static void dummy_func(void) {
 #line 129 "../version.c"
   puts(_("\n"
        "Please send bug reports to:  <%s>\n"));
-#line 906 "../usage.c"
+#line 852 "../usage.c"
   puts(_("\t\t\t\t- may NOT appear - preset only\n"));
-#line 947 "../usage.c"
+#line 893 "../usage.c"
   puts(_("\n"
        "The following option preset mechanisms are supported:\n"));
-#line 1195 "../usage.c"
+#line 1141 "../usage.c"
   puts(_("\n"
        "The following option preset mechanisms are supported:\n"));
-#line 685 "../usage.c"
+#line 631 "../usage.c"
   puts(_("prohibits these options:\n"));
-#line 680 "../usage.c"
+#line 626 "../usage.c"
   puts(_("prohibits the option '%s'\n"));
 #line 81 "../numeric.c"
   puts(_("%s%ld to %ld"));
@@ -628,28 +622,28 @@ static void dummy_func(void) {
   puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
 #line 77 "../numeric.c"
   puts(_("%sless than or equal to %ld"));
-#line 393 "../usage.c"
+#line 339 "../usage.c"
   puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
-#line 655 "../usage.c"
+#line 601 "../usage.c"
   puts(_("requires the option '%s'\n"));
-#line 658 "../usage.c"
+#line 604 "../usage.c"
   puts(_("requires these options:\n"));
-#line 1324 "../usage.c"
+#line 1270 "../usage.c"
   puts(_("   Arg Option-Name   Req?  Description\n"));
-#line 1318 "../usage.c"
+#line 1264 "../usage.c"
   puts(_("  Flg Arg Option-Name   Req?  Description\n"));
-#line 168 "../enum.c"
+#line 143 "../enum.c"
   puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
        "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
        "will set them all.  Multiple entries may be passed as an option\n"
        "argument list.\n"));
-#line 913 "../usage.c"
+#line 859 "../usage.c"
   puts(_("\t\t\t\t- may appear up to %d times\n"));
-#line 77 "../enum.c"
+#line 52 "../enum.c"
   puts(_("The valid \"%s\" option keywords are:\n"));
-#line 1155 "../usage.c"
+#line 1101 "../usage.c"
   puts(_("The next option supports vendor supported extra options:"));
-#line 776 "../usage.c"
+#line 722 "../usage.c"
   puts(_("These additional options are:"));
   /* END-USAGE-TEXT */
 }

+ 2 - 2
libopts/boolean.c

@@ -13,7 +13,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -65,7 +65,7 @@ optionBooleanVal(tOptions * opts, tOptDesc * od)
         if ((val != 0) || (*pz != NUL))
             break;
     }
-    /* fall through */
+    /* FALLTHROUGH */
     case 'N':
     case 'n':
     case 'F':

+ 2 - 2
libopts/check.c

@@ -9,7 +9,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -100,7 +100,7 @@ occurs_enough(tOptions * pOpts, tOptDesc * pOD)
  *
  *  Make sure that the argument list passes our consistency tests.
  */
-LOCAL bool
+static bool
 is_consistent(tOptions * pOpts)
 {
     tOptDesc * pOD   = pOpts->pOptDesc;

+ 4 - 4
libopts/compat/compat.h

@@ -1,9 +1,9 @@
-/*  -*- Mode: C -*- 
+/*  -*- Mode: C -*-
  *
  *  compat.h is free software.
  *  This file is part of AutoGen and AutoOpts.
  *
- *  AutoGen Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ *  AutoGen Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -182,9 +182,9 @@
 #  include <unistd.h>
 #endif
 
-#ifdef HAVE_STDBOOL_H
+#if defined(HAVE_STDBOOL_H)
 #  include <stdbool.h>
-#else
+#elif ! defined(bool)
    typedef enum { false = 0, true = 1 } _Bool;
 #  define bool _Bool
 

+ 1 - 1
libopts/compat/windows-config.h

@@ -9,7 +9,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control

+ 25 - 78
libopts/configfile.c

@@ -9,7 +9,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -28,50 +28,6 @@
  *  13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239  COPYING.mbsd
  */
 
-/* = = = START-STATIC-FORWARD = = = */
-static void
-file_preset(tOptions * opts, char const * fname, int dir);
-
-static char *
-handle_comment(char * txt);
-
-static char *
-handle_cfg(tOptions * opts, tOptState * ost, char * txt, int dir);
-
-static char *
-handle_directive(tOptions * opts, char * txt);
-
-static char *
-aoflags_directive(tOptions * opts, char * txt);
-
-static char *
-program_directive(tOptions * opts, char * txt);
-
-static char *
-handle_section(tOptions * opts, char * txt);
-
-static int
-parse_xml_encoding(char ** ppz);
-
-static char *
-trim_xml_text(char * intxt, char const * pznm, tOptionLoadMode mode);
-
-static void
-cook_xml_text(char * pzData);
-
-static char *
-handle_struct(tOptions * opts, tOptState * ost, char * txt, int dir);
-
-static char const *
-parse_keyword(tOptions * opts, char const * txt, tOptionValue * typ);
-
-static char const *
-parse_set_mem(tOptions * opts, char const * txt, tOptionValue * typ);
-
-static char const *
-parse_value(char const * txt, tOptionValue * typ);
-/* = = = END-STATIC-FORWARD = = = */
-
 /**
  *  Skip over some unknown attribute
  *  @param[in] txt   start of skpped text
@@ -145,7 +101,7 @@ configFileLoad(char const * fname)
 
 /*=export_func  optionFindValue
  *
- * what:  find a hierarchically valued option instance
+ * what:  find a hierarcicaly valued option instance
  * arg:   + const tOptDesc * + odesc + an option with a nested arg type +
  * arg:   + char const *     + name  + name of value to find +
  * arg:   + char const *     + val   + the matching value    +
@@ -220,7 +176,7 @@ optionFindValue(const tOptDesc * odesc, char const * name, char const * val)
  *
  * FIXME: the handling of 'pzName' and 'pzVal' is just wrong.
  *
- * what:  find a hierarchically valued option instance
+ * what:  find a hierarcicaly valued option instance
  * arg:   + const tOptDesc * + odesc + an option with a nested arg type +
  * arg:   + const tOptionValue * + pPrevVal + the last entry +
  * arg:   + char const *     + name     + name of value to find +
@@ -466,7 +422,8 @@ file_preset(tOptions * opts, char const * fname, int dir)
                 ftext = strchr(ftext + 2, '>');
                 if (ftext++ != NULL)
                     break;
-                /* fall through */
+                /* FALLTHROUGH */
+
             default:
                 ftext = NULL;
             }
@@ -626,9 +583,9 @@ handle_directive(tOptions * opts, char * txt)
 
     for (ix = 0; ix < dir_ct; ix++) {
         size_t len = strlen(dir_names[ix]);
-        if (  (strncmp(txt + 2, dir_names[ix], len) == 0)
-           && (! IS_VALUE_NAME_CHAR(txt[len+2])) )
-            return dir_disp[ix](opts, txt + len + 2);
+        if (  (strncmp(txt, dir_names[ix], len) == 0)
+           && (! IS_VALUE_NAME_CHAR(txt[len])) )
+            return dir_disp[ix](opts, txt + len);
     }
 
     /*
@@ -681,38 +638,28 @@ aoflags_directive(tOptions * opts, char * txt)
 static char *
 program_directive(tOptions * opts, char * txt)
 {
-    static char const ttlfmt[] = "<?";
-    size_t ttl_len  = sizeof(ttlfmt) + strlen(zCfgProg);
-    char * ttl      = AGALOC(ttl_len, "prog title");
     size_t name_len = strlen(opts->pzProgName);
 
-    memcpy(ttl, ttlfmt, sizeof(ttlfmt) - 1);
-    memcpy(ttl + sizeof(ttlfmt) - 1, zCfgProg, ttl_len - (sizeof(ttlfmt) - 1));
-
-    do  {
-        txt = SPN_WHITESPACE_CHARS(txt+1);
+    for (;; txt += zCfgProg_LEN) {
+        txt = SPN_WHITESPACE_CHARS(txt);
 
         if (  (strneqvcmp(txt, opts->pzProgName, (int)name_len) == 0)
-           && (IS_END_XML_TOKEN_CHAR(txt[name_len])) ) {
-            txt += name_len;
-            break;
-        }
+           && (IS_END_XML_TOKEN_CHAR(txt[name_len])) )
 
-        txt = strstr(txt, ttl);
-    } while (txt != NULL);
+            return txt + name_len;
 
-    AGFREE(ttl);
-    if (txt != NULL)
-        for (;;) {
-            if (*txt == NUL) {
-                txt = NULL;
-                break;
-            }
-            if (*(txt++) == '>')
-                break;
-        }
+        txt = strstr(txt, zCfgProg);
+        if (txt == NULL)
+            return txt;
+    }
 
-    return txt;
+    for (;;) {
+        if (*txt == NUL)
+            return NULL;
+
+        if (*(txt++) == '>')
+            return txt;
+    }
 }
 
 /**
@@ -1006,7 +953,7 @@ handle_struct(tOptions * opts, tOptState * ost, char * txt, int dir)
  *  scanning the "homerc" list, or from a specific file request.
  *  (see "optionFileLoad()", the implementation for --load-opts)
  */
-LOCAL void
+static void
 intern_file_load(tOptions * opts)
 {
     uint32_t  svfl;
@@ -1207,7 +1154,7 @@ optionLoadOpt(tOptions * opts, tOptDesc * odesc)
  *
  * @returns NULL on failure, otherwise the scan point
  */
-LOCAL char const *
+static char const *
 parse_attrs(tOptions * opts, char const * txt, tOptionLoadMode * pMode,
             tOptionValue * pType)
 {

+ 1 - 9
libopts/cook.c

@@ -10,7 +10,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -29,14 +29,6 @@
  *  13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239  COPYING.mbsd
  */
 
-/* = = = START-STATIC-FORWARD = = = */
-static char *
-nl_count(char * start, char * end, int * lnct_p);
-
-static bool
-contiguous_quote(char ** pps, char * pq, int * lnct_p);
-/* = = = END-STATIC-FORWARD = = = */
-
 /*=export_func  ao_string_cook_escape_char
  * private:
  *

+ 1 - 26
libopts/enum.c

@@ -14,7 +14,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -33,31 +33,6 @@
  *  13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239  COPYING.mbsd
  */
 
-/* = = = START-STATIC-FORWARD = = = */
-static void
-enum_err(tOptions * pOpts, tOptDesc * pOD,
-         char const * const * paz_names, int name_ct);
-
-static uintptr_t
-find_name(char const * name, tOptions * pOpts, tOptDesc * pOD,
-          char const * const *  paz_names, unsigned int name_ct);
-
-static void
-set_memb_shell(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names,
-               unsigned int name_ct);
-
-static void
-set_memb_names(tOptions * opts, tOptDesc * od, char const * const * nm_list,
-               unsigned int nm_ct);
-
-static uintptr_t
-check_membership_start(tOptDesc * od, char const ** argp, bool * invert);
-
-static uintptr_t
-find_member_bit(tOptions * opts, tOptDesc * od, char const * pz, int len,
-                char const * const * nm_list, unsigned int nm_ct);
-/* = = = END-STATIC-FORWARD = = = */
-
 static void
 enum_err(tOptions * pOpts, tOptDesc * pOD,
          char const * const * paz_names, int name_ct)

+ 3 - 9
libopts/env.c

@@ -13,7 +13,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -32,19 +32,13 @@
  *  13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239  COPYING.mbsd
  */
 
-/* = = = START-STATIC-FORWARD = = = */
-static void
-do_env_opt(tOptState * os, char * env_name,
-            tOptions * pOpts, teEnvPresetType type);
-/* = = = END-STATIC-FORWARD = = = */
-
 /*
  *  doPrognameEnv - check for preset values from the ${PROGNAME}
  *  environment variable.  This is accomplished by parsing the text into
  *  tokens, temporarily replacing the arg vector and calling
  *  immediate_opts and/or regular_opts.
  */
-LOCAL void
+static void
 doPrognameEnv(tOptions * pOpts, teEnvPresetType type)
 {
     char const *        env_opts = getenv(pOpts->pzPROGNAME);
@@ -187,7 +181,7 @@ do_env_opt(tOptState * os, char * env_name,
  *  env_presets - check for preset values from the envrionment
  *  This routine should process in all, immediate or normal modes....
  */
-LOCAL void
+static void
 env_presets(tOptions * pOpts, teEnvPresetType type)
 {
     int        ct;

+ 1 - 1
libopts/file.c

@@ -10,7 +10,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control

+ 23 - 38
libopts/find.c

@@ -12,7 +12,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -31,36 +31,6 @@
  *  13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239  COPYING.mbsd
  */
 
-/* = = = START-STATIC-FORWARD = = = */
-static int
-parse_opt(char const ** nm_pp, char ** arg_pp, char * buf, size_t bufsz);
-
-static void
-opt_ambiguities(tOptions * opts, char const * name, int nm_len);
-
-static int
-opt_match_ct(tOptions * opts, char const * name, int nm_len,
-             int * ixp, bool * disable);
-
-static tSuccess
-opt_set(tOptions * opts, char * arg, int idx, bool disable, tOptState * st);
-
-static tSuccess
-opt_unknown(tOptions * opts, char const * name, char * arg, tOptState * st);
-
-static tSuccess
-opt_ambiguous(tOptions * opts, char const * name, int match_ct);
-
-static tSuccess
-get_opt_arg_must(tOptions * opts, tOptState * o_st);
-
-static tSuccess
-get_opt_arg_may(tOptions * pOpts, tOptState * o_st);
-
-static tSuccess
-get_opt_arg_none(tOptions * pOpts, tOptState * o_st);
-/* = = = END-STATIC-FORWARD = = = */
-
 /**
  * find the name and name length we are looking for
  */
@@ -367,7 +337,7 @@ optionVendorOption(tOptions * pOpts, tOptDesc * pOD)
  *
  * @return success status
  */
-LOCAL tSuccess
+static tSuccess
 opt_find_long(tOptions * opts, char const * opt_name, tOptState * state)
 {
     char    name_buf[128];
@@ -408,7 +378,7 @@ opt_find_long(tOptions * opts, char const * opt_name, tOptState * state)
  * @param optValue   option flag character
  * @param pOptState  state about current option
  */
-LOCAL tSuccess
+static tSuccess
 opt_find_short(tOptions * pOpts, uint_t optValue, tOptState * pOptState)
 {
     tOptDesc * pRes = pOpts->pOptDesc;
@@ -638,6 +608,7 @@ get_opt_arg_none(tOptions * pOpts, tOptState * o_st)
      */
     else
         pOpts->pzCurOpt = NULL;
+
     return SUCCESS;
 }
 
@@ -648,7 +619,7 @@ get_opt_arg_none(tOptions * pOpts, tOptState * o_st)
  *  @param[in,out] o_st  the option processing state
  *  @returns SUCCESS or FAILURE
  */
-LOCAL tSuccess
+static tSuccess
 get_opt_arg(tOptions * opts, tOptState * o_st)
 {
     o_st->flags |= (o_st->pOD->fOptState & OPTST_PERSISTENT_MASK);
@@ -658,10 +629,24 @@ get_opt_arg(tOptions * opts, tOptState * o_st)
      * are handled with the "none" procedure.  Otherwise, check the
      * optional flag and call either the "may" or "must" function.
      */
-    if (  ((o_st->flags & OPTST_DISABLED) != 0)
-       || (OPTST_GET_ARGTYPE(o_st->flags) == OPARG_TYPE_NONE))
+    if ((o_st->flags & OPTST_DISABLED) != 0)
         return get_opt_arg_none(opts, o_st);
-    
+
+    switch (OPTST_GET_ARGTYPE(o_st->flags)) {
+    case OPARG_TYPE_STATIC:
+    {
+        /*
+         * Propagate the static arg
+         */
+        tSuccess res = get_opt_arg_none(opts, o_st);
+        o_st->pzOptArg = o_st->pOD->optArg.argString;
+        return res;
+    }
+
+    case OPARG_TYPE_NONE:
+        return get_opt_arg_none(opts, o_st);
+    }
+
     if (o_st->flags & OPTST_ARG_OPTIONAL)
         return get_opt_arg_may( opts, o_st);
     
@@ -675,7 +660,7 @@ get_opt_arg(tOptions * opts, tOptState * o_st)
  *  @param[in,out] o_st  the option processing state
  *  @returns SUCCESS or FAILURE
  */
-LOCAL tSuccess
+static tSuccess
 find_opt(tOptions * opts, tOptState * o_st)
 {
     /*

+ 111 - 110
libopts/genshell.c

@@ -6,7 +6,7 @@
  *  From the definitions    genshell.def
  *  and the template file   options
  *
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
  *
  *  AutoOpts is a copyrighted work.  This source file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -19,7 +19,7 @@
  * The genshellopt program is copyrighted and licensed
  * under the following terms:
  *
- *  Copyright (C) 1999-2014 Bruce Korb, all rights reserved.
+ *  Copyright (C) 1999-2018 Bruce Korb, all rights reserved.
  *  This is free software. It is licensed for use, modification and
  *  redistribution under the terms of the GNU Lesser General Public License,
  *  version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>
@@ -43,10 +43,15 @@
 #define OPTION_CODE_COMPILE 1
 #include "genshell.h"
 #include <sys/types.h>
+#include <sys/stat.h>
 
+#include <errno.h>
+#include <fcntl.h>
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
 #ifdef  __cplusplus
 extern "C" {
@@ -66,7 +71,7 @@ extern tUsageProc genshelloptUsage;
  */
 static char const genshellopt_opt_strs[1769] =
 /*     0 */ "genshellopt 1\n"
-            "Copyright (C) 1999-2014 Bruce Korb, all rights reserved.\n"
+            "Copyright (C) 1999-2018 Bruce Korb, all rights reserved.\n"
             "This is free software. It is licensed for use, modification and\n"
             "redistribution under the terms of the GNU Lesser General Public License,\n"
             "version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n\0"
@@ -258,7 +263,7 @@ static tOptDesc optDesc[GENSHELL_OPTION_CT] = {
 #define zDetail         (genshellopt_opt_strs+1534)
 /** The full version string for genshellopt. */
 #define zFullVersion    (genshellopt_opt_strs+1755)
-/* extracted from optcode.tlib near line 364 */
+/* extracted from optcode.tlib near line 342 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -481,19 +486,19 @@ static void bogus_function(void) {
      extract the correct strings.  These strings are actually referenced
      by a field name in the genshelloptOptions structure noted in the
      comments below.  The literal text is defined in genshellopt_opt_strs.
-   
+
      NOTE: the strings below are segmented with respect to the source string
      genshellopt_opt_strs.  The strings above are handed off for translation
      at run time a paragraph at a time.  Consequently, they are presented here
      for translation a paragraph at a time.
-   
+
      ALSO: often the description for an option will reference another option
      by name.  These are set off with apostrophe quotes (I hope).  Do not
      translate option names.
    */
   /* referenced via genshelloptOptions.pzCopyright */
   puts(_("genshellopt 1\n\
-Copyright (C) 1999-2014 Bruce Korb, all rights reserved.\n\
+Copyright (C) 1999-2018 Bruce Korb, all rights reserved.\n\
 This is free software. It is licensed for use, modification and\n\
 redistribution under the terms of the GNU Lesser General Public License,\n\
 version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n"));
@@ -551,234 +556,230 @@ by the newly generated text.  The first '#!' line will be regenerated.\n"));
   /* LIBOPTS-MESSAGES: */
 #line 67 "../autoopts.c"
   puts(_("allocation of %d bytes failed\n"));
-#line 93 "../autoopts.c"
+#line 89 "../autoopts.c"
   puts(_("allocation of %d bytes failed\n"));
-#line 53 "../init.c"
+#line 48 "../init.c"
   puts(_("AutoOpts function called without option descriptor\n"));
-#line 86 "../init.c"
+#line 81 "../init.c"
   puts(_("\tThis exceeds the compiled library version:  "));
-#line 84 "../init.c"
+#line 79 "../init.c"
   puts(_("Automated Options Processing Error!\n"
        "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
-#line 80 "../autoopts.c"
+#line 78 "../autoopts.c"
   puts(_("realloc of %d bytes at 0x%p failed\n"));
-#line 88 "../init.c"
+#line 83 "../init.c"
   puts(_("\tThis is less than the minimum library version:  "));
 #line 121 "../version.c"
   puts(_("Automated Options version %s\n"
-       "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
-#line 87 "../makeshell.c"
+       "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
+#line 49 "../makeshell.c"
   puts(_("(AutoOpts bug):  %s.\n"));
 #line 90 "../reset.c"
   puts(_("optionResetOpt() called, but reset-option not configured"));
-#line 295 "../usage.c"
+#line 241 "../usage.c"
   puts(_("could not locate the 'help' option"));
-#line 336 "../autoopts.c"
+#line 330 "../autoopts.c"
   puts(_("optionProcess() was called with invalid data"));
-#line 751 "../usage.c"
+#line 697 "../usage.c"
   puts(_("invalid argument type specified"));
-#line 598 "../find.c"
+#line 568 "../find.c"
   puts(_("defaulted to option with optional arg"));
 #line 76 "../alias.c"
   puts(_("aliasing option is out of range."));
-#line 235 "../enum.c"
+#line 210 "../enum.c"
   puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
-#line 108 "../find.c"
+#line 78 "../find.c"
   puts(_("  The following options match:\n"));
-#line 293 "../find.c"
+#line 263 "../find.c"
   puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
 #line 161 "../check.c"
   puts(_("%s: Command line arguments required\n"));
 #line 43 "../alias.c"
   puts(_("%d %s%s options allowed\n"));
-#line 94 "../makeshell.c"
+#line 56 "../makeshell.c"
   puts(_("%s error %d (%s) calling %s for '%s'\n"));
-#line 306 "../makeshell.c"
+#line 268 "../makeshell.c"
   puts(_("interprocess pipe"));
-#line 168 "../version.c"
+#line 171 "../version.c"
   puts(_("error: version option argument '%c' invalid.  Use:\n"
        "\t'v' - version only\n"
        "\t'c' - version and copyright\n"
        "\t'n' - version and full copyright notice\n"));
 #line 58 "../check.c"
   puts(_("%s error:  the '%s' and '%s' options conflict\n"));
-#line 217 "../find.c"
+#line 187 "../find.c"
   puts(_("%s: The '%s' option has been disabled."));
-#line 430 "../find.c"
+#line 400 "../find.c"
   puts(_("%s: The '%s' option has been disabled."));
 #line 38 "../alias.c"
   puts(_("-equivalence"));
-#line 469 "../find.c"
+#line 439 "../find.c"
   puts(_("%s: illegal option -- %c\n"));
 #line 110 "../reset.c"
   puts(_("%s: illegal option -- %c\n"));
-#line 271 "../find.c"
+#line 241 "../find.c"
   puts(_("%s: illegal option -- %s\n"));
-#line 755 "../find.c"
+#line 740 "../find.c"
   puts(_("%s: illegal option -- %s\n"));
 #line 118 "../reset.c"
   puts(_("%s: illegal option -- %s\n"));
-#line 335 "../find.c"
+#line 305 "../find.c"
   puts(_("%s: unknown vendor extension option -- %s\n"));
-#line 160 "../enum.c"
+#line 135 "../enum.c"
   puts(_("  or an integer from %d through %d\n"));
-#line 170 "../enum.c"
+#line 145 "../enum.c"
   puts(_("  or an integer from %d through %d\n"));
-#line 750 "../usage.c"
+#line 696 "../usage.c"
   puts(_("%s error:  invalid option descriptor for %s\n"));
-#line 1084 "../usage.c"
+#line 1030 "../usage.c"
   puts(_("%s error:  invalid option descriptor for %s\n"));
-#line 385 "../find.c"
+#line 355 "../find.c"
   puts(_("%s: invalid option name: %s\n"));
-#line 527 "../find.c"
+#line 497 "../find.c"
   puts(_("%s: The '%s' option requires an argument.\n"));
-#line 156 "../autoopts.c"
+#line 150 "../autoopts.c"
   puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
        "\t'%s' and '%s'."));
 #line 94 "../check.c"
   puts(_("%s error:  The %s option is required\n"));
-#line 632 "../find.c"
+#line 602 "../find.c"
   puts(_("%s: The '%s' option cannot have an argument.\n"));
 #line 151 "../check.c"
   puts(_("%s: Command line arguments are not allowed.\n"));
-#line 536 "../save.c"
+#line 568 "../save.c"
   puts(_("error %d (%s) creating %s\n"));
-#line 235 "../enum.c"
+#line 210 "../enum.c"
   puts(_("%s error:  '%s' does not match any %s keywords.\n"));
 #line 93 "../reset.c"
   puts(_("%s error: The '%s' option requires an argument.\n"));
-#line 186 "../save.c"
+#line 122 "../save.c"
   puts(_("error %d (%s) stat-ing %s\n"));
-#line 239 "../save.c"
+#line 175 "../save.c"
   puts(_("error %d (%s) stat-ing %s\n"));
 #line 143 "../restore.c"
   puts(_("%s error: no saved option state\n"));
-#line 231 "../autoopts.c"
+#line 225 "../autoopts.c"
   puts(_("'%s' is not a command line option.\n"));
 #line 113 "../time.c"
   puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
-#line 131 "../save.c"
-  puts(_("'%s' not defined\n"));
 #line 50 "../time.c"
   puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
 #line 92 "../check.c"
   puts(_("%s error:  The %s option must appear %d times.\n"));
 #line 165 "../numeric.c"
   puts(_("%s error:  '%s' is not a recognizable number.\n"));
-#line 201 "../enum.c"
+#line 176 "../enum.c"
   puts(_("%s error:  %s exceeds %s keyword count\n"));
-#line 333 "../usage.c"
+#line 279 "../usage.c"
   puts(_("Try '%s %s' for more information.\n"));
 #line 45 "../alias.c"
   puts(_("one %s%s option allowed\n"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
   puts(_("standard output"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
   puts(_("standard output"));
-#line 277 "../usage.c"
+#line 223 "../usage.c"
   puts(_("standard output"));
-#line 418 "../usage.c"
+#line 364 "../usage.c"
   puts(_("standard output"));
-#line 628 "../usage.c"
+#line 574 "../usage.c"
   puts(_("standard output"));
-#line 175 "../version.c"
+#line 178 "../version.c"
   puts(_("standard output"));
-#line 277 "../usage.c"
+#line 223 "../usage.c"
   puts(_("standard error"));
-#line 418 "../usage.c"
+#line 364 "../usage.c"
   puts(_("standard error"));
-#line 628 "../usage.c"
+#line 574 "../usage.c"
   puts(_("standard error"));
-#line 175 "../version.c"
+#line 178 "../version.c"
   puts(_("standard error"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
   puts(_("write"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
   puts(_("write"));
-#line 276 "../usage.c"
+#line 222 "../usage.c"
   puts(_("write"));
-#line 417 "../usage.c"
+#line 363 "../usage.c"
   puts(_("write"));
-#line 627 "../usage.c"
+#line 573 "../usage.c"
   puts(_("write"));
-#line 174 "../version.c"
+#line 177 "../version.c"
   puts(_("write"));
 #line 60 "../numeric.c"
   puts(_("%s error:  %s option value %ld is out of range.\n"));
 #line 44 "../check.c"
   puts(_("%s error:  %s option requires the %s option\n"));
-#line 130 "../save.c"
-  puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 185 "../save.c"
+#line 121 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 238 "../save.c"
+#line 174 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 257 "../save.c"
+#line 193 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 535 "../save.c"
+#line 567 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
   /* END-LIBOPTS-MESSAGES */
 
   /* USAGE-TEXT: */
-#line 876 "../usage.c"
+#line 822 "../usage.c"
   puts(_("\t\t\t\t- an alternate for '%s'\n"));
-#line 1151 "../usage.c"
+#line 1097 "../usage.c"
   puts(_("Version, usage and configuration options:"));
-#line 927 "../usage.c"
+#line 873 "../usage.c"
   puts(_("\t\t\t\t- default option for unnamed options\n"));
-#line 840 "../usage.c"
+#line 786 "../usage.c"
   puts(_("\t\t\t\t- disabled as '--%s'\n"));
-#line 1120 "../usage.c"
+#line 1066 "../usage.c"
   puts(_(" --- %-14s %s\n"));
-#line 1118 "../usage.c"
+#line 1064 "../usage.c"
   puts(_("This option has been disabled"));
-#line 867 "../usage.c"
+#line 813 "../usage.c"
   puts(_("\t\t\t\t- enabled by default\n"));
 #line 40 "../alias.c"
   puts(_("%s error:  only "));
-#line 1197 "../usage.c"
+#line 1143 "../usage.c"
   puts(_(" - examining environment variables named %s_*\n"));
 #line 168 "../file.c"
   puts(_("\t\t\t\t- file must not pre-exist\n"));
 #line 172 "../file.c"
   puts(_("\t\t\t\t- file must pre-exist\n"));
-#line 383 "../usage.c"
+#line 329 "../usage.c"
   puts(_("Options are specified by doubled hyphens and their name or by a single\n"
        "hyphen and the flag character.\n"));
-#line 921 "../makeshell.c"
+#line 882 "../makeshell.c"
   puts(_("\n"
        "= = = = = = = =\n\n"
        "This incarnation of genshell will produce\n"
        "a shell script to parse the options for %s:\n\n"));
-#line 167 "../enum.c"
+#line 142 "../enum.c"
   puts(_("  or an integer mask with any of the lower %d bits set\n"));
-#line 900 "../usage.c"
+#line 846 "../usage.c"
   puts(_("\t\t\t\t- is a set membership option\n"));
-#line 921 "../usage.c"
+#line 867 "../usage.c"
   puts(_("\t\t\t\t- must appear between %d and %d times\n"));
-#line 385 "../usage.c"
+#line 331 "../usage.c"
   puts(_("Options are specified by single or double hyphens and their name.\n"));
-#line 907 "../usage.c"
+#line 853 "../usage.c"
   puts(_("\t\t\t\t- may appear multiple times\n"));
-#line 894 "../usage.c"
+#line 840 "../usage.c"
   puts(_("\t\t\t\t- may not be preset\n"));
-#line 1312 "../usage.c"
+#line 1258 "../usage.c"
   puts(_("   Arg Option-Name    Description\n"));
-#line 1248 "../usage.c"
+#line 1194 "../usage.c"
   puts(_("  Flg Arg Option-Name    Description\n"));
-#line 1306 "../usage.c"
+#line 1252 "../usage.c"
   puts(_("  Flg Arg Option-Name    Description\n"));
-#line 1307 "../usage.c"
+#line 1253 "../usage.c"
   puts(_(" %3s %s"));
-#line 1313 "../usage.c"
+#line 1259 "../usage.c"
   puts(_(" %3s %s"));
-#line 390 "../usage.c"
+#line 336 "../usage.c"
   puts(_("The '-#<number>' option may omit the hash char\n"));
-#line 386 "../usage.c"
+#line 332 "../usage.c"
   puts(_("All arguments are named options.\n"));
-#line 974 "../usage.c"
+#line 920 "../usage.c"
   puts(_(" - reading file %s"));
-#line 412 "../usage.c"
+#line 358 "../usage.c"
   puts(_("\n"
        "Please send bug reports to:  <%s>\n"));
 #line 100 "../version.c"
@@ -787,17 +788,17 @@ by the newly generated text.  The first '#!' line will be regenerated.\n"));
 #line 129 "../version.c"
   puts(_("\n"
        "Please send bug reports to:  <%s>\n"));
-#line 906 "../usage.c"
+#line 852 "../usage.c"
   puts(_("\t\t\t\t- may NOT appear - preset only\n"));
-#line 947 "../usage.c"
+#line 893 "../usage.c"
   puts(_("\n"
        "The following option preset mechanisms are supported:\n"));
-#line 1195 "../usage.c"
+#line 1141 "../usage.c"
   puts(_("\n"
        "The following option preset mechanisms are supported:\n"));
-#line 685 "../usage.c"
+#line 631 "../usage.c"
   puts(_("prohibits these options:\n"));
-#line 680 "../usage.c"
+#line 626 "../usage.c"
   puts(_("prohibits the option '%s'\n"));
 #line 81 "../numeric.c"
   puts(_("%s%ld to %ld"));
@@ -815,28 +816,28 @@ by the newly generated text.  The first '#!' line will be regenerated.\n"));
   puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
 #line 77 "../numeric.c"
   puts(_("%sless than or equal to %ld"));
-#line 393 "../usage.c"
+#line 339 "../usage.c"
   puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
-#line 655 "../usage.c"
+#line 601 "../usage.c"
   puts(_("requires the option '%s'\n"));
-#line 658 "../usage.c"
+#line 604 "../usage.c"
   puts(_("requires these options:\n"));
-#line 1324 "../usage.c"
+#line 1270 "../usage.c"
   puts(_("   Arg Option-Name   Req?  Description\n"));
-#line 1318 "../usage.c"
+#line 1264 "../usage.c"
   puts(_("  Flg Arg Option-Name   Req?  Description\n"));
-#line 168 "../enum.c"
+#line 143 "../enum.c"
   puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
        "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
        "will set them all.  Multiple entries may be passed as an option\n"
        "argument list.\n"));
-#line 913 "../usage.c"
+#line 859 "../usage.c"
   puts(_("\t\t\t\t- may appear up to %d times\n"));
-#line 77 "../enum.c"
+#line 52 "../enum.c"
   puts(_("The valid \"%s\" option keywords are:\n"));
-#line 1155 "../usage.c"
+#line 1101 "../usage.c"
   puts(_("The next option supports vendor supported extra options:"));
-#line 776 "../usage.c"
+#line 722 "../usage.c"
   puts(_("These additional options are:"));
   /* END-USAGE-TEXT */
 }

+ 18 - 3
libopts/genshell.h

@@ -6,7 +6,7 @@
  *  From the definitions    genshell.def
  *  and the template file   options
  *
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
  *
  *  AutoOpts is a copyrighted work.  This header file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -19,7 +19,7 @@
  * The genshellopt program is copyrighted and licensed
  * under the following terms:
  *
- *  Copyright (C) 1999-2014 Bruce Korb, all rights reserved.
+ *  Copyright (C) 1999-2018 Bruce Korb, all rights reserved.
  *  This is free software. It is licensed for use, modification and
  *  redistribution under the terms of the GNU Lesser General Public License,
  *  version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>
@@ -47,6 +47,8 @@
 #ifndef AUTOOPTS_GENSHELL_H_GUARD
 #define AUTOOPTS_GENSHELL_H_GUARD 1
 #include <autoopts/options.h>
+#include <stdarg.h>
+#include <stdnoreturn.h>
 
 /**
  *  Ensure that the library used for compiling this generated header is at
@@ -55,13 +57,19 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 167937
+#define AO_TEMPLATE_VERSION 172033
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
   Choke Me.
 #endif
 
+#if GCC_VERSION > 40400
+#define NOT_REACHED __builtin_unreachable();
+#else
+#define NOT_REACHED
+#endif
+
 /**
  *  Enumeration of each option type for genshellopt
  */
@@ -150,6 +158,12 @@ typedef enum {
 #ifdef  __cplusplus
 extern "C" {
 #endif
+/*
+ *  global exported definitions
+ */
+#define ch_t  unsigned char
+#define cc_t  const unsigned char
+#define cch_t char const
 
 
 /* * * * * *
@@ -201,6 +215,7 @@ static inline char* aoGetsText(char const* pz) {
 # endif
 #endif  /* ENABLE_NLS */
 
+
 #ifdef  __cplusplus
 }
 #endif

+ 7 - 5
libopts/gettext.h

@@ -1,5 +1,5 @@
 /* Convenience header for conditional use of GNU <libintl.h>.
-   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2016 Free Software
+   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2018 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -13,13 +13,14 @@
    GNU Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public License along
-   with this program; if not, see <http://www.gnu.org/licenses/>.  */
+   with this program; if not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _LIBGETTEXT_H
 #define _LIBGETTEXT_H 1
 
-/* NLS can be disabled through the configure --disable-nls option.  */
-#if ENABLE_NLS
+/* NLS can be disabled through the configure --disable-nls option
+   or through "#define ENABLE NLS 0" before including this file.  */
+#if defined ENABLE_NLS && ENABLE_NLS
 
 /* Get declarations of GNU message catalog functions.  */
 # include <libintl.h>
@@ -184,7 +185,8 @@ npgettext_aux (const char *domain,
 #include <string.h>
 
 #if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
-     /* || __STDC_VERSION__ >= 199901L */ )
+     /* || __STDC_VERSION__ == 199901L
+        || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ )
 # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
 #else
 # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0

+ 4 - 9
libopts/init.c

@@ -9,7 +9,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -28,11 +28,6 @@
  *  13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239  COPYING.mbsd
  */
 
-/* = = = START-STATIC-FORWARD = = = */
-static tSuccess
-do_presets(tOptions * opts);
-/* = = = END-STATIC-FORWARD = = = */
-
 /**
  *  Make sure the option descriptor is there and that we understand it.
  *  This should be called from any user entry point where one needs to
@@ -46,7 +41,7 @@ do_presets(tOptions * opts);
  *  @param[in]     pname  name of program, from argv[]
  *  @returns SUCCESS or FAILURE
  */
-LOCAL tSuccess
+static tSuccess
 validate_struct(tOptions * opts, char const * pname)
 {
     if (opts == NULL) {
@@ -142,7 +137,7 @@ validate_struct(tOptions * opts, char const * pname)
  *  @param pOpts   program options descriptor
  *  @returns SUCCESS or FAILURE
  */
-LOCAL tSuccess
+static tSuccess
 immediate_opts(tOptions * opts)
 {
     tSuccess  res;
@@ -247,7 +242,7 @@ do_presets(tOptions * opts)
  * @param[in]     a_ct  program argument count
  * @param[in]     a_v   program argument vector
  */
-LOCAL bool
+static bool
 ao_initialize(tOptions * opts, int a_ct, char ** a_v)
 {
     if ((opts->fOptSet & OPTPROC_INITDONE) != 0)

+ 95 - 52
libopts/intprops.h

@@ -1,6 +1,6 @@
 /* intprops.h -- properties of integer types
 
-   Copyright (C) 2001-2016 Free Software Foundation, Inc.
+   Copyright (C) 2001-2018 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU Lesser General Public License as published
@@ -13,7 +13,7 @@
    GNU Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert.  */
 
@@ -26,7 +26,7 @@
 #define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
 
 /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
-   <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00406.html>.  */
+   <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>.  */
 #define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
 
 /* The extra casts in the following macros work around compiler bugs,
@@ -46,12 +46,16 @@
 
 /* Minimum and maximum values for integer types and expressions.  */
 
+/* The width in bits of the integer type or expression T.
+   Padding bits are not supported; this is checked at compile-time below.  */
+#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
+
 /* The maximum and minimum values for the integer type T.  */
 #define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t))
 #define TYPE_MAXIMUM(t)                                                 \
   ((t) (! TYPE_SIGNED (t)                                               \
         ? (t) -1                                                        \
-        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+        : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1)))
 
 /* The maximum and minimum values for the type of the expression E,
    after integer promotion.  E should not have side effects.  */
@@ -64,12 +68,23 @@
    ? _GL_SIGNED_INT_MAXIMUM (e)                                         \
    : _GL_INT_NEGATE_CONVERT (e, 1))
 #define _GL_SIGNED_INT_MAXIMUM(e)                                       \
-  (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
+  (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1)
+
+/* Work around OpenVMS incompatibility with C99.  */
+#if !defined LLONG_MAX && defined __INT64_MAX
+# define LLONG_MAX __INT64_MAX
+# define LLONG_MIN __INT64_MIN
+#endif
 
+/* This include file assumes that signed types are two's complement without
+   padding bits; the above macros have undefined behavior otherwise.
+   If this is a problem for you, please let us know how to fix it for your host.
+   This assumption is tested by the intprops-tests module.  */
 
 /* Does the __typeof__ keyword work?  This could be done by
    'configure', but for now it's easier to do it by hand.  */
-#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
+#if (2 <= __GNUC__ \
+     || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
      || (0x5110 <= __SUNPRO_C && !__STDC__))
 # define _GL_HAVE___TYPEOF__ 1
 #else
@@ -98,8 +113,7 @@
    signed, this macro may overestimate the true bound by one byte when
    applied to unsigned types of size 2, 4, 16, ... bytes.  */
 #define INT_STRLEN_BOUND(t)                                     \
-  (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT                 \
-                          - _GL_SIGNED_TYPE_OR_EXPR (t))        \
+  (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \
    + _GL_SIGNED_TYPE_OR_EXPR (t))
 
 /* Bound on buffer size needed to represent an integer type or expression T,
@@ -165,7 +179,7 @@
 /* Return 1 if A * B would overflow in [MIN,MAX] arithmetic.
    See above for restrictions.  Avoid && and || as they tickle
    bugs in Sun C 5.11 2010/08/13 and other compilers; see
-   <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>.  */
+   <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>.  */
 #define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max)     \
   ((b) < 0                                              \
    ? ((a) < 0                                           \
@@ -204,24 +218,42 @@
    ? (a) < (min) >> (b)                                 \
    : (max) >> (b) < (a))
 
+/* True if __builtin_add_overflow (A, B, P) works when P is non-null.  */
+#if 5 <= __GNUC__ && !defined __ICC
+# define _GL_HAS_BUILTIN_OVERFLOW 1
+#else
+# define _GL_HAS_BUILTIN_OVERFLOW 0
+#endif
+
+/* True if __builtin_add_overflow_p (A, B, C) works.  */
+#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
 
 /* The _GL*_OVERFLOW macros have the same restrictions as the
    *_RANGE_OVERFLOW macros, except that they do not assume that operands
    (e.g., A and B) have the same type as MIN and MAX.  Instead, they assume
    that the result (e.g., A + B) has that type.  */
-#define _GL_ADD_OVERFLOW(a, b, min, max)                                \
-  ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max)                  \
-   : (a) < 0 ? (b) <= (a) + (b)                                         \
-   : (b) < 0 ? (a) <= (a) + (b)                                         \
-   : (a) + (b) < (b))
-#define _GL_SUBTRACT_OVERFLOW(a, b, min, max)                           \
-  ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max)             \
-   : (a) < 0 ? 1                                                        \
-   : (b) < 0 ? (a) - (b) <= (a)                                         \
-   : (a) < (b))
-#define _GL_MULTIPLY_OVERFLOW(a, b, min, max)                           \
-  (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a))))       \
-   || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
+#if _GL_HAS_BUILTIN_OVERFLOW_P
+# define _GL_ADD_OVERFLOW(a, b, min, max)                               \
+   __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0)
+# define _GL_SUBTRACT_OVERFLOW(a, b, min, max)                          \
+   __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0)
+# define _GL_MULTIPLY_OVERFLOW(a, b, min, max)                          \
+   __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0)
+#else
+# define _GL_ADD_OVERFLOW(a, b, min, max)                                \
+   ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max)                  \
+    : (a) < 0 ? (b) <= (a) + (b)                                         \
+    : (b) < 0 ? (a) <= (a) + (b)                                         \
+    : (a) + (b) < (b))
+# define _GL_SUBTRACT_OVERFLOW(a, b, min, max)                           \
+   ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max)             \
+    : (a) < 0 ? 1                                                        \
+    : (b) < 0 ? (a) - (b) <= (a)                                         \
+    : (a) < (b))
+# define _GL_MULTIPLY_OVERFLOW(a, b, min, max)                           \
+   (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a))))       \
+    || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
+#endif
 #define _GL_DIVIDE_OVERFLOW(a, b, min, max)                             \
   ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max)  \
    : (a) < 0 ? (b) <= (a) + (b) - 1                                     \
@@ -286,8 +318,12 @@
   _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
 #define INT_SUBTRACT_OVERFLOW(a, b) \
   _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
-#define INT_NEGATE_OVERFLOW(a) \
-  INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+#if _GL_HAS_BUILTIN_OVERFLOW_P
+# define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a)
+#else
+# define INT_NEGATE_OVERFLOW(a) \
+   INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+#endif
 #define INT_MULTIPLY_OVERFLOW(a, b) \
   _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW)
 #define INT_DIVIDE_OVERFLOW(a, b) \
@@ -307,7 +343,7 @@
                       _GL_INT_MINIMUM (0 * (b) + (a)),          \
                       _GL_INT_MAXIMUM (0 * (b) + (a)))
 
-/* Compute A + B, A - B, A * B, respectively, storing the result into *R.
+/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R.
    Return 1 if the result overflows.  See above for restrictions.  */
 #define INT_ADD_WRAPV(a, b, r) \
   _GL_INT_OP_WRAPV (a, b, r, +, __builtin_add_overflow, INT_ADD_OVERFLOW)
@@ -316,10 +352,6 @@
 #define INT_MULTIPLY_WRAPV(a, b, r) \
   _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW)
 
-#ifndef __has_builtin
-# define __has_builtin(x) 0
-#endif
-
 /* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390.  See:
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
    https://llvm.org/bugs/show_bug.cgi?id=25390
@@ -332,20 +364,21 @@
 # define _GL__GENERIC_BOGUS 0
 #endif
 
-/* Store A <op> B into *R, where OP specifies the operation.
-   BUILTIN is the builtin operation, and OVERFLOW the overflow predicate.
-   See above for restrictions.  */
-#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow)
+/* Store the low-order bits of A <op> B into *R, where OP specifies
+   the operation.  BUILTIN is the builtin operation, and OVERFLOW the
+   overflow predicate.  Return 1 if the result overflows.  See above
+   for restrictions.  */
+#if _GL_HAS_BUILTIN_OVERFLOW
 # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r)
 #elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
 # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
    (_Generic \
     (*(r), \
      signed char: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
                         signed char, SCHAR_MIN, SCHAR_MAX), \
      short int: \
-       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
                         short int, SHRT_MIN, SHRT_MAX), \
      int: \
        _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
@@ -359,10 +392,10 @@
 #else
 # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
    (sizeof *(r) == sizeof (signed char) \
-    ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \
+    ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
                        signed char, SCHAR_MIN, SCHAR_MAX) \
     : sizeof *(r) == sizeof (short int) \
-    ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \
+    ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
                        short int, SHRT_MIN, SHRT_MAX) \
     : sizeof *(r) == sizeof (int) \
     ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
@@ -378,14 +411,14 @@
 # else
 #  define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
     _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
-                     long int, LONG_MIN, LONG_MAX))
+                     long int, LONG_MIN, LONG_MAX)
 # endif
 #endif
 
 /* Store the low-order bits of A <op> B into *R, where the operation
    is given by OP.  Use the unsigned type UT for calculation to avoid
-   overflow problems.  *R's type is T, with extremal values TMIN and
-   TMAX.  T must be a signed integer type.  */
+   overflow problems.  *R's type is T, with extrema TMIN and TMAX.
+   T must be a signed integer type.  Return 1 if the result overflows.  */
 #define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
   (sizeof ((a) op (b)) < sizeof (t) \
    ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \
@@ -394,17 +427,27 @@
   ((overflow (a, b) \
     || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \
     || (tmax) < ((a) op (b))) \
-   ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 1) \
-   : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 0))
-
-/* Return A <op> B, where the operation is given by OP.  Use the
-   unsigned type UT for calculation to avoid overflow problems.
-   Convert the result to type T without overflow by subtracting TMIN
-   from large values before converting, and adding it afterwards.
-   Compilers can optimize all the operations except OP.  */
-#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t, tmin, tmax) \
-  (((ut) (a) op (ut) (b)) <= (tmax) \
-   ? (t) ((ut) (a) op (ut) (b)) \
-   : ((t) (((ut) (a) op (ut) (b)) - (tmin)) + (tmin)))
+   ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
+   : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
+
+/* Return the low-order bits of A <op> B, where the operation is given
+   by OP.  Use the unsigned type UT for calculation to avoid undefined
+   behavior on signed integer overflow, and convert the result to type T.
+   UT is at least as wide as T and is no narrower than unsigned int,
+   T is two's complement, and there is no padding or trap representations.
+   Assume that converting UT to T yields the low-order bits, as is
+   done in all known two's-complement C compilers.  E.g., see:
+   https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html
+
+   According to the C standard, converting UT to T yields an
+   implementation-defined result or signal for values outside T's
+   range.  However, code that works around this theoretical problem
+   runs afoul of a compiler bug in Oracle Studio 12.3 x86.  See:
+   https://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html
+   As the compiler bug is real, don't try to work around the
+   theoretical problem.  */
+
+#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \
+  ((t) ((ut) (a) op (ut) (b)))
 
 #endif /* _GL_INTPROPS_H */

+ 4 - 2
libopts/libopts.c

@@ -1,9 +1,9 @@
 #define  AUTOOPTS_INTERNAL 1
 #include "autoopts/project.h"
-#define  LOCAL static
+
 #include "ao-strs.h"
 static char const ao_ver_string[] =
-    "41:1:16\n";
+    "42:1:17\n";
 #include "autoopts/options.h"
 #include "autoopts/usage-txt.h"
 #include "genshell.h"
@@ -11,12 +11,14 @@ static char const ao_ver_string[] =
 #include "option-value-type.h"
 #include "ao-strs.h"
 #include "ag-char-map.h"
+#include "save-flags.h"
 #include "autoopts.h"
 #include "proto.h"
 #include "parse-duration.c"
 #include "ao-strs.c"
 #include "option-value-type.c"
 #include "option-xat-attribute.c"
+#include "save-flags.c"
 #include "autoopts.c"
 #include "alias.c"
 #include "boolean.c"

+ 5 - 25
libopts/load.c

@@ -12,7 +12,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -31,26 +31,6 @@
  *  13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239  COPYING.mbsd
  */
 
-/* = = = START-STATIC-FORWARD = = = */
-static bool
-get_realpath(char * buf, size_t b_sz);
-
-static bool
-add_prog_path(char * buf, int b_sz, char const * fname, char const * prg_path);
-
-static bool
-add_env_val(char * buf, int buf_sz, char const * name);
-
-static char *
-assemble_arg_val(char * txt, tOptionLoadMode mode);
-
-static char *
-trim_quotes(char * arg);
-
-static bool
-direction_ok(opt_state_mask_t f, int dir);
-/* = = = END-STATIC-FORWARD = = = */
-
 static bool
 get_realpath(char * buf, size_t b_sz)
 {
@@ -314,7 +294,7 @@ add_env_val(char * buf, int buf_sz, char const * name)
  * @param[in,out] txt  the input and output string
  * @param[in]     mode the handling mode (cooking method)
  */
-LOCAL void
+static void
 munge_str(char * txt, tOptionLoadMode mode)
 {
     char * end;
@@ -445,7 +425,7 @@ direction_ok(opt_state_mask_t f, int dir)
         if (PRESETTING(dir)) {
             /*
              *  We are in the presetting direction with an option we handle
-             *  immediately for disablement, but normally for disablement.
+             *  immediately for disablement, but normally for handling.
              *  Therefore, skip if NOT disabled.
              */
             if ((f & OPTST_DISABLED) != 0)
@@ -453,7 +433,7 @@ direction_ok(opt_state_mask_t f, int dir)
         } else {
             /*
              *  We are in the processing direction with an option we handle
-             *  immediately for disablement, but normally for disablement.
+             *  immediately for disablement, but normally for handling.
              *  Therefore, skip if disabled.
              */
             if ((f & OPTST_DISABLED) == 0)
@@ -486,7 +466,7 @@ direction_ok(opt_state_mask_t f, int dir)
  * @param[in]     direction  current processing direction (preset or not)
  * @param[in]     load_mode  option loading mode (OPTION_LOAD_*)
  */
-LOCAL void
+static void
 load_opt_line(tOptions * opts, tOptState * opt_state, char * line,
               tDirection direction, tOptionLoadMode load_mode )
 {

+ 17 - 19
libopts/m4/libopts.m4

@@ -1,14 +1,8 @@
-dnl  -*- buffer-read-only: t -*- vi: set ro:
-dnl
-dnl DO NOT EDIT THIS FILE   (libopts.m4)
-dnl
-dnl It has been AutoGen-ed
-dnl From the definitions    libopts.def
-dnl and the template file   conftest.tpl
-dnl
+
 dnl do always before generated macros:
 dnl
 AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
+  AC_REQUIRE([AC_HEADER_STDC])
   AC_HEADER_DIRENT
 
   # =================
@@ -113,6 +107,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
   AC_PROG_SED
   [while :
   do
+      test -x "$POSIX_SHELL" && break
       POSIX_SHELL=`which bash`
       test -x "$POSIX_SHELL" && break
       POSIX_SHELL=`which dash`
@@ -234,9 +229,9 @@ int main() {
     fputs( "error: regex -->.<-- did not match\n", stderr );
     return 1;
   }
-  return 0; }])],
+  return 0; }] )],
     [libopts_cv_with_libregex=yes], [libopts_cv_with_libregex=no],
-    [libopts_cv_with_libregex=no]) # end of AC_RUN_IFELSE 
+    [libopts_cv_with_libregex=no]) # end of AC_RUN_IFELSE
   ]) # end of AC_CACHE_VAL for libopts_cv_with_libregex
   fi ## disabled by request
   AC_MSG_RESULT([${libopts_cv_with_libregex}])
@@ -264,7 +259,7 @@ AC_DEFUN([LIBOPTS_RUN_PATHFIND],[
 int main (int argc, char ** argv) {
    char * pz = pathfind( getenv( "PATH" ), "sh", "x" );
    return (pz == 0) ? 1 : 0;
-}])],
+}] )],
     [libopts_cv_run_pathfind=yes],[libopts_cv_run_pathfind=no],[libopts_cv_run_pathfind=no]
   ) # end of RUN_IFELSE
   ]) # end of AC_CACHE_VAL for libopts_cv_run_pathfind
@@ -312,7 +307,7 @@ choke me!!
 @%:@endif
    char *pz = realpath(argv@<:@0@:>@, zPath);
    return (pz == zPath) ? 0 : 1;
-}])],
+}] )],
     [libopts_cv_run_realpath=yes],[libopts_cv_run_realpath=no],[libopts_cv_run_realpath=no]
   ) # end of RUN_IFELSE
   ]) # end of AC_CACHE_VAL for libopts_cv_run_realpath
@@ -345,7 +340,7 @@ int main() {
   tm.tm_yday  = 239; /* days since January 1 @<:@0, 365@:>@ */
   tm.tm_isdst =  1;  /* flag for daylight savings time */
   strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
-  return (strcmp( t_buf, z ) != 0); }])],
+  return (strcmp( t_buf, z ) != 0); }] )],
     [libopts_cv_run_strftime=yes],[libopts_cv_run_strftime=no],[libopts_cv_run_strftime=no]
   ) # end of RUN_IFELSE
   ]) # end of AC_CACHE_VAL for libopts_cv_run_strftime
@@ -365,7 +360,7 @@ AC_DEFUN([LIBOPTS_RUN_FOPEN_BINARY],[
   AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <stdio.h>
 int main (int argc, char ** argv) {
 FILE * fp = fopen("conftest.@S|@ac_ext", "rb");
-return (fp == NULL) ? 1 : fclose(fp); }])],
+return (fp == NULL) ? 1 : fclose(fp); }] )],
     [libopts_cv_run_fopen_binary=yes],[libopts_cv_run_fopen_binary=no],[libopts_cv_run_fopen_binary=no]
   ) # end of RUN_IFELSE
   ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
@@ -388,7 +383,7 @@ AC_DEFUN([LIBOPTS_RUN_FOPEN_TEXT],[
   AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <stdio.h>
 int main (int argc, char ** argv) {
 FILE * fp = fopen("conftest.@S|@ac_ext", "rt");
-return (fp == NULL) ? 1 : fclose(fp); }])],
+return (fp == NULL) ? 1 : fclose(fp); }] )],
     [libopts_cv_run_fopen_text=yes],[libopts_cv_run_fopen_text=no],[libopts_cv_run_fopen_text=no]
   ) # end of RUN_IFELSE
   ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
@@ -460,7 +455,7 @@ dnl the config tests that the library needs.  Invoke the
 dnl "INVOKE_LIBOPTS_MACROS" macro iff we are building libopts.
 dnl
 dnl  This file is part of AutoGen.
-dnl  AutoGen Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+dnl  AutoGen Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
 dnl
 dnl  AutoGen is free software: you can redistribute it and/or modify it
 dnl  under the terms of the GNU General Public License as published by the
@@ -483,7 +478,8 @@ AC_DEFUN([LIBOPTS_CHECK_COMMON],[
   m4_pushdef([AO_Libopts_Dir],
 	    [ifelse($1, , [libopts], [$1])])
   AC_ARG_ENABLE([local-libopts],
-    AS_HELP_STRING([--enable-local-libopts],[Use the supplied libopts tearoff code]),[
+    AC_HELP_STRING([--enable-local-libopts],
+       [Use the supplied libopts tearoff code]),[
     if test x$enableval = xyes ; then
        AC_MSG_NOTICE([Using supplied libopts tearoff])
        LIBOPTS_CFLAGS='-I$(top_srcdir)/AO_Libopts_Dir'
@@ -492,13 +488,15 @@ AC_DEFUN([LIBOPTS_CHECK_COMMON],[
     fi])
 
   AC_ARG_ENABLE([libopts-install],
-    AS_HELP_STRING([--enable-libopts-install],[Install libopts with client installation]))
+    AC_HELP_STRING([--enable-libopts-install],
+       [Install libopts with client installation]))
   AM_CONDITIONAL([INSTALL_LIBOPTS],[test "X${enable_libopts_install}" = Xyes])
 
   [if test -z "${NEED_LIBOPTS_DIR}" ; then]
      AC_MSG_CHECKING([whether autoopts-config can be found])
      AC_ARG_WITH([autoopts-config],
-        AS_HELP_STRING([--with-autoopts-config],[specify the config-info script]),
+        AC_HELP_STRING([--with-autoopts-config],
+             [specify the config-info script]),
         [lo_cv_with_autoopts_config=${with_autoopts_config}],
         AC_CACHE_CHECK([whether autoopts-config is specified],
              [lo_cv_with_autoopts_config],

+ 1 - 1
libopts/m4/liboptschk.m4

@@ -1,5 +1,5 @@
 # liboptschk.m4 serial 2 (autogen - 5.11.4)
-dnl Copyright (C) 2005-2015 by Bruce Korb - all rights reserved
+dnl Copyright (C) 2005-2018 by Bruce Korb - all rights reserved
 dnl
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,

+ 38 - 28
libopts/m4/stdnoreturn.m4

@@ -1,6 +1,6 @@
 # Check for stdnoreturn.h that conforms to C11.
 
-dnl Copyright 2012-2016 Free Software Foundation, Inc.
+dnl Copyright 2012-2018 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -9,33 +9,43 @@ dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_STDNORETURN_H],
 [
-  AC_CACHE_CHECK([for working stdnoreturn.h],
-    [gl_cv_header_working_stdnoreturn_h],
-    [AC_COMPILE_IFELSE(
-       [AC_LANG_PROGRAM(
-          [[#include <stdlib.h>
-            #include <stdnoreturn.h>
-            /* Do not check for 'noreturn' after the return type.
-               C11 allows it, but it's rarely done that way
-               and circa-2012 bleeding-edge GCC rejects it when given
-               -Werror=old-style-declaration.  */
-            noreturn void foo1 (void) { exit (0); }
-            _Noreturn void foo2 (void) { exit (0); }
-            int testit (int argc, char **argv) {
-              if (argc & 1)
-                return 0;
-              (argv[0][0] ? foo1 : foo2) ();
-            }
-          ]])],
-       [gl_cv_header_working_stdnoreturn_h=yes],
-       [gl_cv_header_working_stdnoreturn_h=no])])
-
-  if test $gl_cv_header_working_stdnoreturn_h = yes; then
-    STDNORETURN_H=''
-  else
-    STDNORETURN_H='stdnoreturn.h'
-  fi
-
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    cygwin*)
+      dnl Regardless whether a working <stdnoreturn.h> exists or not,
+      dnl we need our own <stdnoreturn.h>, because of the definition
+      dnl of _Noreturn done by gnulib-common.m4.
+      STDNORETURN_H='stdnoreturn.h'
+      ;;
+    *)
+      AC_CACHE_CHECK([for working stdnoreturn.h],
+        [gl_cv_header_working_stdnoreturn_h],
+        [AC_COMPILE_IFELSE(
+           [AC_LANG_PROGRAM(
+              [[#include <stdlib.h>
+                #include <stdnoreturn.h>
+                /* Do not check for 'noreturn' after the return type.
+                   C11 allows it, but it's rarely done that way
+                   and circa-2012 bleeding-edge GCC rejects it when given
+                   -Werror=old-style-declaration.  */
+                noreturn void foo1 (void) { exit (0); }
+                _Noreturn void foo2 (void) { exit (0); }
+                int testit (int argc, char **argv)
+                {
+                  if (argc & 1)
+                    return 0;
+                  (argv[0][0] ? foo1 : foo2) ();
+                }
+              ]])],
+           [gl_cv_header_working_stdnoreturn_h=yes],
+           [gl_cv_header_working_stdnoreturn_h=no])])
+      if test $gl_cv_header_working_stdnoreturn_h = yes; then
+        STDNORETURN_H=''
+      else
+        STDNORETURN_H='stdnoreturn.h'
+      fi
+      ;;
+  esac
   AC_SUBST([STDNORETURN_H])
   AM_CONDITIONAL([GL_GENERATE_STDNORETURN_H], [test -n "$STDNORETURN_H"])
 ])

+ 15 - 54
libopts/makeshell.c

@@ -11,7 +11,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -35,45 +35,7 @@
 #define UPPER(_c) (toupper(to_uchar(_c)))
 #define LOWER(_c) (tolower(to_uchar(_c)))
 
-/* = = = START-STATIC-FORWARD = = = */
-static void
-emit_var_text(char const * prog, char const * var, int fdin);
-
-static void
-text_to_var(tOptions * opts, teTextTo which, tOptDesc * od);
-
-static void
-emit_usage(tOptions * opts);
-
-static void
-emit_wrapup(tOptions * opts);
-
-static void
-emit_setup(tOptions * opts);
-
-static void
-emit_action(tOptions * opts, tOptDesc * od);
-
-static void
-emit_inaction(tOptions * opts, tOptDesc * od);
-
-static void
-emit_flag(tOptions * opts);
-
-static void
-emit_match_expr(char const * name, tOptDesc * cod, tOptions * opts);
-
-static void
-emit_long(tOptions * opts);
-
-static char *
-load_old_output(char const * fname, char const * pname);
-
-static void
-open_out(char const * fname, char const * pname);
-/* = = = END-STATIC-FORWARD = = = */
-
-LOCAL noreturn void
+noreturn static void
 option_exits(int exit_code)
 {
     if (print_exit)
@@ -81,21 +43,21 @@ option_exits(int exit_code)
     exit(exit_code);
 }
 
-LOCAL noreturn void
+noreturn static void
 ao_bug(char const * msg)
 {
     fprintf(stderr, zao_bug_msg, msg);
     option_exits(EX_SOFTWARE);
 }
 
-LOCAL void
+static void
 fserr_warn(char const * prog, char const * op, char const * fname)
 {
     fprintf(stderr, zfserr_fmt, prog, errno, strerror(errno),
             op, fname);
 }
 
-LOCAL noreturn void
+noreturn static void
 fserr_exit(char const * prog, char const * op, char const * fname)
 {
     fserr_warn(prog, op, fname);
@@ -322,11 +284,11 @@ text_to_var(tOptions * opts, teTextTo which, tOptDesc * od)
         switch (which) {
         case TT_LONGUSAGE:
             (*(opts->pUsageProc))(opts, EXIT_SUCCESS);
-            /* fall through */
+            /* FALLTHROUGH */ /* NOTREACHED */
 
         case TT_USAGE:
             (*(opts->pUsageProc))(opts, EXIT_FAILURE);
-            /* fall through */
+            /* FALLTHROUGH */ /* NOTREACHED */
 
         case TT_VERSION:
             if (od->fOptState & OPTST_ALLOC_ARG) {
@@ -335,13 +297,13 @@ text_to_var(tOptions * opts, teTextTo which, tOptDesc * od)
             }
             od->optArg.argString = "c";
             optionPrintVersion(opts, od);
-            /* fall through */
+            /* FALLTHROUGH */ /* NOTREACHED */
 
         default:
             option_exits(EXIT_FAILURE);
-            /* fall through */
+            /* FALLTHROUGH */ /* NOTREACHED */
         }
-        /* fall through */
+        /* FALLTHROUGH */ /* NOTREACHED */
 
     default:
         close(fdpair[1]);
@@ -885,14 +847,12 @@ genshelloptUsage(tOptions * opts, int exit_cd)
     switch (fork()) {
     case -1:
         optionUsage(opts, EXIT_FAILURE);
-        /* fall through */
+        /* FALLTHROUGH */ /* NOTREACHED */
 
     case 0:
         pagerState = PAGER_STATE_CHILD;
         optionUsage(opts, EXIT_SUCCESS);
-        /* NOTREACHED */
-        _exit(EXIT_FAILURE);
-        /* fall through */
+        /* FALLTHROUGH */ /* NOTREACHED */
 
     default:
     {
@@ -928,10 +888,11 @@ genshelloptUsage(tOptions * opts, int exit_cd)
     switch (fork()) {
     case 0:
         pagerState = PAGER_STATE_CHILD;
-        /* fall through */
+        /*FALLTHROUGH*/
     case -1:
         optionUsage(optionParseShellOptions, EXIT_FAILURE);
-        /* fall through */
+        /* FALLTHROUGH */ /* NOTREACHED */
+
     default:
     {
         int  sts;

+ 6 - 48
libopts/nested.c

@@ -12,7 +12,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -37,7 +37,7 @@ typedef struct {
     char    xml_txt[8];
 } xml_xlate_t;
 
-static xml_xlate_t const xml_xlate[] = {
+  static xml_xlate_t const xml_xlate[] = {
     { '&', 4, "amp;"  },
     { '<', 3, "lt;"   },
     { '>', 3, "gt;"   },
@@ -49,48 +49,6 @@ static xml_xlate_t const xml_xlate[] = {
 #define ENOMSG ENOENT
 #endif
 
-/* = = = START-STATIC-FORWARD = = = */
-static void
-remove_continuation(char * src);
-
-static char const *
-scan_q_str(char const * pzTxt);
-
-static tOptionValue *
-add_string(void ** pp, char const * name, size_t nm_len,
-           char const * val, size_t d_len);
-
-static tOptionValue *
-add_bool(void ** pp, char const * name, size_t nm_len,
-         char const * val, size_t d_len);
-
-static tOptionValue *
-add_number(void ** pp, char const * name, size_t nm_len,
-           char const * val, size_t d_len);
-
-static tOptionValue *
-add_nested(void ** pp, char const * name, size_t nm_len,
-           char * val, size_t d_len);
-
-static char const *
-scan_name(char const * name, tOptionValue * res);
-
-static char const *
-unnamed_xml(char const * txt);
-
-static char const *
-scan_xml_name(char const * name, size_t * nm_len, tOptionValue * val);
-
-static char const *
-find_end_xml(char const * src, size_t nm_len, char const * val, size_t * len);
-
-static char const *
-scan_xml(char const * xml_name, tOptionValue * res_val);
-
-static void
-sort_list(tArgList * arg_list);
-/* = = = END-STATIC-FORWARD = = = */
-
 /**
  *  Backslashes are used for line continuations.  We keep the newline
  *  characters, but trim out the backslash:
@@ -638,7 +596,7 @@ bail_scan_xml:
  *  an internal call, so it is not validated.  The caller is responsible for
  *  knowing what they are doing.
  */
-LOCAL void
+static void
 unload_arg_list(tArgList * arg_list)
 {
     int ct = arg_list->useCt;
@@ -743,7 +701,7 @@ sort_list(tArgList * arg_list)
  *  @code{ENOMSG} no configuration values were found
  *  @end itemize
 =*/
-LOCAL tOptionValue *
+static tOptionValue *
 optionLoadNested(char const * text, char const * name, size_t nm_len)
 {
     tOptionValue * res_val;
@@ -866,7 +824,7 @@ optionNestedVal(tOptions * opts, tOptDesc * od)
 /**
  * get_special_char
  */
-LOCAL int
+static int
 get_special_char(char const ** ppz, int * ct)
 {
     char const * pz = *ppz;
@@ -918,7 +876,7 @@ get_special_char(char const ** ppz, int * ct)
 /**
  * emit_special_char
  */
-LOCAL void
+static void
 emit_special_char(FILE * fp, int ch)
 {
     int ctr = sizeof(xml_xlate) / sizeof(xml_xlate[0]);

+ 7 - 13
libopts/numeric.c

@@ -10,7 +10,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -136,20 +136,14 @@ optionNumericVal(tOptions * opts, tOptDesc * od)
     if ((od->fOptState & OPTST_SCALED_NUM) != 0)
         switch (*(pz++)) {
         case NUL:  pz--; break;
-        case 't':  val *= 1000;
-        /* fall through */
-        case 'g':  val *= 1000;
-        /* fall through */
-        case 'm':  val *= 1000;
-        /* fall through */
+        case 't':  val *= 1000; /* FALLTHROUGH */
+        case 'g':  val *= 1000; /* FALLTHROUGH */
+        case 'm':  val *= 1000; /* FALLTHROUGH */
         case 'k':  val *= 1000; break;
 
-        case 'T':  val *= 1024;
-        /* fall through */
-        case 'G':  val *= 1024;
-        /* fall through */
-        case 'M':  val *= 1024;
-        /* fall through */
+        case 'T':  val *= 1024; /* FALLTHROUGH */
+        case 'G':  val *= 1024; /* FALLTHROUGH */
+        case 'M':  val *= 1024; /* FALLTHROUGH */
         case 'K':  val *= 1024; break;
 
         default:   goto bad_number;

+ 5 - 5
libopts/option-value-type.c

@@ -31,7 +31,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "option-value-type.h"
-/* ANSI-C code produced by gperf version 3.0.4 */
+/* ANSI-C code produced by gperf version 3.1 */
 /* Command-line: gperf option-value-type.gp  */
 /* Computed positions: -k'1' */
 
@@ -64,7 +64,7 @@ typedef struct {
 /* maximum key range = 15, duplicates = 0 */
 
 static unsigned int
-option_value_type_hash (register const char *str, register unsigned int len)
+option_value_type_hash (register const char *str, register size_t len)
 {
   static const unsigned char asso_values[] =
     {
@@ -119,13 +119,13 @@ static const option_value_type_map_t option_value_type_table[] =
   };
 
 static inline const option_value_type_map_t *
-find_option_value_type_name (register const char *str, register unsigned int len)
+find_option_value_type_name (register const char *str, register size_t len)
 {
   if (len <= 14 && len >= 3)
     {
-      register int key = (int)option_value_type_hash (str, len);
+      register unsigned int key = (int)option_value_type_hash (str, len);
 
-      if (key <= 17 && key >= 0)
+      if (key <= 17)
         {
           register const char *s = option_value_type_table[key].vtp_name;
 

+ 5 - 5
libopts/option-xat-attribute.c

@@ -31,7 +31,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "option-xat-attribute.h"
-/* ANSI-C code produced by gperf version 3.0.4 */
+/* ANSI-C code produced by gperf version 3.1 */
 /* Command-line: gperf option-xat-attribute.gp  */
 /* Computed positions: -k'1' */
 
@@ -64,7 +64,7 @@ typedef struct {
 /* maximum key range = 6, duplicates = 0 */
 
 static unsigned int
-option_xat_attribute_hash (register const char *str, register unsigned int len)
+option_xat_attribute_hash (register const char *str, register size_t len)
 {
   static const unsigned char asso_values[] =
     {
@@ -111,13 +111,13 @@ static const option_xat_attribute_map_t option_xat_attribute_table[] =
   };
 
 static inline const option_xat_attribute_map_t *
-find_option_xat_attribute_name (register const char *str, register unsigned int len)
+find_option_xat_attribute_name (register const char *str, register size_t len)
 {
   if (len <= 8 && len >= 4)
     {
-      register int key = (int)option_xat_attribute_hash (str, len);
+      register unsigned int key = (int)option_xat_attribute_hash (str, len);
 
-      if (key <= 9 && key >= 0)
+      if (key <= 9)
         {
           register const char *s = option_xat_attribute_table[key].xat_name;
 

+ 2 - 2
libopts/parse-duration.c

@@ -1,5 +1,5 @@
 /* Parse a time duration and return a seconds count
-   Copyright (C) 2008-2016 Free Software Foundation, Inc.
+   Copyright (C) 2008-2018 Free Software Foundation, Inc.
    Written by Bruce Korb <bkorb@gnu.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
    GNU Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 

+ 3 - 3
libopts/parse-duration.h

@@ -1,5 +1,5 @@
 /* Parse a time duration and return a seconds count
-   Copyright (C) 2008-2016 Free Software Foundation, Inc.
+   Copyright (C) 2008-2018 Free Software Foundation, Inc.
    Written by Bruce Korb <bkorb@gnu.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
    GNU Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /*
 
@@ -22,7 +22,7 @@
 
   At the time of writing, this worked:
 
-  http://en.wikipedia.org/wiki/ISO_8601#Durations
+  https://en.wikipedia.org/wiki/ISO_8601#Durations
 
   The string must start with a 'P', 'T' or a digit.
 

+ 1 - 1
libopts/pgusage.c

@@ -13,7 +13,7 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control

+ 491 - 17
libopts/proto.h

@@ -1,19 +1,20 @@
 /* -*- buffer-read-only: t -*- vi: set ro:
  *
  * Prototypes for autoopts
- * Generated Mon Aug 29 14:35:37 PDT 2016
+ * Generated Sun Aug 26 10:44:39 PDT 2018
  */
 #ifndef AUTOOPTS_PROTO_H_GUARD
 #define AUTOOPTS_PROTO_H_GUARD 1
 
+
 /*
- *  Extracted from alias.c
+ * Static declarations from alias.c
  */
 static tSuccess
 too_many_occurrences(tOptions * opts, tOptDesc * od);
 
 /*
- *  Extracted from autoopts.c
+ * Static declarations from autoopts.c
  */
 static void *
 ao_malloc(size_t sz);
@@ -34,33 +35,151 @@ static tSuccess
 regular_opts(tOptions * opts);
 
 /*
- *  Extracted from check.c
+ * Static declarations from check.c
  */
 static bool
+has_conflict(tOptions * pOpts, tOptDesc * od);
+
+static bool
+occurs_enough(tOptions * pOpts, tOptDesc * pOD);
+
+static bool
 is_consistent(tOptions * pOpts);
 
 /*
- *  Extracted from configfile.c
+ * Static declarations from configfile.c
  */
 static void
+file_preset(tOptions * opts, char const * fname, int dir);
+
+static char *
+handle_comment(char * txt);
+
+static char *
+handle_cfg(tOptions * opts, tOptState * ost, char * txt, int dir);
+
+static char *
+handle_directive(tOptions * opts, char * txt);
+
+static char *
+aoflags_directive(tOptions * opts, char * txt);
+
+static char *
+program_directive(tOptions * opts, char * txt);
+
+static char *
+handle_section(tOptions * opts, char * txt);
+
+static int
+parse_xml_encoding(char ** ppz);
+
+static char *
+trim_xml_text(char * intxt, char const * pznm, tOptionLoadMode mode);
+
+static void
+cook_xml_text(char * pzData);
+
+static char *
+handle_struct(tOptions * opts, tOptState * ost, char * txt, int dir);
+
+static void
 intern_file_load(tOptions * opts);
 
 static char const *
 parse_attrs(tOptions * opts, char const * txt, tOptionLoadMode * pMode,
             tOptionValue * pType);
 
+static char const *
+parse_keyword(tOptions * opts, char const * txt, tOptionValue * typ);
+
+static char const *
+parse_set_mem(tOptions * opts, char const * txt, tOptionValue * typ);
+
+static char const *
+parse_value(char const * txt, tOptionValue * typ);
+
+/*
+ * Static declarations from cook.c
+ */
+static char *
+nl_count(char * start, char * end, int * lnct_p);
+
+static bool
+contiguous_quote(char ** pps, char * pq, int * lnct_p);
+
+/*
+ * Static declarations from enum.c
+ */
+static void
+enum_err(tOptions * pOpts, tOptDesc * pOD,
+         char const * const * paz_names, int name_ct);
+
+static uintptr_t
+find_name(char const * name, tOptions * pOpts, tOptDesc * pOD,
+          char const * const *  paz_names, unsigned int name_ct);
+
+static void
+set_memb_shell(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names,
+               unsigned int name_ct);
+
+static void
+set_memb_names(tOptions * opts, tOptDesc * od, char const * const * nm_list,
+               unsigned int nm_ct);
+
+static uintptr_t
+check_membership_start(tOptDesc * od, char const ** argp, bool * invert);
+
+static uintptr_t
+find_member_bit(tOptions * opts, tOptDesc * od, char const * pz, int len,
+                char const * const * nm_list, unsigned int nm_ct);
+
 /*
- *  Extracted from env.c
+ * Static declarations from env.c
  */
 static void
 doPrognameEnv(tOptions * pOpts, teEnvPresetType type);
 
 static void
+do_env_opt(tOptState * os, char * env_name,
+            tOptions * pOpts, teEnvPresetType type);
+
+static void
 env_presets(tOptions * pOpts, teEnvPresetType type);
 
 /*
- *  Extracted from find.c
+ * Static declarations from file.c
  */
+static void
+check_existence(teOptFileType ftype, tOptions * pOpts, tOptDesc * pOD);
+
+static void
+open_file_fd(tOptions * pOpts, tOptDesc * pOD, tuFileMode mode);
+
+static void
+fopen_file_fp(tOptions * pOpts, tOptDesc * pOD, tuFileMode mode);
+
+/*
+ * Static declarations from find.c
+ */
+static int
+parse_opt(char const ** nm_pp, char ** arg_pp, char * buf, size_t bufsz);
+
+static void
+opt_ambiguities(tOptions * opts, char const * name, int nm_len);
+
+static int
+opt_match_ct(tOptions * opts, char const * name, int nm_len,
+             int * ixp, bool * disable);
+
+static tSuccess
+opt_set(tOptions * opts, char * arg, int idx, bool disable, tOptState * st);
+
+static tSuccess
+opt_unknown(tOptions * opts, char const * name, char * arg, tOptState * st);
+
+static tSuccess
+opt_ambiguous(tOptions * opts, char const * name, int match_ct);
+
 static tSuccess
 opt_find_long(tOptions * opts, char const * opt_name, tOptState * state);
 
@@ -68,13 +187,22 @@ static tSuccess
 opt_find_short(tOptions * pOpts, uint_t optValue, tOptState * pOptState);
 
 static tSuccess
+get_opt_arg_must(tOptions * opts, tOptState * o_st);
+
+static tSuccess
+get_opt_arg_may(tOptions * pOpts, tOptState * o_st);
+
+static tSuccess
+get_opt_arg_none(tOptions * pOpts, tOptState * o_st);
+
+static tSuccess
 get_opt_arg(tOptions * opts, tOptState * o_st);
 
 static tSuccess
 find_opt(tOptions * opts, tOptState * o_st);
 
 /*
- *  Extracted from init.c
+ * Static declarations from init.c
  */
 static tSuccess
 validate_struct(tOptions * opts, char const * pname);
@@ -82,40 +210,137 @@ validate_struct(tOptions * opts, char const * pname);
 static tSuccess
 immediate_opts(tOptions * opts);
 
+static tSuccess
+do_presets(tOptions * opts);
+
 static bool
 ao_initialize(tOptions * opts, int a_ct, char ** a_v);
 
 /*
- *  Extracted from load.c
+ * Static declarations from load.c
  */
+static bool
+get_realpath(char * buf, size_t b_sz);
+
+static bool
+add_prog_path(char * buf, int b_sz, char const * fname, char const * prg_path);
+
+static bool
+add_env_val(char * buf, int buf_sz, char const * name);
+
 static void
 munge_str(char * txt, tOptionLoadMode mode);
 
+static char *
+assemble_arg_val(char * txt, tOptionLoadMode mode);
+
+static char *
+trim_quotes(char * arg);
+
+static bool
+direction_ok(opt_state_mask_t f, int dir);
+
 static void
 load_opt_line(tOptions * opts, tOptState * opt_state, char * line,
               tDirection direction, tOptionLoadMode load_mode );
 
 /*
- *  Extracted from makeshell.c
+ * Static declarations from makeshell.c
  */
-static noreturn void
+noreturn static void
 option_exits(int exit_code);
 
-static noreturn void
+noreturn static void
 ao_bug(char const * msg);
 
 static void
 fserr_warn(char const * prog, char const * op, char const * fname);
 
-static noreturn void
+noreturn static void
 fserr_exit(char const * prog, char const * op, char const * fname);
 
+static void
+emit_var_text(char const * prog, char const * var, int fdin);
+
+static void
+text_to_var(tOptions * opts, teTextTo which, tOptDesc * od);
+
+static void
+emit_usage(tOptions * opts);
+
+static void
+emit_wrapup(tOptions * opts);
+
+static void
+emit_setup(tOptions * opts);
+
+static void
+emit_action(tOptions * opts, tOptDesc * od);
+
+static void
+emit_inaction(tOptions * opts, tOptDesc * od);
+
+static void
+emit_flag(tOptions * opts);
+
+static void
+emit_match_expr(char const * name, tOptDesc * cod, tOptions * opts);
+
+static void
+emit_long(tOptions * opts);
+
+static char *
+load_old_output(char const * fname, char const * pname);
+
+static void
+open_out(char const * fname, char const * pname);
+
 /*
- *  Extracted from nested.c
+ * Static declarations from nested.c
  */
 static void
+remove_continuation(char * src);
+
+static char const *
+scan_q_str(char const * pzTxt);
+
+static tOptionValue *
+add_string(void ** pp, char const * name, size_t nm_len,
+           char const * val, size_t d_len);
+
+static tOptionValue *
+add_bool(void ** pp, char const * name, size_t nm_len,
+         char const * val, size_t d_len);
+
+static tOptionValue *
+add_number(void ** pp, char const * name, size_t nm_len,
+           char const * val, size_t d_len);
+
+static tOptionValue *
+add_nested(void ** pp, char const * name, size_t nm_len,
+           char * val, size_t d_len);
+
+static char const *
+scan_name(char const * name, tOptionValue * res);
+
+static char const *
+unnamed_xml(char const * txt);
+
+static char const *
+scan_xml_name(char const * name, size_t * nm_len, tOptionValue * val);
+
+static char const *
+find_end_xml(char const * src, size_t nm_len, char const * val, size_t * len);
+
+static char const *
+scan_xml(char const * xml_name, tOptionValue * res_val);
+
+static void
 unload_arg_list(tArgList * arg_list);
 
+static void
+sort_list(tArgList * arg_list);
+
 static tOptionValue *
 optionLoadNested(char const * text, char const * name, size_t nm_len);
 
@@ -126,21 +351,270 @@ static void
 emit_special_char(FILE * fp, int ch);
 
 /*
- *  Extracted from sort.c
+ * Static declarations from parse-duration.c
  */
+static unsigned long
+str_const_to_ul (cch_t * str, cch_t ** ppz, int base);
+
+static long
+str_const_to_l (cch_t * str, cch_t ** ppz, int base);
+
+static time_t
+scale_n_add (time_t base, time_t val, int scale);
+
+static time_t
+parse_hr_min_sec (time_t start, cch_t * pz);
+
+static time_t
+parse_scaled_value (time_t base, cch_t ** ppz, cch_t * endp, int scale);
+
+static time_t
+parse_year_month_day (cch_t * pz, cch_t * ps);
+
+static time_t
+parse_yearmonthday (cch_t * in_pz);
+
+static time_t
+parse_YMWD (cch_t * pz);
+
+static time_t
+parse_hour_minute_second (cch_t * pz, cch_t * ps);
+
+static time_t
+parse_hourminutesecond (cch_t * in_pz);
+
+static time_t
+parse_HMS (cch_t * pz);
+
+static time_t
+parse_time (cch_t * pz);
+
+static char *
+trim (char * pz);
+
+static time_t
+parse_period (cch_t * in_pz);
+
+static time_t
+parse_non_iso8601 (cch_t * pz);
+
+/*
+ * Static declarations from pgusage.c
+ */
+static inline FILE *
+open_tmp_usage(char ** buf);
+
+static inline char *
+mk_pager_cmd(char const * fname);
+
+/*
+ * Static declarations from putshell.c
+ */
+static size_t
+string_size(char const * scan, size_t nl_len);
+
+static char const *
+print_quoted_apostrophes(char const * str);
+
+static void
+print_quot_str(char const * str);
+
+static void
+print_enumeration(tOptions * pOpts, tOptDesc * pOD);
+
+static void
+print_membership(tOptions * pOpts, tOptDesc * pOD);
+
+static void
+print_stacked_arg(tOptions * pOpts, tOptDesc * pOD);
+
+static void
+print_reordering(tOptions * opts);
+
+/*
+ * Static declarations from reset.c
+ */
+static void
+optionReset(tOptions * pOpts, tOptDesc * pOD);
+
+static void
+optionResetEverything(tOptions * pOpts);
+
+/*
+ * Static declarations from restore.c
+ */
+static void
+fixupSavedOptionArgs(tOptions * pOpts);
+
+/*
+ * Static declarations from save.c
+ */
+static char const *
+find_dir_name(tOptions * opts, int * p_free);
+
+static char const *
+find_file_name(tOptions * opts, int * p_free_name);
+
+static void
+prt_entry(FILE * fp, tOptDesc * od, char const * l_arg, save_flags_mask_t save_fl);
+
+static void
+prt_value(FILE * fp, int depth, tOptDesc * od, tOptionValue const * ovp);
+
+static void
+prt_string(FILE * fp, char const * name, char const * pz);
+
+static void
+prt_val_list(FILE * fp, char const * name, tArgList * al);
+
+static void
+prt_nested(FILE * fp, tOptDesc * od, save_flags_mask_t save_fl);
+
+static void
+remove_settings(tOptions * opts, char const * fname);
+
+static FILE *
+open_sv_file(tOptions * opts, save_flags_mask_t save_fl);
+
+static void
+prt_no_arg_opt(FILE * fp, tOptDesc * vod, tOptDesc * pod, save_flags_mask_t save_fl);
+
+static void
+prt_str_arg(FILE * fp, tOptDesc * od, save_flags_mask_t save_fl);
+
+static void
+prt_enum_arg(FILE * fp, tOptDesc * od, save_flags_mask_t save_fl);
+
+static void
+prt_set_arg(FILE * fp, tOptDesc * od, save_flags_mask_t save_fl);
+
+static void
+prt_file_arg(FILE * fp, tOptDesc * od, tOptions * opts, save_flags_mask_t save_fl);
+
+/*
+ * Static declarations from sort.c
+ */
+static tSuccess
+must_arg(tOptions * opts, char * arg_txt, tOptState * pOS,
+         char ** opt_txt, uint32_t * opt_idx);
+
+static tSuccess
+maybe_arg(tOptions * opts, char * arg_txt, tOptState * pOS,
+          char ** opt_txt, uint32_t * opt_idx);
+
+static tSuccess
+short_opt_ck(tOptions * opts, char * arg_txt, tOptState * pOS,
+             char ** opt_txt, uint32_t * opt_idx);
+
 static void
 optionSort(tOptions * opts);
 
 /*
- *  Extracted from stack.c
+ * Static declarations from stack.c
  */
 static void
 addArgListEntry(void ** ppAL, void * entry);
 
 /*
- *  Extracted from usage.c
+ * Static declarations from text_mmap.c
  */
 static void
+load_text_file(tmap_info_t * mapinfo, char const * pzFile);
+
+static void
+validate_mmap(char const * fname, int prot, int flags, tmap_info_t * mapinfo);
+
+static void
+close_mmap_files(tmap_info_t * mi);
+
+/*
+ * Static declarations from tokenize.c
+ */
+static void
+copy_cooked(ch_t ** ppDest, char const ** ppSrc);
+
+static void
+copy_raw(ch_t ** ppDest, char const ** ppSrc);
+
+static token_list_t *
+alloc_token_list(char const * str);
+
+/*
+ * Static declarations from usage.c
+ */
+static unsigned int
+parse_usage_flags(ao_flag_names_t const * fnt, char const * txt);
+
+static void
 set_usage_flags(tOptions * opts, char const * flg_txt);
 
+static inline bool
+do_gnu_usage(tOptions * pOpts);
+
+static inline bool
+skip_misuse_usage(tOptions * pOpts);
+
+static void
+print_offer_usage(tOptions * opts);
+
+static void
+print_usage_details(tOptions * opts, int exit_code);
+
+static void
+print_one_paragraph(char const * text, bool plain, FILE * fp);
+
+static void
+prt_conflicts(tOptions * opts, tOptDesc * od);
+
+static void
+prt_one_vendor(tOptions *    opts,  tOptDesc *   od,
+               arg_types_t * argtp, char const * usefmt);
+
+static void
+prt_vendor_opts(tOptions * opts, char const * title);
+
+static void
+prt_extd_usage(tOptions * opts, tOptDesc * od, char const * title);
+
+static void
+prt_ini_list(char const * const * papz, char const * ini_file,
+             char const * path_nm);
+
+static void
+prt_preamble(tOptions * opts, tOptDesc * od, arg_types_t * at);
+
+static void
+prt_one_usage(tOptions * opts, tOptDesc * od, arg_types_t * at);
+
+static void
+prt_opt_usage(tOptions * opts, int ex_code, char const * title);
+
+static void
+prt_prog_detail(tOptions * opts);
+
+static int
+setGnuOptFmts(tOptions * opts, char const ** ptxt);
+
+static int
+setStdOptFmts(tOptions * opts, char const ** ptxt);
+
+/*
+ * Static declarations from version.c
+ */
+static void
+emit_first_line(
+    FILE * fp, char const * alt1, char const * alt2, char const * alt3);
+
+static void
+emit_simple_ver(tOptions * o, FILE * fp);
+
+static void
+emit_copy_full(tOptions * o, FILE * fp);
+
+static void
+emit_copy_note(tOptions * opts, FILE * fp);
+
+static void
+print_ver(tOptions * opts, tOptDesc * od, FILE * fp, bool call_exit);
+
 #endif /* AUTOOPTS_PROTO_H_GUARD */

+ 1 - 24
libopts/putshell.c

@@ -12,7 +12,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -31,29 +31,6 @@
  *  13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239  COPYING.mbsd
  */
 
-/* = = = START-STATIC-FORWARD = = = */
-static size_t
-string_size(char const * scan, size_t nl_len);
-
-static char const *
-print_quoted_apostrophes(char const * str);
-
-static void
-print_quot_str(char const * str);
-
-static void
-print_enumeration(tOptions * pOpts, tOptDesc * pOD);
-
-static void
-print_membership(tOptions * pOpts, tOptDesc * pOD);
-
-static void
-print_stacked_arg(tOptions * pOpts, tOptDesc * pOD);
-
-static void
-print_reordering(tOptions * opts);
-/* = = = END-STATIC-FORWARD = = = */
-
 /**
  * Count the number of bytes required to represent a string as a
  * compilable string.

+ 1 - 1
libopts/reset.c

@@ -10,7 +10,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control

+ 2 - 2
libopts/restore.c

@@ -12,7 +12,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -34,7 +34,7 @@
 /*
  *  optionFixupSavedOpts  Really, it just wipes out option state for
  *  options that are troublesome to copy.  viz., stacked strings and
- *  hierarchically valued option args.  We do duplicate string args that
+ *  hierarcicaly valued option args.  We do duplicate string args that
  *  have been marked as allocated though.
  */
 static void

+ 248 - 0
libopts/save-flags.c

@@ -0,0 +1,248 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *
+ *  DO NOT EDIT THIS FILE   (save-flags.c)
+ *
+ *  It has been AutoGen-ed
+ *  From the definitions    /tmp/.ag-ufBbQe/save-flags.def
+ *  and the template file   str2enum
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name ``Bruce Korb'' nor the name of any other
+ *    contributor may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * str2enum IS PROVIDED BY Bruce Korb ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL Bruce Korb OR ANY OTHER CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "save-flags.h"
+#include <sys/types.h>
+#ifndef MISSING_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+typedef enum {
+    SVFL_BNM_DEFAULT  = 0,
+    SVFL_BNM_USAGE    = 1,
+    SVFL_BNM_UPDATE   = 2,
+    SVFL_COUNT_BNM
+} save_flags_enum_t;
+
+static save_flags_enum_t
+find_save_flags_bnm(char const * str, size_t len);
+
+
+#include <sys/types.h>
+#include <string.h>
+#ifndef NUL
+#define NUL '\0'
+#endif
+
+/* ANSI-C code produced by gperf version 3.1 */
+/* Command-line: gperf save-flags.gp  */
+/* Computed positions: -k'' */
+
+
+# if 0 /* gperf build options: */
+// %struct-type
+// %language=ANSI-C
+// %includes
+// %global-table
+// %omit-struct-type
+// %readonly-tables
+// %compare-strncmp
+//
+// %define slot-name               svfl_name
+// %define hash-function-name      save_flags_hash
+// %define lookup-function-name    find_save_flags_name
+// %define word-array-name         save_flags_table
+// %define initializer-suffix      ,SVFL_COUNT_BNM
+//
+# endif
+
+#include "save-flags.h"
+typedef struct {
+    char const *    svfl_name;
+    save_flags_enum_t svfl_id;
+} save_flags_map_t;
+#include <string.h>
+
+/* maximum key range = 3, duplicates = 0 */
+
+static unsigned int
+save_flags_hash (register const char *str, register size_t len)
+{
+  (void)str;
+  (void)len;
+  return len;
+}
+
+static const save_flags_map_t save_flags_table[] =
+  {
+    {"",SVFL_COUNT_BNM}, {"",SVFL_COUNT_BNM},
+    {"",SVFL_COUNT_BNM}, {"",SVFL_COUNT_BNM},
+    {"",SVFL_COUNT_BNM},
+    {"usage",    SVFL_BNM_USAGE},
+    {"update",   SVFL_BNM_UPDATE},
+    {"default",  SVFL_BNM_DEFAULT}
+  };
+
+static inline const save_flags_map_t *
+find_save_flags_name (register const char *str, register size_t len)
+{
+  if (len <= 7 && len >= 5)
+    {
+      register unsigned int key = (int)save_flags_hash (str, len);
+
+      if (key <= 7)
+        {
+          register const char *s = save_flags_table[key].svfl_name;
+
+          if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
+            return &save_flags_table[key];
+        }
+    }
+  return 0;
+}
+
+/**
+ * Convert a command (keyword) to a save_flags_enum_t enumeration value.
+ *
+ * @param[in] str   a string that should start with a known key word.
+ * @param[in] len   the provided length of the keyword at \a str.
+ * @returns the enumeration value.
+ * If not found, that value is SVFL_COUNT_BNM.
+ */
+static save_flags_enum_t
+find_save_flags_bnm(char const * str, size_t len)
+{
+    save_flags_map_t const * map;
+
+    map = find_save_flags_name(str, (unsigned int)len);
+    if (map != NULL)
+        return map->svfl_id;
+    /* Check for a partial match */
+    {
+        /*
+         * Indexes of valid save_flags_table entries in sorted order:
+         */
+        static unsigned int const ix_map[] = {
+            7, 6, 5 };
+        save_flags_enum_t res = SVFL_COUNT_BNM;
+        static int const HI = (sizeof(ix_map) / sizeof(ix_map[0])) - 1;
+        int lo = 0;
+        int hi = HI;
+        int av;
+        int cmp;
+
+        for (;;) {
+            av  = (hi + lo) / 2;
+            map = save_flags_table + ix_map[av];
+            cmp = strncmp(map->svfl_name, str, len);
+            if (cmp == 0) break;
+            if (cmp > 0)
+                 hi = av - 1;
+            else lo = av + 1;
+            if (lo > hi)
+                return SVFL_COUNT_BNM;
+        }
+        res = map->svfl_id;
+        /*
+         * If we have an exact match, accept it.
+         */
+        if (map->svfl_name[len] == NUL)
+            return res;
+        /*
+         * Check for a duplicate partial match (a partial match
+         * with a higher or lower index than "av".
+         */
+        if (av < HI) {
+            map = save_flags_table + ix_map[av + 1];
+            if (strncmp(map->svfl_name, str, len) == 0)
+                return SVFL_COUNT_BNM;
+        }
+        if (av > 0) {
+            map = save_flags_table + ix_map[av - 1];
+            if (strncmp(map->svfl_name, str, len) == 0)
+                return SVFL_COUNT_BNM;
+        }
+        return res;
+    }
+}
+
+/**
+ * Convert a string to a save_flags_mask_t mask.
+ * Bit names prefixed with a hyphen have the bit removed from the mask.
+ * If the string starts with a '-', '+' or '|' character, then
+ * the old value is used as a base, otherwise the result mask
+ * is initialized to zero.  Separating bit names with '+' or '|'
+ * characters is optional.  By default, the bits are "or"-ed into the
+ * result.
+ *
+ * @param[in] str string with a list of bit names
+ * @param[in] old previous value, used if \a str starts with a '+' or '-'.
+ *
+ * @returns an unsigned integer with the bits set.
+ */
+save_flags_mask_t
+save_flags_str2mask(char const * str, save_flags_mask_t old)
+{
+    static char const white[] = ", \t\f";
+    static char const name_chars[] =
+        "adefglpstu"
+        "ADEFGLPSTU";
+
+    save_flags_mask_t res = 0;
+    int have_data = 0;
+
+    for (;;) {
+        save_flags_enum_t val;
+        unsigned int val_len;
+        unsigned int invert = 0;
+
+        str += strspn(str, white);
+        switch (*str) {
+        case NUL: return res;
+        case '-': case '~':
+            invert = 1;
+            /* FALLTHROUGH */
+
+        case '+': case '|':
+            if (have_data == 0)
+                res = old;
+
+            str += 1 + strspn(str + 1, white);
+            if (*str == NUL)
+                return 0;
+        }
+
+        val_len = strspn(str, name_chars);
+        if (val_len == 0)
+            return 0;
+        val = find_save_flags_bnm(str, val_len);
+        if (val == SVFL_COUNT_BNM)
+            return 0;
+        if (invert)
+            res &= ~((save_flags_mask_t)1 << val);
+        else
+            res |= (save_flags_mask_t)1 << val;
+        have_data = 1;
+        str += val_len;
+    }
+}
+/* end of save-flags.c */

+ 68 - 0
libopts/save-flags.h

@@ -0,0 +1,68 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *
+ *  DO NOT EDIT THIS FILE   (save-flags.h)
+ *
+ *  It has been AutoGen-ed
+ *  From the definitions    /tmp/.ag-ufBbQe/save-flags.def
+ *  and the template file   str2enum
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name ``Bruce Korb'' nor the name of any other
+ *    contributor may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * str2enum IS PROVIDED BY Bruce Korb ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL Bruce Korb OR ANY OTHER CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Command/Keyword Dispatcher
+ */
+#ifndef STR2ENUM_SAVE_FLAGS_H_GUARD
+#define STR2ENUM_SAVE_FLAGS_H_GUARD 1
+#include <sys/types.h>
+#include <inttypes.h>
+
+/** integral type for holding save_flags masks */
+typedef uint32_t save_flags_mask_t;
+
+/** bits defined for save_flags_mask_t */
+/** include default values in commentary */
+#define SVFL_DEFAULT            0x0001U
+/** include usage text in commentary */
+#define SVFL_USAGE              0x0002U
+/** replace or append state */
+#define SVFL_UPDATE             0x0004U
+
+/** bits in USAGE_DEFAULT mask:
+ *  usage   default */
+#define SVFL_USAGE_DEFAULT_MASK 0x0003U
+
+/** all bits in save_flags_mask_t masks */
+#define SVFL_MASK_ALL           0x0007U
+
+/** no bits in save_flags_mask_t */
+#define SVFL_NONE               0x0000U
+
+/** buffer size needed to hold all bit names for save_flags_mask_t masks */
+#define MAX_SAVE_FLAGS_NAME_SIZE 21
+
+extern save_flags_mask_t
+save_flags_str2mask(char const * str, save_flags_mask_t old);
+
+#endif /* STR2ENUM_SAVE_FLAGS_H_GUARD */
+/* end of save-flags.h */

+ 312 - 206
libopts/save.c

@@ -12,7 +12,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -30,49 +30,13 @@
  *  4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b  COPYING.lgplv3
  *  13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239  COPYING.mbsd
  */
-
-/* = = = START-STATIC-FORWARD = = = */
-static char const *
-find_dir_name(tOptions * opts, int * p_free);
-
-static char const *
-find_file_name(tOptions * opts, int * p_free_name);
-
-static void
-prt_entry(FILE * fp, tOptDesc * od, char const * l_arg);
-
-static void
-prt_value(FILE * fp, int depth, tOptDesc * pOD, tOptionValue const * ovp);
-
-static void
-prt_string(FILE * fp, char const * name, char const * pz);
-
-static void
-prt_val_list(FILE * fp, char const * name, tArgList * al);
-
-static void
-prt_nested(FILE * fp, tOptDesc * p);
-
-static FILE *
-open_sv_file(tOptions * opts);
-
-static void
-prt_no_arg_opt(FILE * fp, tOptDesc * p, tOptDesc * pOD);
-
-static void
-prt_str_arg(FILE * fp, tOptDesc * pOD);
-
-static void
-prt_enum_arg(FILE * fp, tOptDesc * od);
-
-static void
-prt_set_arg(FILE * fp, tOptDesc * od);
-
-static void
-prt_file_arg(FILE * fp, tOptDesc * od, tOptions * opts);
-/* = = = END-STATIC-FORWARD = = = */
+#include "save-flags.h"
 
 /**
+ * find the config file directory name
+ *
+ * @param opts    the options descriptor
+ * @param p_free  tell caller if name was allocated or not
  */
 static char const *
 find_dir_name(tOptions * opts, int * p_free)
@@ -84,79 +48,51 @@ find_dir_name(tOptions * opts, int * p_free)
         return NULL;
 
     dir = opts->pOptDesc[ opts->specOptIdx.save_opts ].optArg.argString;
-    if ((dir != NULL) && (*dir != NUL))
-        return dir;
+    if ((dir != NULL) && (*dir != NUL)) {
+        char const * pz = strchr(dir, '>');
+        if (pz == NULL)
+            return dir;
+        while (*(++pz) == '>')  ;
+        pz += strspn(pz, " \t");
+        dir = pz;
+        if (*dir != NUL)
+            return dir;
+    }
+
+    if (opts->papzHomeList == NULL)
+        return NULL;
 
     /*
      *  This function only works if there is a directory where
      *  we can stash the RC (INI) file.
      */
-    {
-        char const * const * papz = opts->papzHomeList;
-        if (papz == NULL)
-            return NULL;
-
-        while (papz[1] != NULL) papz++;
-        dir = *papz;
-    }
-
-    /*
-     *  IF it does not require deciphering an env value, then just copy it
-     */
-    if (*dir != '$')
-        return dir;
-
-    {
-        char const * end = strchr(++dir, DIRCH);
-        char * env;
+    for (int idx = 0;; idx++) {
+        char f_name[ AG_PATH_MAX+1 ];
 
-        if (end != NULL) {
-            char z[ AO_NAME_SIZE ];
-            if ((end - dir) > AO_NAME_LIMIT )
-                return NULL;
-            memcpy(z, dir, (size_t)(end - dir));
-            z[end - dir] = NUL;
-            env = getenv(z);
-        } else {
-
-            /*
-             *  Make sure we can get the env value (after stripping off
-             *  any trailing directory or file names)
-             */
-            env = getenv(dir);
-        }
+        dir = opts->papzHomeList[idx];
 
-        if (env == NULL) {
-            fprintf(stderr, zsave_warn, opts->pzProgName);
-            fprintf(stderr, zNotDef, dir);
-            return NULL;
+        switch (*dir) {
+        case '$':
+            break;
+        case NUL:
+            continue;
+        default:
+            return dir;
         }
-
-        if (end == NULL)
-            return env;
-
-        /*
-         * we will be returning an allocated result
-         */
-        *p_free = 1;
-
-        {
-            size_t env_len = strlen(env);
-            size_t end_len = strlen(end);
-            char * p;
-            char * res = p = (char *)AGALOC(env_len + end_len + 2, "dir name");
-
-            memcpy(p, env, env_len);
-            p += env_len;
-            *(p++) = '/';
-            memcpy(p, end, end_len + 1);
-
-            return res;
+        if (optionMakePath(f_name, (int)sizeof(f_name), dir, opts->pzProgPath)) {
+            *p_free = true;
+            AGDUPSTR(dir, f_name, "homerc");
+            return dir;
         }
     }
+    return NULL;
 }
 
 /**
+ * Find the name of the save-the-options file
+ *
+ * @param opts         the options descriptor
+ * @param p_free_name  tell caller if name was allocated or not
  */
 static char const *
 find_file_name(tOptions * opts, int * p_free_name)
@@ -164,15 +100,15 @@ find_file_name(tOptions * opts, int * p_free_name)
     struct stat stBuf;
     int    free_dir_name = 0;
 
-    char const * pzDir = find_dir_name(opts, &free_dir_name);
-    if (pzDir == NULL)
-        return NULL;
+    char const * res = find_dir_name(opts, &free_dir_name);
+    if (res == NULL)
+        return res;
 
     /*
      *  See if we can find the specified directory.  We use a once-only loop
      *  structure so we can bail out early.
      */
-    if (stat(pzDir, &stBuf) != 0) do {
+    if (stat(res, &stBuf) != 0) do {
         char z[AG_PATH_MAX];
         char * dirchp;
 
@@ -182,10 +118,10 @@ find_file_name(tOptions * opts, int * p_free_name)
          */
         if (errno != ENOENT) {
         bogus_name:
-            fprintf(stderr, zsave_warn, opts->pzProgName);
-            fprintf(stderr, zNoStat, errno, strerror(errno), pzDir);
+            fprintf(stderr, zsave_warn, opts->pzProgName, res);
+            fprintf(stderr, zNoStat, errno, strerror(errno), res);
             if (free_dir_name)
-                AGFREE(pzDir);
+                AGFREE(res);
             return NULL;
         }
 
@@ -193,17 +129,17 @@ find_file_name(tOptions * opts, int * p_free_name)
          *  Strip off the last component, stat the remaining string and
          *  that string must name a directory
          */
-        dirchp = strrchr(pzDir, DIRCH);
+        dirchp = strrchr(res, DIRCH);
         if (dirchp == NULL) {
             stBuf.st_mode = S_IFREG;
             break; /* found directory -- viz.,  "." */
         }
 
-        if ((size_t)(dirchp - pzDir) >= sizeof(z))
+        if ((size_t)(dirchp - res) >= sizeof(z))
             goto bogus_name;
 
-        memcpy(z, pzDir, (size_t)(dirchp - pzDir));
-        z[dirchp - pzDir] = NUL;
+        memcpy(z, res, (size_t)(dirchp - res));
+        z[dirchp - res] = NUL;
 
         if ((stat(z, &stBuf) != 0) || ! S_ISDIR(stBuf.st_mode))
             goto bogus_name;
@@ -217,15 +153,15 @@ find_file_name(tOptions * opts, int * p_free_name)
     if (S_ISDIR(stBuf.st_mode)) {
 
         {
-            size_t sz = strlen(pzDir) + strlen(opts->pzRcName) + 2;
+            size_t sz = strlen(res) + strlen(opts->pzRcName) + 2;
             char * pzPath = (char *)AGALOC(sz, "file name");
-            if (   snprintf(pzPath, sz, "%s/%s", pzDir, opts->pzRcName)
+            if (   snprintf(pzPath, sz, "%s/%s", res, opts->pzRcName)
                 >= (int)sz)
                 option_exits(EXIT_FAILURE);
 
             if (free_dir_name)
-                AGFREE(pzDir);
-            pzDir = pzPath;
+                AGFREE(res);
+            res = pzPath;
             free_dir_name = 1;
         }
 
@@ -233,12 +169,12 @@ find_file_name(tOptions * opts, int * p_free_name)
          *  IF we cannot stat the object for any reason other than
          *     it does not exist, then we bail out
          */
-        if (stat(pzDir, &stBuf) != 0) {
+        if (stat(res, &stBuf) != 0) {
             if (errno != ENOENT) {
-                fprintf(stderr, zsave_warn, opts->pzProgName);
+                fprintf(stderr, zsave_warn, opts->pzProgName, res);
                 fprintf(stderr, zNoStat, errno, strerror(errno),
-                        pzDir);
-                AGFREE(pzDir);
+                        res);
+                AGFREE(res);
                 return NULL;
             }
 
@@ -254,32 +190,37 @@ find_file_name(tOptions * opts, int * p_free_name)
      *  or will soon be a file.
      */
     if (! S_ISREG(stBuf.st_mode)) {
-        fprintf(stderr, zsave_warn, opts->pzProgName, pzDir);
+        fprintf(stderr, zsave_warn, opts->pzProgName, res);
         if (free_dir_name)
-            AGFREE(pzDir);
+            AGFREE(res);
         return NULL;
     }
 
     /*
      *  Get rid of the old file
      */
-    unlink(pzDir);
     *p_free_name = free_dir_name;
-    return pzDir;
+    return res;
 }
 
 /**
  * print one option entry to the save file.
  *
- * @param[in] fp    the file pointer for the save file
- * @param[in] od    the option descriptor to print
- * @param[in] l_arg the last argument for the option
+ * @param[in] fp       the file pointer for the save file
+ * @param[in] od       the option descriptor to print
+ * @param[in] l_arg    the last argument for the option
+ * @param[in] save_fl  include usage in comments
  */
 static void
-prt_entry(FILE * fp, tOptDesc * od, char const * l_arg)
+prt_entry(FILE * fp, tOptDesc * od, char const * l_arg, save_flags_mask_t save_fl)
 {
     int space_ct;
 
+    if (save_fl & SVFL_USAGE)
+        fprintf(fp, ao_name_use_fmt, od->pz_Name, od->pzText);
+    if (UNUSED_OPT(od) && (save_fl & SVFL_DEFAULT))
+        fputs(ao_default_use, fp);
+
     /*
      *  There is an argument.  Pad the name so values line up.
      *  Not disabled *OR* this got equivalenced to another opt,
@@ -288,9 +229,14 @@ prt_entry(FILE * fp, tOptDesc * od, char const * l_arg)
      */
     {
         char const * pz =
-            (! DISABLED_OPT(od) || (od->optEquivIndex != NO_EQUIVALENT))
+            (od->pz_DisableName == NULL)
             ? od->pz_Name
-            : od->pz_DisableName;
+            : (DISABLED_OPT(od)
+               ? od->pz_DisableName
+               : ((od->optEquivIndex == NO_EQUIVALENT)
+                  ? od->pz_Name : od->pz_DisableName)
+              );
+        
         space_ct = 17 - strlen(pz);
         fputs(pz, fp);
     }
@@ -339,9 +285,13 @@ end_entry:
 }
 
 /**
+ * print an option's value
+ *
+ * @param[in] fp          the file pointer for the save file
+ * @param[in] od          the option descriptor to print
  */
 static void
-prt_value(FILE * fp, int depth, tOptDesc * pOD, tOptionValue const * ovp)
+prt_value(FILE * fp, int depth, tOptDesc * od, tOptionValue const * ovp)
 {
     while (--depth >= 0)
         putc(' ', fp), putc(' ', fp);
@@ -358,9 +308,9 @@ prt_value(FILE * fp, int depth, tOptDesc * pOD, tOptionValue const * ovp)
 
     case OPARG_TYPE_ENUMERATION:
     case OPARG_TYPE_MEMBERSHIP:
-        if (pOD != NULL) {
-            uint32_t  opt_state = pOD->fOptState;
-            uintptr_t val = pOD->optArg.argEnum;
+        if (od != NULL) {
+            uint32_t  opt_state = od->fOptState;
+            uintptr_t val = od->optArg.argEnum;
             char const * typ = (ovp->valType == OPARG_TYPE_ENUMERATION)
                 ? "keyword" : "set-membership";
 
@@ -370,20 +320,20 @@ prt_value(FILE * fp, int depth, tOptDesc * pOD, tOptionValue const * ovp)
              *  This is a magic incantation that will convert the
              *  bit flag values back into a string suitable for printing.
              */
-            (*(pOD->pOptProc))(OPTPROC_RETURN_VALNAME, pOD );
-            if (pOD->optArg.argString != NULL) {
-                fputs(pOD->optArg.argString, fp);
+            (*(od->pOptProc))(OPTPROC_RETURN_VALNAME, od );
+            if (od->optArg.argString != NULL) {
+                fputs(od->optArg.argString, fp);
 
                 if (ovp->valType != OPARG_TYPE_ENUMERATION) {
                     /*
                      *  set membership strings get allocated
                      */
-                    AGFREE(pOD->optArg.argString);
+                    AGFREE(od->optArg.argString);
                 }
             }
 
-            pOD->optArg.argEnum = val;
-            pOD->fOptState = opt_state;
+            od->optArg.argEnum = val;
+            od->fOptState = opt_state;
             fprintf(fp, END_XML_FMT, ovp->pzName);
             break;
         }
@@ -405,6 +355,9 @@ prt_value(FILE * fp, int depth, tOptDesc * pOD, tOptionValue const * ovp)
 }
 
 /**
+ * Print a string value in XML format
+ *
+ * @param[in] fp          the file pointer for the save file
  */
 static void
 prt_string(FILE * fp, char const * name, char const * pz)
@@ -441,6 +394,9 @@ prt_string(FILE * fp, char const * name, char const * pz)
 }
 
 /**
+ * Print an option that can have multiple values in XML format
+ *
+ * @param[in] fp          file pointer
  */
 static void
 prt_val_list(FILE * fp, char const * name, tArgList * al)
@@ -477,15 +433,26 @@ prt_val_list(FILE * fp, char const * name, tArgList * al)
 }
 
 /**
+ * printed a nested/hierarchical value
+ *
+ * @param[in] fp       file pointer
+ * @param[in] od       option descriptor
+ * @param[in] save_fl  include usage in comments
  */
 static void
-prt_nested(FILE * fp, tOptDesc * p)
+prt_nested(FILE * fp, tOptDesc * od, save_flags_mask_t save_fl)
 {
     int opt_ct;
-    tArgList * al = p->optCookie;
+    tArgList * al = od->optCookie;
     void ** opt_list;
 
-    if (al == NULL)
+    if (save_fl & SVFL_USAGE)
+        fprintf(fp, ao_name_use_fmt, od->pz_Name, od->pzText);
+
+    /*
+     * Never show a default value if a hierarchical value is empty.
+     */
+    if (UNUSED_OPT(od) || (al == NULL))
         return;
 
     opt_ct   = al->useCt;
@@ -501,48 +468,128 @@ prt_nested(FILE * fp, tOptDesc * p)
         if (ovp == NULL)
             continue;
 
-        fprintf(fp, NESTED_OPT_FMT, p->pz_Name);
+        fprintf(fp, NESTED_OPT_FMT, od->pz_Name);
 
         do  {
-            prt_value(fp, 1, p, ovp);
+            prt_value(fp, 1, od, ovp);
 
         } while (ovp = optionNextValue(base, ovp),
                  ovp != NULL);
 
-        fprintf(fp, "</%s>\n", p->pz_Name);
+        fprintf(fp, "</%s>\n", od->pz_Name);
     } while (--opt_ct > 0);
 }
 
 /**
- * open the file for saving option state.
+ * remove the current program settings
  *
  * @param[in] opts  the program options structure
+ * @param[in] fname the save file name
+ */
+static void
+remove_settings(tOptions * opts, char const * fname)
+{
+    size_t const name_len = strlen(opts->pzProgName);
+    tmap_info_t  map_info;
+    char *       text = text_mmap(fname, PROT_READ|PROT_WRITE, MAP_PRIVATE, &map_info);
+    char *       scan = text;
+
+    for (;;) {
+        char * next = scan = strstr(scan, zCfgProg);
+        if (scan == NULL)
+            goto leave;
+
+        scan = SPN_WHITESPACE_CHARS(scan + zCfgProg_LEN);
+        if (  (strneqvcmp(scan, opts->pzProgName, (int)name_len) == 0)
+           && (IS_END_XML_TOKEN_CHAR(scan[name_len])) )  {
+
+            scan = next;
+            break;
+        }
+    }
+
+    /*
+     * If not NULL, "scan" points to the "<?program" string introducing
+     * the program segment we are to remove. See if another segment follows.
+     * If so, copy text. If not se trim off this segment.
+     */
+    {
+        char * next = strstr(scan + zCfgProg_LEN, zCfgProg);
+        size_t new_sz;
+
+        if (next == NULL)
+            new_sz = map_info.txt_size - strlen(scan);
+        else {
+            int fd = open(fname, O_RDWR);
+            if (fd < 0) return;
+            if (lseek(fd, (scan - text), SEEK_SET) < 0)
+                scan = next;
+            else if (write(fd, next, strlen(next)) < 0)
+                scan = next;
+            if (close(fd) < 0)
+                scan = next;
+            new_sz = map_info.txt_size - (next - scan);
+        }
+        if (new_sz != map_info.txt_size)
+            if (truncate(fname, new_sz) < 0)
+                scan = next; // we removed it, so shorten file
+    }
+
+ leave:
+    text_munmap(&map_info);
+}
+
+/**
+ * open the file for saving option state.
+ *
+ * @param[in] opts     the program options structure
+ * @param[in] save_fl  flags for saving data
  * @returns the open file pointer.  It may be NULL.
  */
 static FILE *
-open_sv_file(tOptions * opts)
+open_sv_file(tOptions * opts, save_flags_mask_t save_fl)
 {
     FILE * fp;
 
     {
         int   free_name = 0;
-        char const * pzFName = find_file_name(opts, &free_name);
-        if (pzFName == NULL)
+        char const * fname = find_file_name(opts, &free_name);
+        if (fname == NULL)
             return NULL;
 
-        fp = fopen(pzFName, "w" FOPEN_BINARY_FLAG);
+        if (save_fl == 0)
+            unlink(fname);
+        else
+            remove_settings(opts, fname);
+
+        fp = fopen(fname, "a" FOPEN_BINARY_FLAG);
         if (fp == NULL) {
-            fprintf(stderr, zsave_warn, opts->pzProgName);
-            fprintf(stderr, zNoCreat, errno, strerror(errno), pzFName);
+            fprintf(stderr, zsave_warn, opts->pzProgName, fname);
+            fprintf(stderr, zNoCreat, errno, strerror(errno), fname);
             if (free_name)
-                AGFREE(pzFName);
+                AGFREE(fname);
             return fp;
         }
 
         if (free_name)
-            AGFREE(pzFName);
+            AGFREE(fname);
     }
 
+    do {
+        struct stat sbuf;
+        if (fstat(fileno(fp), &sbuf) < 0)
+            break;
+
+        if (sbuf.st_size > zPresetFile_LEN) {
+            /* non-zero size implies save_fl is non-zero */
+            fprintf(fp, zFmtProg, opts->pzProgName);
+            return fp;
+        }
+    } while (false);
+
+    /*
+     * We have a new file. Insert a header
+     */
     fputs("#  ", fp);
     {
         char const * e = strchr(opts->pzUsageTitle, NL);
@@ -564,40 +611,63 @@ open_sv_file(tOptions * opts)
         AGFREE(time_str);
 #endif
     }
-
+    if (save_fl != 0)
+        fprintf(fp, zFmtProg, opts->pzProgName);
     return fp;
 }
 
 /**
+ * print option without an arg
+ *
+ * @param[in] fp       file pointer
+ * @param[in] vod      value option descriptor
+ * @param[in] pod      primary option descriptor
+ * @param[in] save_fl  include usage in comments
  */
 static void
-prt_no_arg_opt(FILE * fp, tOptDesc * p, tOptDesc * pOD)
+prt_no_arg_opt(FILE * fp, tOptDesc * vod, tOptDesc * pod, save_flags_mask_t save_fl)
 {
     /*
      * The aliased to argument indicates whether or not the option
      * is "disabled".  However, the original option has the name
-     * string, so we get that there, not with "p".
+     * string, so we get that there, not with "vod".
      */
     char const * pznm =
-        (DISABLED_OPT(p)) ? pOD->pz_DisableName : pOD->pz_Name;
+        (DISABLED_OPT(vod)) ? pod->pz_DisableName : pod->pz_Name;
     /*
      *  If the option was disabled and the disablement name is NULL,
      *  then the disablement was caused by aliasing.
      *  Use the name as the string to emit.
      */
     if (pznm == NULL)
-        pznm = pOD->pz_Name;
+        pznm = pod->pz_Name;
+
+    if (save_fl & SVFL_USAGE)
+        fprintf(fp, ao_name_use_fmt, pod->pz_Name, pod->pzText);
+    if (UNUSED_OPT(pod) && (save_fl & SVFL_DEFAULT))
+        fputs(ao_default_use, fp);
 
     fprintf(fp, "%s\n", pznm);
 }
 
 /**
+ * print the string valued argument(s).
+ *
+ * @param[in] fp       file pointer
+ * @param[in] od       value option descriptor
+ * @param[in] save_fl  include usage in comments
  */
 static void
-prt_str_arg(FILE * fp, tOptDesc * pOD)
+prt_str_arg(FILE * fp, tOptDesc * od, save_flags_mask_t save_fl)
 {
-    if (pOD->fOptState & OPTST_STACKED) {
-        tArgList * pAL = (tArgList *)pOD->optCookie;
+    if (UNUSED_OPT(od) || ((od->fOptState & OPTST_STACKED) == 0)) {
+        char const * arg = od->optArg.argString;
+        if (arg == NULL)
+            arg = "''";
+        prt_entry(fp, od, arg, save_fl);
+
+    } else {
+        tArgList * pAL = (tArgList *)od->optCookie;
         int        uct = pAL->useCt;
         char const ** ppz = pAL->apzArgs;
 
@@ -605,23 +675,24 @@ prt_str_arg(FILE * fp, tOptDesc * pOD)
          *  un-disable multiple copies of disabled options.
          */
         if (uct > 1)
-            pOD->fOptState &= ~OPTST_DISABLED;
+            od->fOptState &= ~OPTST_DISABLED;
 
-        while (uct-- > 0)
-            prt_entry(fp, pOD, *(ppz++));
-    } else {
-        prt_entry(fp, pOD, pOD->optArg.argString);
+        while (uct-- > 0) {
+            prt_entry(fp, od, *(ppz++), save_fl);
+            save_fl &= ~SVFL_USAGE;
+        }
     }
 }
 
 /**
  * print the string value of an enumeration.
  *
- * @param[in] fp  the file pointer to write to
- * @param[in] od  the option descriptor with the enumerated value
+ * @param[in] fp       the file pointer to write to
+ * @param[in] od       the option descriptor with the enumerated value
+ * @param[in] save_fl  include usage in comments
  */
 static void
-prt_enum_arg(FILE * fp, tOptDesc * od)
+prt_enum_arg(FILE * fp, tOptDesc * od, save_flags_mask_t save_fl)
 {
     uintptr_t val = od->optArg.argEnum;
 
@@ -630,29 +701,31 @@ prt_enum_arg(FILE * fp, tOptDesc * od)
      *  bit flag values back into a string suitable for printing.
      */
     (*(od->pOptProc))(OPTPROC_RETURN_VALNAME, od);
-    prt_entry(fp, od, VOIDP(od->optArg.argString));
+    prt_entry(fp, od, VOIDP(od->optArg.argString), save_fl);
 
     od->optArg.argEnum = val;
 }
 
 /**
  * Print the bits set in a bit mask option.
+ *
  * We call the option handling function with a magic value for
  * the options pointer and it allocates and fills in the string.
  * We print that with a call to prt_entry().
  *
- * @param[in] fp  the file pointer to write to
- * @param[in] od  the option descriptor with a bit mask value type
+ * @param[in] fp       the file pointer to write to
+ * @param[in] od       the option descriptor with a bit mask value type
+ * @param[in] save_fl  include usage in comments
  */
 static void
-prt_set_arg(FILE * fp, tOptDesc * od)
+prt_set_arg(FILE * fp, tOptDesc * od, save_flags_mask_t save_fl)
 {
     char * list = optionMemberList(od);
     size_t len  = strlen(list);
     char * buf  = (char *)AGALOC(len + 3, "dir name");
     *buf= '=';
     memcpy(buf+1, list, len + 1);
-    prt_entry(fp, od, buf);
+    prt_entry(fp, od, buf, save_fl);
     AGFREE(buf);
     AGFREE(list);
 }
@@ -661,29 +734,35 @@ prt_set_arg(FILE * fp, tOptDesc * od)
  * figure out what the option file name argument is.
  * If one can be found, call prt_entry() to emit it.
  *
- * @param[in] fp   the file pointer to write to.
- * @param[in] od   the option descriptor with a bit mask value type
- * @param[in] opts the program options descriptor
+ * @param[in] fp       the file pointer to write to.
+ * @param[in] od       the option descriptor with a bit mask value type
+ * @param[in] opts     the program options descriptor
+ * @param[in] save_fl  include usage in comments
  */
 static void
-prt_file_arg(FILE * fp, tOptDesc * od, tOptions * opts)
+prt_file_arg(FILE * fp, tOptDesc * od, tOptions * opts, save_flags_mask_t save_fl)
 {
     /*
      *  If the cookie is not NULL, then it has the file name, period.
      *  Otherwise, if we have a non-NULL string argument, then....
      */
     if (od->optCookie != NULL)
-        prt_entry(fp, od, od->optCookie);
+        prt_entry(fp, od, od->optCookie, save_fl);
 
     else if (HAS_originalOptArgArray(opts)) {
         char const * orig =
             opts->originalOptArgArray[od->optIndex].argString;
 
-        if (od->optArg.argString == orig)
+        if (od->optArg.argString == orig) {
+            if (save_fl)
+                fprintf(fp, ao_name_use_fmt, od->pz_Name, od->pzText);
             return;
+        }
 
-        prt_entry(fp, od, od->optArg.argString);
-    }
+        prt_entry(fp, od, od->optArg.argString, save_fl);
+
+    } else if (save_fl)
+        fprintf(fp, ao_name_use_fmt, od->pz_Name, od->pzText);
 }
 
 /*=export_func  optionSaveFile
@@ -720,8 +799,32 @@ optionSaveFile(tOptions * opts)
 {
     tOptDesc *  od;
     int         ct;
-    FILE *      fp = open_sv_file(opts);
+    FILE *      fp;
+    save_flags_mask_t save_flags = SVFL_NONE;
+
+    do {
+        char * temp_str;
+        char const * dir = opts->pOptDesc[ opts->specOptIdx.save_opts ].optArg.argString;
+        size_t flen;
 
+        if (dir == NULL)
+            break;
+        temp_str = strchr(dir, '>');
+        if (temp_str == NULL)
+            break;
+        if (temp_str[1] == '>')
+            save_flags = SVFL_UPDATE;
+        flen = (temp_str - dir);
+        if (flen == 0)
+            break;
+        temp_str = AGALOC(flen + 1, "flag search str");
+        memcpy(temp_str, dir, flen);
+        temp_str[flen] = NUL;
+        save_flags |= save_flags_str2mask(temp_str, SVFL_NONE);
+        AGFREE(temp_str);
+    } while (false);
+
+    fp = open_sv_file(opts, save_flags & SVFL_UPDATE);
     if (fp == NULL)
         return;
 
@@ -731,20 +834,20 @@ optionSaveFile(tOptions * opts)
     ct = opts->presetOptCt;
     od = opts->pOptDesc;
     do  {
-        tOptDesc * p;
+        tOptDesc * vod;
 
         /*
-         *  IF    the option has not been defined
-         *     OR it does not take an initialization value
-         *     OR it is equivalenced to another option
-         *  THEN continue (ignore it)
-         *
          *  Equivalenced options get picked up when the equivalenced-to
-         *  option is processed.
+         *  option is processed. And do not save options with any state
+         *  bits in the DO_NOT_SAVE collection
+         *
+         * ** option cannot be preset
+         * #define OPTST_NO_INIT          0x0000100U
+         * ** disable from cmd line
+         * #define OPTST_NO_COMMAND       0x2000000U
+         * ** alias for other option
+         * #define OPTST_ALIAS            0x8000000U
          */
-        if (UNUSED_OPT(od))
-            continue;
-
         if ((od->fOptState & OPTST_DO_NOT_SAVE_MASK) != 0)
             continue;
 
@@ -752,45 +855,48 @@ optionSaveFile(tOptions * opts)
            && (od->optEquivIndex != od->optIndex))
             continue;
 
+        if (UNUSED_OPT(od) && ((save_flags & SVFL_USAGE_DEFAULT_MASK) == SVFL_NONE))
+            continue;
+
         /*
          *  The option argument data are found at the equivalenced-to option,
          *  but the actual option argument type comes from the original
          *  option descriptor.  Be careful!
          */
-        p = ((od->fOptState & OPTST_EQUIVALENCE) != 0)
-            ? (opts->pOptDesc + od->optActualIndex) : od;
+        vod = ((od->fOptState & OPTST_EQUIVALENCE) != 0)
+              ? (opts->pOptDesc + od->optActualIndex) : od;
 
         switch (OPTST_GET_ARGTYPE(od->fOptState)) {
         case OPARG_TYPE_NONE:
-            prt_no_arg_opt(fp, p, od);
+            prt_no_arg_opt(fp, vod, od, save_flags);
             break;
 
         case OPARG_TYPE_NUMERIC:
-            prt_entry(fp, p, VOIDP(p->optArg.argInt));
+            prt_entry(fp, vod, VOIDP(vod->optArg.argInt), save_flags);
             break;
 
         case OPARG_TYPE_STRING:
-            prt_str_arg(fp, p);
+            prt_str_arg(fp, vod, save_flags);
             break;
 
         case OPARG_TYPE_ENUMERATION:
-            prt_enum_arg(fp, p);
+            prt_enum_arg(fp, vod, save_flags);
             break;
 
         case OPARG_TYPE_MEMBERSHIP:
-            prt_set_arg(fp, p);
+            prt_set_arg(fp, vod, save_flags);
             break;
 
         case OPARG_TYPE_BOOLEAN:
-            prt_entry(fp, p, p->optArg.argBool ? "true" : "false");
+            prt_entry(fp, vod, vod->optArg.argBool ? "true" : "false", save_flags);
             break;
 
         case OPARG_TYPE_HIERARCHY:
-            prt_nested(fp, p);
+            prt_nested(fp, vod, save_flags);
             break;
 
         case OPARG_TYPE_FILE:
-            prt_file_arg(fp, p, opts);
+            prt_file_arg(fp, vod, opts, save_flags);
             break;
 
         default:

+ 2 - 16
libopts/sort.c

@@ -10,7 +10,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -29,20 +29,6 @@
  *  13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239  COPYING.mbsd
  */
 
-/* = = = START-STATIC-FORWARD = = = */
-static tSuccess
-must_arg(tOptions * opts, char * arg_txt, tOptState * pOS,
-         char ** opt_txt, uint32_t * opt_idx);
-
-static tSuccess
-maybe_arg(tOptions * opts, char * arg_txt, tOptState * pOS,
-          char ** opt_txt, uint32_t * opt_idx);
-
-static tSuccess
-short_opt_ck(tOptions * opts, char * arg_txt, tOptState * pOS,
-             char ** opt_txt, uint32_t * opt_idx);
-/* = = = END-STATIC-FORWARD = = = */
-
 /*
  *  "must_arg" and "maybe_arg" are really similar.  The biggest
  *  difference is that "may" will consume the next argument only if it
@@ -178,7 +164,7 @@ short_opt_ck(tOptions * opts, char * arg_txt, tOptState * pOS,
  *  If the program wants sorted options (separated operands and options),
  *  then this routine will to the trick.
  */
-LOCAL void
+static void
 optionSort(tOptions * opts)
 {
     char **  opt_txt;

+ 2 - 2
libopts/stack.c

@@ -11,7 +11,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -176,7 +176,7 @@ optionUnstackArg(tOptions * opts, tOptDesc * od)
  *  a pointer to the argument list structure.  It gets passed around
  *  as an opaque address.
  */
-LOCAL void
+static void
 addArgListEntry(void ** ppAL, void * entry)
 {
     tArgList * pAL = *(void **)ppAL;

+ 21 - 11
libopts/stdnoreturn.in.h

@@ -1,6 +1,6 @@
 /* A substitute for ISO C11 <stdnoreturn.h>.
 
-   Copyright 2012-2016 Free Software Foundation, Inc.
+   Copyright 2012-2018 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -13,7 +13,7 @@
    GNU Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
+   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert.  */
 
@@ -28,15 +28,25 @@
 
 /* The definition of _Noreturn is copied here.  */
 
-#if 1200 <= _MSC_VER
-/* Standard include files on this platform contain declarations like
-   "__declspec (noreturn) void abort (void);".  "#define noreturn
-   _Noreturn" would cause this declaration to be rewritten to the
-   invalid "__declspec (__declspec (noreturn)) void abort (void);".
-   Instead, define noreturn to empty, so that such declarations are
-   rewritten to "__declspec () void abort (void);", which is
-   equivalent to "void abort (void);"; this gives up on noreturn's
-   advice to the compiler but at least it is valid code.  */
+#if 1200 <= _MSC_VER || defined __CYGWIN__
+/* On MSVC, standard include files contain declarations like
+     __declspec (noreturn) void abort (void);
+   "#define noreturn _Noreturn" would cause this declaration to be rewritten
+   to the invalid
+     __declspec (__declspec (noreturn)) void abort (void);
+
+   Similarly, on Cygwin, standard include files contain declarations like
+     void __cdecl abort (void) __attribute__ ((noreturn));
+   "#define noreturn _Noreturn" would cause this declaration to be rewritten
+   to the invalid
+     void __cdecl abort (void) __attribute__ ((__attribute__ ((__noreturn__))));
+
+   Instead, define noreturn to empty, so that such declarations are rewritten to
+     __declspec () void abort (void);
+   or
+     void __cdecl abort (void) __attribute__ (());
+   respectively.  This gives up on noreturn's advice to the compiler but at
+   least it is valid code.  */
 # define noreturn /*empty*/
 #else
 # define noreturn _Noreturn

+ 2 - 2
libopts/streqvcmp.c

@@ -15,7 +15,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2016 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -37,7 +37,7 @@
  * together for a case independent comparison.  The mappings are
  * based upon ascii character sequences.
  */
-static unsigned char charmap[] = {
+  static unsigned char charmap[] = {
     NUL,  0x01, 0x02, 0x03,  0x04, 0x05, 0x06, '\a',
     '\b', '\t', NL,   '\v',  '\f', '\r', 0x0E, 0x0F,
     0x10, 0x11, 0x12, 0x13,  0x14, 0x15, 0x16, 0x17,

+ 2 - 2
libopts/text_mmap.c

@@ -9,7 +9,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -189,7 +189,7 @@ validate_mmap(char const * fname, int prot, int flags, tmap_info_t * mapinfo)
 #ifdef _WIN32
             O_BINARY |
 #endif
-            ((FILE_WRITABLE(prot, flags)) ? O_RDWR : O_RDONLY);
+            FILE_WRITABLE(prot, flags) ? O_RDWR : O_RDONLY;
 
         /*
          *  If you're not sharing the file and you are writing to it,

+ 1 - 1
libopts/time.c

@@ -8,7 +8,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control

+ 1 - 18
libopts/tokenize.c

@@ -9,7 +9,7 @@
  *  This file defines the string_tokenize interface
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -28,23 +28,6 @@
  *  13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239  COPYING.mbsd
  */
 
-#include <errno.h>
-#include <stdlib.h>
-
-#define cc_t   const unsigned char
-#define ch_t   unsigned char
-
-/* = = = START-STATIC-FORWARD = = = */
-static void
-copy_cooked(ch_t ** ppDest, char const ** ppSrc);
-
-static void
-copy_raw(ch_t ** ppDest, char const ** ppSrc);
-
-static token_list_t *
-alloc_token_list(char const * str);
-/* = = = END-STATIC-FORWARD = = = */
-
 static void
 copy_cooked(ch_t ** ppDest, char const ** ppSrc)
 {

+ 8 - 62
libopts/usage.c

@@ -18,7 +18,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -40,61 +40,6 @@
 #define GRAPH_CH(_ch) \
     ((((unsigned)_ch) <= 0x7E) && (((unsigned)_ch) > ' '))
 
-/* = = = START-STATIC-FORWARD = = = */
-static unsigned int
-parse_usage_flags(ao_flag_names_t const * fnt, char const * txt);
-
-static inline bool
-do_gnu_usage(tOptions * pOpts);
-
-static inline bool
-skip_misuse_usage(tOptions * pOpts);
-
-static void
-print_offer_usage(tOptions * opts);
-
-static void
-print_usage_details(tOptions * opts, int exit_code);
-
-static void
-print_one_paragraph(char const * text, bool plain, FILE * fp);
-
-static void
-prt_conflicts(tOptions * opts, tOptDesc * od);
-
-static void
-prt_one_vendor(tOptions *    opts,  tOptDesc *   od,
-               arg_types_t * argtp, char const * usefmt);
-
-static void
-prt_vendor_opts(tOptions * opts, char const * title);
-
-static void
-prt_extd_usage(tOptions * opts, tOptDesc * od, char const * title);
-
-static void
-prt_ini_list(char const * const * papz, char const * ini_file,
-             char const * path_nm);
-
-static void
-prt_preamble(tOptions * opts, tOptDesc * od, arg_types_t * at);
-
-static void
-prt_one_usage(tOptions * opts, tOptDesc * od, arg_types_t * at);
-
-static void
-prt_opt_usage(tOptions * opts, int ex_code, char const * title);
-
-static void
-prt_prog_detail(tOptions * opts);
-
-static int
-setGnuOptFmts(tOptions * opts, char const ** ptxt);
-
-static int
-setStdOptFmts(tOptions * opts, char const ** ptxt);
-/* = = = END-STATIC-FORWARD = = = */
-
 /**
  * Parse the option usage flags string.  Any parsing problems yield
  * a zero (no flags set) result.  This function is internal to
@@ -154,6 +99,7 @@ parse_usage_flags(ao_flag_names_t const * fnt, char const * txt)
         case ',':
             txt = SPN_WHITESPACE_CHARS(txt + 1);
             /* Something must follow the comma */
+            /* FALLTHROUGH */
 
         default:
             continue;
@@ -170,7 +116,7 @@ parse_usage_flags(ao_flag_names_t const * fnt, char const * txt)
  *                      environment variable is parsed.
  * @param[in,out] opts  the program option descriptor
  */
-LOCAL void
+static void
 set_usage_flags(tOptions * opts, char const * flg_txt)
 {
 #   define _aof_(_n, _f)   { sizeof(#_n)-1, _f, #_n },
@@ -307,7 +253,7 @@ print_offer_usage(tOptions * opts)
             help[0] = help[1] = '-';
             strncpy(help + 2, od->pz_Name, 20);
             break;
-        
+
         case 0:
             strncpy(help, od->pz_Name, 20);
             break;
@@ -323,7 +269,7 @@ print_offer_usage(tOptions * opts)
         case (OPTPROC_LONGOPT | OPTPROC_SHORTOPT):
             strcpy(help, "--help");
             break;
-        
+
         case 0:
             strcpy(help, "help");
             break;
@@ -441,7 +387,7 @@ print_one_paragraph(char const * text, bool plain, FILE * fp)
         AGFREE(t);
     }
 }
- 
+
 /*=export_func  optionPrintParagraphs
  * private:
  *
@@ -568,7 +514,7 @@ optionPrintParagraphs(char const * text, bool plain, FILE * fp)
  *  If "exitCode" is "AO_EXIT_REQ_USAGE" (normally 64), then output will to
  *  to stdout and the actual exit code will be "EXIT_SUCCESS".
 =*/
-void
+noreturn void
 optionUsage(tOptions * opts, int usage_exit_code)
 {
     int exit_code = (usage_exit_code == AO_EXIT_REQ_USAGE)
@@ -620,7 +566,7 @@ optionUsage(tOptions * opts, int usage_exit_code)
         print_usage_details(opts, usage_exit_code);
     else
         print_offer_usage(opts);
-    
+
  flush_and_exit:
     fflush(option_usage_fp);
     if (ferror(option_usage_fp) != 0)

+ 7 - 4
libopts/version.c

@@ -10,7 +10,7 @@
 /*
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ *  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -90,7 +90,7 @@ emit_copy_full(tOptions * o, FILE * fp)
 
     else
         emit_first_line(fp, o->pzUsageTitle, NULL, NULL);
-    
+
     if (HAS_pzPkgDataDir(o) && (o->pzPackager != NULL)) {
         fputc(NL, fp);
         fputs(o->pzPackager, fp);
@@ -119,7 +119,7 @@ emit_copy_note(tOptions * opts, FILE * fp)
 
     fputc(NL, fp);
     fprintf(fp, zao_ver_fmt, optionVersion());
-    
+
     if (HAS_pzPkgDataDir(opts) && (opts->pzPackager != NULL)) {
         fputc(NL, fp);
         fputs(opts->pzPackager, fp);
@@ -153,7 +153,10 @@ print_ver(tOptions * opts, tOptDesc * od, FILE * fp, bool call_exit)
 
         ch = od->optArg.argString[0];
 
-    else {
+    else if (OPTST_GET_ARGTYPE(od->fOptState) == OPARG_TYPE_STATIC) {
+        ch = od->optArg.argString[0];
+
+    } else {
         set_usage_flags(opts, NULL);
         ch = (opts->fOptSet & OPTPROC_GNUUSAGE) ? 'c' : 'v';
     }

+ 12 - 31
m4/libtool.m4

@@ -728,6 +728,7 @@ _LT_CONFIG_SAVE_COMMANDS([
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
 # Generated automatically by $as_me ($PACKAGE) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
 # Provide generalized library-building support services.
@@ -2886,18 +2887,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   dynamic_linker='GNU/Linux ld.so'
   ;;
 
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
 netbsd*)
   version_type=sunos
   need_lib_prefix=no
@@ -3557,7 +3546,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-netbsd* | netbsdelf*-gnu)
+netbsd*)
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
   else
@@ -4063,8 +4052,7 @@ _LT_EOF
   if AC_TRY_EVAL(ac_compile); then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
-    if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
 	mv -f "$nlist"T "$nlist"
@@ -4436,7 +4424,7 @@ m4_if([$1], [CXX], [
 	    ;;
 	esac
 	;;
-      netbsd* | netbsdelf*-gnu)
+      netbsd*)
 	;;
       *qnx* | *nto*)
         # QNX uses GNU C++, but need to define -shared option too, otherwise
@@ -4948,9 +4936,6 @@ m4_if([$1], [CXX], [
       ;;
     esac
     ;;
-  linux* | k*bsd*-gnu | gnu*)
-    _LT_TAGVAR(link_all_deplibs, $1)=no
-    ;;
   *)
     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
     ;;
@@ -5013,9 +4998,6 @@ dnl Note also adjust exclude_expsyms for C++ above.
   openbsd* | bitrig*)
     with_gnu_ld=no
     ;;
-  linux* | k*bsd*-gnu | gnu*)
-    _LT_TAGVAR(link_all_deplibs, $1)=no
-    ;;
   esac
 
   _LT_TAGVAR(ld_shlibs, $1)=yes
@@ -5270,7 +5252,7 @@ _LT_EOF
       fi
       ;;
 
-    netbsd* | netbsdelf*-gnu)
+    netbsd*)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
@@ -5791,7 +5773,6 @@ _LT_EOF
 	if test yes = "$lt_cv_irix_exported_symbol"; then
           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
 	fi
-	_LT_TAGVAR(link_all_deplibs, $1)=no
       else
 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
@@ -5813,7 +5794,7 @@ _LT_EOF
       esac
       ;;
 
-    netbsd* | netbsdelf*-gnu)
+    netbsd*)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
       else
@@ -6439,7 +6420,7 @@ if test yes != "$_lt_caught_CXX_error"; then
       # Commands to make compiler produce verbose output that lists
       # what "hidden" libraries, object files and flags are used when
       # linking a shared library.
-      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
     else
       GXX=no
@@ -6814,7 +6795,7 @@ if test yes != "$_lt_caught_CXX_error"; then
             # explicitly linking system object files so we need to strip them
             # from the output so that they don't get included in the library
             # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
             ;;
           *)
             if test yes = "$GXX"; then
@@ -6879,7 +6860,7 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 	    ;;
           *)
 	    if test yes = "$GXX"; then
@@ -7218,7 +7199,7 @@ if test yes != "$_lt_caught_CXX_error"; then
 	      # Commands to make compiler produce verbose output that lists
 	      # what "hidden" libraries, object files and flags are used when
 	      # linking a shared library.
-	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
+	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
 	    else
 	      # FIXME: insert proper C++ library support
@@ -7302,7 +7283,7 @@ if test yes != "$_lt_caught_CXX_error"; then
 	        # Commands to make compiler produce verbose output that lists
 	        # what "hidden" libraries, object files and flags are used when
 	        # linking a shared library.
-	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
+	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 	      else
 	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
 	        # platform.
@@ -7313,7 +7294,7 @@ if test yes != "$_lt_caught_CXX_error"; then
 	        # Commands to make compiler produce verbose output that lists
 	        # what "hidden" libraries, object files and flags are used when
 	        # linking a shared library.
-	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
+	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 	      fi
 
 	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'

+ 5 - 9
scripts/Makefile.in

@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -276,7 +276,6 @@ prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
 rmmod = @rmmod@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -313,8 +312,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -338,10 +337,7 @@ ctags CTAGS:
 cscope cscopelist:
 
 
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
+distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \

+ 51 - 140
src/Makefile.in

@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -208,33 +208,7 @@ am__v_at_0 = @
 am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/tcpbridge-bridge.Po \
-	./$(DEPDIR)/tcpbridge-tcpbridge.Po \
-	./$(DEPDIR)/tcpbridge-tcpbridge_opts.Po \
-	./$(DEPDIR)/tcpcapinfo-tcpcapinfo.Po \
-	./$(DEPDIR)/tcpcapinfo-tcpcapinfo_opts.Po \
-	./$(DEPDIR)/tcpliveplay-tcpliveplay.Po \
-	./$(DEPDIR)/tcpliveplay-tcpliveplay_opts.Po \
-	./$(DEPDIR)/tcpprep-tcpprep.Po \
-	./$(DEPDIR)/tcpprep-tcpprep_api.Po \
-	./$(DEPDIR)/tcpprep-tcpprep_opts.Po \
-	./$(DEPDIR)/tcpprep-tree.Po ./$(DEPDIR)/tcpreplay-replay.Po \
-	./$(DEPDIR)/tcpreplay-send_packets.Po \
-	./$(DEPDIR)/tcpreplay-signal_handler.Po \
-	./$(DEPDIR)/tcpreplay-sleep.Po \
-	./$(DEPDIR)/tcpreplay-tcpreplay.Po \
-	./$(DEPDIR)/tcpreplay-tcpreplay_api.Po \
-	./$(DEPDIR)/tcpreplay-tcpreplay_opts.Po \
-	./$(DEPDIR)/tcpreplay_edit-replay.Po \
-	./$(DEPDIR)/tcpreplay_edit-send_packets.Po \
-	./$(DEPDIR)/tcpreplay_edit-signal_handler.Po \
-	./$(DEPDIR)/tcpreplay_edit-sleep.Po \
-	./$(DEPDIR)/tcpreplay_edit-tcpreplay.Po \
-	./$(DEPDIR)/tcpreplay_edit-tcpreplay_api.Po \
-	./$(DEPDIR)/tcpreplay_edit-tcpreplay_edit_opts.Po \
-	./$(DEPDIR)/tcprewrite-tcprewrite.Po \
-	./$(DEPDIR)/tcprewrite-tcprewrite_opts.Po
+am__depfiles_maybe = depfiles
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -311,7 +285,7 @@ am__recursive_targets = \
   $(RECURSIVE_CLEAN_TARGETS) \
   $(am__extra_recursive_targets)
 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
-	distdir distdir-am
+	distdir
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
 	$(LISP)config.h.in
 # Read a list of newline-separated strings from the standard input,
@@ -512,7 +486,6 @@ prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
 rmmod = @rmmod@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -618,8 +591,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -731,39 +704,33 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpbridge-bridge.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpbridge-tcpbridge.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpbridge-tcpbridge_opts.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpcapinfo-tcpcapinfo.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpcapinfo-tcpcapinfo_opts.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpliveplay-tcpliveplay.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpliveplay-tcpliveplay_opts.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpprep-tcpprep.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpprep-tcpprep_api.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpprep-tcpprep_opts.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpprep-tree.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-replay.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-send_packets.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-signal_handler.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-sleep.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-tcpreplay.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-tcpreplay_api.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-tcpreplay_opts.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay_edit-replay.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay_edit-send_packets.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay_edit-signal_handler.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay_edit-sleep.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay_edit-tcpreplay.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay_edit-tcpreplay_api.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay_edit-tcpreplay_edit_opts.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcprewrite-tcprewrite.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcprewrite-tcprewrite_opts.Po@am__quote@ # am--include-marker
-
-$(am__depfiles_remade):
-	@$(MKDIR_P) $(@D)
-	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
-
-am--depfiles: $(am__depfiles_remade)
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpbridge-bridge.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpbridge-tcpbridge.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpbridge-tcpbridge_opts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpcapinfo-tcpcapinfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpcapinfo-tcpcapinfo_opts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpliveplay-tcpliveplay.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpliveplay-tcpliveplay_opts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpprep-tcpprep.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpprep-tcpprep_api.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpprep-tcpprep_opts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpprep-tree.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-replay.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-send_packets.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-signal_handler.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-sleep.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-tcpreplay.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-tcpreplay_api.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay-tcpreplay_opts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay_edit-replay.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay_edit-send_packets.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay_edit-signal_handler.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay_edit-sleep.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay_edit-tcpreplay.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay_edit-tcpreplay_api.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpreplay_edit-tcpreplay_edit_opts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcprewrite-tcprewrite.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcprewrite-tcprewrite_opts.Po@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -1315,10 +1282,7 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
+distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -1421,33 +1385,7 @@ clean: clean-recursive
 clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-recursive
-		-rm -f ./$(DEPDIR)/tcpbridge-bridge.Po
-	-rm -f ./$(DEPDIR)/tcpbridge-tcpbridge.Po
-	-rm -f ./$(DEPDIR)/tcpbridge-tcpbridge_opts.Po
-	-rm -f ./$(DEPDIR)/tcpcapinfo-tcpcapinfo.Po
-	-rm -f ./$(DEPDIR)/tcpcapinfo-tcpcapinfo_opts.Po
-	-rm -f ./$(DEPDIR)/tcpliveplay-tcpliveplay.Po
-	-rm -f ./$(DEPDIR)/tcpliveplay-tcpliveplay_opts.Po
-	-rm -f ./$(DEPDIR)/tcpprep-tcpprep.Po
-	-rm -f ./$(DEPDIR)/tcpprep-tcpprep_api.Po
-	-rm -f ./$(DEPDIR)/tcpprep-tcpprep_opts.Po
-	-rm -f ./$(DEPDIR)/tcpprep-tree.Po
-	-rm -f ./$(DEPDIR)/tcpreplay-replay.Po
-	-rm -f ./$(DEPDIR)/tcpreplay-send_packets.Po
-	-rm -f ./$(DEPDIR)/tcpreplay-signal_handler.Po
-	-rm -f ./$(DEPDIR)/tcpreplay-sleep.Po
-	-rm -f ./$(DEPDIR)/tcpreplay-tcpreplay.Po
-	-rm -f ./$(DEPDIR)/tcpreplay-tcpreplay_api.Po
-	-rm -f ./$(DEPDIR)/tcpreplay-tcpreplay_opts.Po
-	-rm -f ./$(DEPDIR)/tcpreplay_edit-replay.Po
-	-rm -f ./$(DEPDIR)/tcpreplay_edit-send_packets.Po
-	-rm -f ./$(DEPDIR)/tcpreplay_edit-signal_handler.Po
-	-rm -f ./$(DEPDIR)/tcpreplay_edit-sleep.Po
-	-rm -f ./$(DEPDIR)/tcpreplay_edit-tcpreplay.Po
-	-rm -f ./$(DEPDIR)/tcpreplay_edit-tcpreplay_api.Po
-	-rm -f ./$(DEPDIR)/tcpreplay_edit-tcpreplay_edit_opts.Po
-	-rm -f ./$(DEPDIR)/tcprewrite-tcprewrite.Po
-	-rm -f ./$(DEPDIR)/tcprewrite-tcprewrite_opts.Po
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-hdr distclean-tags
@@ -1493,33 +1431,7 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
-		-rm -f ./$(DEPDIR)/tcpbridge-bridge.Po
-	-rm -f ./$(DEPDIR)/tcpbridge-tcpbridge.Po
-	-rm -f ./$(DEPDIR)/tcpbridge-tcpbridge_opts.Po
-	-rm -f ./$(DEPDIR)/tcpcapinfo-tcpcapinfo.Po
-	-rm -f ./$(DEPDIR)/tcpcapinfo-tcpcapinfo_opts.Po
-	-rm -f ./$(DEPDIR)/tcpliveplay-tcpliveplay.Po
-	-rm -f ./$(DEPDIR)/tcpliveplay-tcpliveplay_opts.Po
-	-rm -f ./$(DEPDIR)/tcpprep-tcpprep.Po
-	-rm -f ./$(DEPDIR)/tcpprep-tcpprep_api.Po
-	-rm -f ./$(DEPDIR)/tcpprep-tcpprep_opts.Po
-	-rm -f ./$(DEPDIR)/tcpprep-tree.Po
-	-rm -f ./$(DEPDIR)/tcpreplay-replay.Po
-	-rm -f ./$(DEPDIR)/tcpreplay-send_packets.Po
-	-rm -f ./$(DEPDIR)/tcpreplay-signal_handler.Po
-	-rm -f ./$(DEPDIR)/tcpreplay-sleep.Po
-	-rm -f ./$(DEPDIR)/tcpreplay-tcpreplay.Po
-	-rm -f ./$(DEPDIR)/tcpreplay-tcpreplay_api.Po
-	-rm -f ./$(DEPDIR)/tcpreplay-tcpreplay_opts.Po
-	-rm -f ./$(DEPDIR)/tcpreplay_edit-replay.Po
-	-rm -f ./$(DEPDIR)/tcpreplay_edit-send_packets.Po
-	-rm -f ./$(DEPDIR)/tcpreplay_edit-signal_handler.Po
-	-rm -f ./$(DEPDIR)/tcpreplay_edit-sleep.Po
-	-rm -f ./$(DEPDIR)/tcpreplay_edit-tcpreplay.Po
-	-rm -f ./$(DEPDIR)/tcpreplay_edit-tcpreplay_api.Po
-	-rm -f ./$(DEPDIR)/tcpreplay_edit-tcpreplay_edit_opts.Po
-	-rm -f ./$(DEPDIR)/tcprewrite-tcprewrite.Po
-	-rm -f ./$(DEPDIR)/tcprewrite-tcprewrite_opts.Po
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -1543,22 +1455,21 @@ uninstall-man: uninstall-man1
 .MAKE: $(am__recursive_targets) all check install install-am \
 	install-strip
 
-.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
-	am--depfiles check check-am clean clean-binPROGRAMS \
-	clean-generic clean-libtool cscopelist-am ctags ctags-am \
-	distclean distclean-compile distclean-generic distclean-hdr \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-binPROGRAMS \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-man1 \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	installdirs-am maintainer-clean maintainer-clean-generic \
-	mostlyclean mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
-	uninstall-am uninstall-binPROGRAMS uninstall-man \
-	uninstall-man1
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+	check-am clean clean-binPROGRAMS clean-generic clean-libtool \
+	cscopelist-am ctags ctags-am distclean distclean-compile \
+	distclean-generic distclean-hdr distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-binPROGRAMS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-man1 install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs installdirs-am \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+	uninstall-binPROGRAMS uninstall-man uninstall-man1
 
 .PRECIOUS: Makefile
 

+ 39 - 99
src/common/Makefile.in

@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -144,17 +144,7 @@ am__v_at_0 = @
 am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/cache.Po ./$(DEPDIR)/cidr.Po \
-	./$(DEPDIR)/dlt_names.Po ./$(DEPDIR)/err.Po \
-	./$(DEPDIR)/fakepcap.Po ./$(DEPDIR)/fakepcapnav.Po \
-	./$(DEPDIR)/fakepoll.Po ./$(DEPDIR)/flows.Po \
-	./$(DEPDIR)/get.Po ./$(DEPDIR)/git_version.Po \
-	./$(DEPDIR)/interface.Po ./$(DEPDIR)/list.Po \
-	./$(DEPDIR)/mac.Po ./$(DEPDIR)/netmap.Po \
-	./$(DEPDIR)/sendpacket.Po ./$(DEPDIR)/services.Po \
-	./$(DEPDIR)/tcpdump.Po ./$(DEPDIR)/timer.Po \
-	./$(DEPDIR)/txring.Po ./$(DEPDIR)/utils.Po ./$(DEPDIR)/xX.Po
+am__depfiles_maybe = depfiles
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -358,7 +348,6 @@ prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
 rmmod = @rmmod@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -413,8 +402,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -440,33 +429,27 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cidr.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlt_names.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/err.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fakepcap.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fakepcapnav.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fakepoll.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flows.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/git_version.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mac.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netmap.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendpacket.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/services.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpdump.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txring.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xX.Po@am__quote@ # am--include-marker
-
-$(am__depfiles_remade):
-	@$(MKDIR_P) $(@D)
-	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
-
-am--depfiles: $(am__depfiles_remade)
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cidr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlt_names.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/err.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fakepcap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fakepcapnav.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fakepoll.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flows.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/git_version.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mac.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendpacket.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/services.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpdump.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txring.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xX.Po@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -550,10 +533,7 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
+distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -628,27 +608,7 @@ clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
 	mostlyclean-am
 
 distclean: distclean-am
-		-rm -f ./$(DEPDIR)/cache.Po
-	-rm -f ./$(DEPDIR)/cidr.Po
-	-rm -f ./$(DEPDIR)/dlt_names.Po
-	-rm -f ./$(DEPDIR)/err.Po
-	-rm -f ./$(DEPDIR)/fakepcap.Po
-	-rm -f ./$(DEPDIR)/fakepcapnav.Po
-	-rm -f ./$(DEPDIR)/fakepoll.Po
-	-rm -f ./$(DEPDIR)/flows.Po
-	-rm -f ./$(DEPDIR)/get.Po
-	-rm -f ./$(DEPDIR)/git_version.Po
-	-rm -f ./$(DEPDIR)/interface.Po
-	-rm -f ./$(DEPDIR)/list.Po
-	-rm -f ./$(DEPDIR)/mac.Po
-	-rm -f ./$(DEPDIR)/netmap.Po
-	-rm -f ./$(DEPDIR)/sendpacket.Po
-	-rm -f ./$(DEPDIR)/services.Po
-	-rm -f ./$(DEPDIR)/tcpdump.Po
-	-rm -f ./$(DEPDIR)/timer.Po
-	-rm -f ./$(DEPDIR)/txring.Po
-	-rm -f ./$(DEPDIR)/utils.Po
-	-rm -f ./$(DEPDIR)/xX.Po
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -694,27 +654,7 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-		-rm -f ./$(DEPDIR)/cache.Po
-	-rm -f ./$(DEPDIR)/cidr.Po
-	-rm -f ./$(DEPDIR)/dlt_names.Po
-	-rm -f ./$(DEPDIR)/err.Po
-	-rm -f ./$(DEPDIR)/fakepcap.Po
-	-rm -f ./$(DEPDIR)/fakepcapnav.Po
-	-rm -f ./$(DEPDIR)/fakepoll.Po
-	-rm -f ./$(DEPDIR)/flows.Po
-	-rm -f ./$(DEPDIR)/get.Po
-	-rm -f ./$(DEPDIR)/git_version.Po
-	-rm -f ./$(DEPDIR)/interface.Po
-	-rm -f ./$(DEPDIR)/list.Po
-	-rm -f ./$(DEPDIR)/mac.Po
-	-rm -f ./$(DEPDIR)/netmap.Po
-	-rm -f ./$(DEPDIR)/sendpacket.Po
-	-rm -f ./$(DEPDIR)/services.Po
-	-rm -f ./$(DEPDIR)/tcpdump.Po
-	-rm -f ./$(DEPDIR)/timer.Po
-	-rm -f ./$(DEPDIR)/txring.Po
-	-rm -f ./$(DEPDIR)/utils.Po
-	-rm -f ./$(DEPDIR)/xX.Po
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -735,16 +675,16 @@ uninstall-am:
 
 .MAKE: all check install install-am install-strip
 
-.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
-	clean-generic clean-libtool clean-noinstLIBRARIES \
-	cscopelist-am ctags ctags-am distclean distclean-compile \
-	distclean-generic distclean-libtool distclean-tags distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \
+	ctags-am distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am

+ 1 - 1
src/common/git_version.c

@@ -1,4 +1,4 @@
-const char GIT_Version[] = "git:v4.4.2";
+const char GIT_Version[] = "git:v4.4.3";
 const char *git_version(void) {
     return GIT_Version;
 }

+ 1 - 1
src/config.h.in

@@ -328,7 +328,7 @@
 /* Do we have Linux PF_PACKET socket support? */
 #undef HAVE_PF_PACKET
 
-/* Do we have PF_RING libpcap support? */
+/* ${with_pfring_lib} numa pthread rt */
 #undef HAVE_PF_RING_PCAP
 
 /* Define to 1 if the system has the type `pid_t'. */

+ 1 - 1
src/defines.h

@@ -54,7 +54,7 @@
 #define PCAP_DONT_INCLUDE_PCAP_BPF_H 1 /* don't re-include it in pcap.h */
 #endif
 
-#include "/usr/include/pcap.h"
+#include "/Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pcap.h"
 
 /* include our own strlcat/strlcpy? */
 #ifndef HAVE_STRLCPY

+ 41 - 118
src/fragroute/Makefile.in

@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -150,30 +150,7 @@ am__v_at_0 = @
 am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/libfragroute_a-argv.Po \
-	./$(DEPDIR)/libfragroute_a-bget.Po \
-	./$(DEPDIR)/libfragroute_a-fragroute.Po \
-	./$(DEPDIR)/libfragroute_a-iputil.Po \
-	./$(DEPDIR)/libfragroute_a-mod.Po \
-	./$(DEPDIR)/libfragroute_a-mod_delay.Po \
-	./$(DEPDIR)/libfragroute_a-mod_drop.Po \
-	./$(DEPDIR)/libfragroute_a-mod_dup.Po \
-	./$(DEPDIR)/libfragroute_a-mod_echo.Po \
-	./$(DEPDIR)/libfragroute_a-mod_ip6_opt.Po \
-	./$(DEPDIR)/libfragroute_a-mod_ip6_qos.Po \
-	./$(DEPDIR)/libfragroute_a-mod_ip_chaff.Po \
-	./$(DEPDIR)/libfragroute_a-mod_ip_frag.Po \
-	./$(DEPDIR)/libfragroute_a-mod_ip_opt.Po \
-	./$(DEPDIR)/libfragroute_a-mod_ip_tos.Po \
-	./$(DEPDIR)/libfragroute_a-mod_ip_ttl.Po \
-	./$(DEPDIR)/libfragroute_a-mod_order.Po \
-	./$(DEPDIR)/libfragroute_a-mod_print.Po \
-	./$(DEPDIR)/libfragroute_a-mod_tcp_chaff.Po \
-	./$(DEPDIR)/libfragroute_a-mod_tcp_opt.Po \
-	./$(DEPDIR)/libfragroute_a-mod_tcp_seg.Po \
-	./$(DEPDIR)/libfragroute_a-pkt.Po \
-	./$(DEPDIR)/libfragroute_a-randutil.Po
+am__depfiles_maybe = depfiles
 am__mv = mv -f
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -378,7 +355,6 @@ prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
 rmmod = @rmmod@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -430,8 +406,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -457,35 +433,29 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-argv.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-bget.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-fragroute.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-iputil.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_delay.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_drop.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_dup.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_echo.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_ip6_opt.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_ip6_qos.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_ip_chaff.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_ip_frag.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_ip_opt.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_ip_tos.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_ip_ttl.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_order.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_print.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_tcp_chaff.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_tcp_opt.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_tcp_seg.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-pkt.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-randutil.Po@am__quote@ # am--include-marker
-
-$(am__depfiles_remade):
-	@$(MKDIR_P) $(@D)
-	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
-
-am--depfiles: $(am__depfiles_remade)
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-argv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-bget.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-fragroute.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-iputil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_delay.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_drop.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_dup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_echo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_ip6_opt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_ip6_qos.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_ip_chaff.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_ip_frag.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_ip_opt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_ip_tos.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_ip_ttl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_order.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_print.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_tcp_chaff.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_tcp_opt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-mod_tcp_seg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-pkt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfragroute_a-randutil.Po@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -891,10 +861,7 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
+distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -966,29 +933,7 @@ clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
 	mostlyclean-am
 
 distclean: distclean-am
-		-rm -f ./$(DEPDIR)/libfragroute_a-argv.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-bget.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-fragroute.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-iputil.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_delay.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_drop.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_dup.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_echo.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_ip6_opt.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_ip6_qos.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_ip_chaff.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_ip_frag.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_ip_opt.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_ip_tos.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_ip_ttl.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_order.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_print.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_tcp_chaff.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_tcp_opt.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_tcp_seg.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-pkt.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-randutil.Po
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -1034,29 +979,7 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-		-rm -f ./$(DEPDIR)/libfragroute_a-argv.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-bget.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-fragroute.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-iputil.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_delay.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_drop.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_dup.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_echo.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_ip6_opt.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_ip6_qos.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_ip_chaff.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_ip_frag.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_ip_opt.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_ip_tos.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_ip_ttl.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_order.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_print.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_tcp_chaff.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_tcp_opt.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-mod_tcp_seg.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-pkt.Po
-	-rm -f ./$(DEPDIR)/libfragroute_a-randutil.Po
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -1077,16 +1000,16 @@ uninstall-am:
 
 .MAKE: install-am install-strip
 
-.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
-	clean-generic clean-libtool clean-noinstLIBRARIES \
-	cscopelist-am ctags ctags-am distclean distclean-compile \
-	distclean-generic distclean-libtool distclean-tags distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \
+	ctags-am distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am

+ 2 - 2
src/send_packets.c

@@ -487,7 +487,7 @@ send_packets(tcpreplay_t *ctx, pcap_t *pcap, int idx)
         /* write packet out on network */
         if (sendpacket(sp, pktdata, pktlen, &pkthdr) < (int)pktlen) {
             warnx("Unable to send packet: %s", sendpacket_geterr(sp));
-            break;
+            continue;
         }
 
         /*
@@ -763,7 +763,7 @@ send_dual_packets(tcpreplay_t *ctx, pcap_t *pcap1, int cache_file_idx1, pcap_t *
         /* write packet out on network */
         if (sendpacket(sp, pktdata, pktlen, pkthdr_ptr) < (int)pktlen) {
             warnx("Unable to send packet: %s", sendpacket_geterr(sp));
-            break;
+            continue;
         }
 
         /*

+ 2 - 2
src/tcpbridge.1

@@ -10,12 +10,12 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH tcpbridge 1 "26 Aug 2022" "tcpbridge" "User Commands"
+.TH tcpbridge 1 "01 Jan 2023" "tcpbridge" "User Commands"
 .\"
 .\" DO NOT EDIT THIS FILE (in-mem file)
 .\"
 .\" It has been AutoGen-ed
-.\" From the definitions tcpbridge_opts.def
+.\" From the definitions ../../src/tcpbridge_opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
 \f\*[B-Font]tcpbridge\fP

+ 109 - 109
src/tcpbridge_opts.c

@@ -3,10 +3,10 @@
  *  DO NOT EDIT THIS FILE   (tcpbridge_opts.c)
  *
  *  It has been AutoGen-ed
- *  From the definitions    tcpbridge_opts.def
+ *  From the definitions    ../../src/tcpbridge_opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
  *
  *  AutoOpts is a copyrighted work.  This source file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -42,11 +42,15 @@
 #define OPTION_CODE_COMPILE 1
 #include "tcpbridge_opts.h"
 #include <sys/types.h>
+#include <sys/stat.h>
 
+#include <errno.h>
+#include <fcntl.h>
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <errno.h>
+#include <string.h>
+#include <unistd.h>
 
 #ifdef  __cplusplus
 extern "C" {
@@ -1737,7 +1741,7 @@ static char const * const apzHomeList[2] = {
 #define zDetail         (tcpbridge_opt_strs+4284)
 /** The full version string for tcpbridge. */
 #define zFullVersion    (NULL)
-/* extracted from optcode.tlib near line 364 */
+/* extracted from optcode.tlib near line 342 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -2679,12 +2683,12 @@ static void bogus_function(void) {
      extract the correct strings.  These strings are actually referenced
      by a field name in the tcpbridgeOptions structure noted in the
      comments below.  The literal text is defined in tcpbridge_opt_strs.
-   
+
      NOTE: the strings below are segmented with respect to the source string
      tcpbridge_opt_strs.  The strings above are handed off for translation
      at run time a paragraph at a time.  Consequently, they are presented here
      for translation a paragraph at a time.
-   
+
      ALSO: often the description for an option will reference another option
      by name.  These are set off with apostrophe quotes (I hope).  Do not
      translate option names.
@@ -2894,234 +2898,230 @@ http://tcpreplay.appneta.com\n"));
   /* LIBOPTS-MESSAGES: */
 #line 67 "../autoopts.c"
   puts(_("allocation of %d bytes failed\n"));
-#line 93 "../autoopts.c"
+#line 89 "../autoopts.c"
   puts(_("allocation of %d bytes failed\n"));
-#line 53 "../init.c"
+#line 48 "../init.c"
   puts(_("AutoOpts function called without option descriptor\n"));
-#line 86 "../init.c"
+#line 81 "../init.c"
   puts(_("\tThis exceeds the compiled library version:  "));
-#line 84 "../init.c"
+#line 79 "../init.c"
   puts(_("Automated Options Processing Error!\n"
        "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
-#line 80 "../autoopts.c"
+#line 78 "../autoopts.c"
   puts(_("realloc of %d bytes at 0x%p failed\n"));
-#line 88 "../init.c"
+#line 83 "../init.c"
   puts(_("\tThis is less than the minimum library version:  "));
 #line 121 "../version.c"
   puts(_("Automated Options version %s\n"
-       "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
-#line 87 "../makeshell.c"
+       "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
+#line 49 "../makeshell.c"
   puts(_("(AutoOpts bug):  %s.\n"));
 #line 90 "../reset.c"
   puts(_("optionResetOpt() called, but reset-option not configured"));
-#line 295 "../usage.c"
+#line 241 "../usage.c"
   puts(_("could not locate the 'help' option"));
-#line 336 "../autoopts.c"
+#line 330 "../autoopts.c"
   puts(_("optionProcess() was called with invalid data"));
-#line 751 "../usage.c"
+#line 697 "../usage.c"
   puts(_("invalid argument type specified"));
-#line 598 "../find.c"
+#line 568 "../find.c"
   puts(_("defaulted to option with optional arg"));
 #line 76 "../alias.c"
   puts(_("aliasing option is out of range."));
-#line 235 "../enum.c"
+#line 210 "../enum.c"
   puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
-#line 108 "../find.c"
+#line 78 "../find.c"
   puts(_("  The following options match:\n"));
-#line 293 "../find.c"
+#line 263 "../find.c"
   puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
 #line 161 "../check.c"
   puts(_("%s: Command line arguments required\n"));
 #line 43 "../alias.c"
   puts(_("%d %s%s options allowed\n"));
-#line 94 "../makeshell.c"
+#line 56 "../makeshell.c"
   puts(_("%s error %d (%s) calling %s for '%s'\n"));
-#line 306 "../makeshell.c"
+#line 268 "../makeshell.c"
   puts(_("interprocess pipe"));
-#line 168 "../version.c"
+#line 171 "../version.c"
   puts(_("error: version option argument '%c' invalid.  Use:\n"
        "\t'v' - version only\n"
        "\t'c' - version and copyright\n"
        "\t'n' - version and full copyright notice\n"));
 #line 58 "../check.c"
   puts(_("%s error:  the '%s' and '%s' options conflict\n"));
-#line 217 "../find.c"
+#line 187 "../find.c"
   puts(_("%s: The '%s' option has been disabled."));
-#line 430 "../find.c"
+#line 400 "../find.c"
   puts(_("%s: The '%s' option has been disabled."));
 #line 38 "../alias.c"
   puts(_("-equivalence"));
-#line 469 "../find.c"
+#line 439 "../find.c"
   puts(_("%s: illegal option -- %c\n"));
 #line 110 "../reset.c"
   puts(_("%s: illegal option -- %c\n"));
-#line 271 "../find.c"
+#line 241 "../find.c"
   puts(_("%s: illegal option -- %s\n"));
-#line 755 "../find.c"
+#line 740 "../find.c"
   puts(_("%s: illegal option -- %s\n"));
 #line 118 "../reset.c"
   puts(_("%s: illegal option -- %s\n"));
-#line 335 "../find.c"
+#line 305 "../find.c"
   puts(_("%s: unknown vendor extension option -- %s\n"));
-#line 160 "../enum.c"
+#line 135 "../enum.c"
   puts(_("  or an integer from %d through %d\n"));
-#line 170 "../enum.c"
+#line 145 "../enum.c"
   puts(_("  or an integer from %d through %d\n"));
-#line 750 "../usage.c"
+#line 696 "../usage.c"
   puts(_("%s error:  invalid option descriptor for %s\n"));
-#line 1084 "../usage.c"
+#line 1030 "../usage.c"
   puts(_("%s error:  invalid option descriptor for %s\n"));
-#line 385 "../find.c"
+#line 355 "../find.c"
   puts(_("%s: invalid option name: %s\n"));
-#line 527 "../find.c"
+#line 497 "../find.c"
   puts(_("%s: The '%s' option requires an argument.\n"));
-#line 156 "../autoopts.c"
+#line 150 "../autoopts.c"
   puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
        "\t'%s' and '%s'."));
 #line 94 "../check.c"
   puts(_("%s error:  The %s option is required\n"));
-#line 632 "../find.c"
+#line 602 "../find.c"
   puts(_("%s: The '%s' option cannot have an argument.\n"));
 #line 151 "../check.c"
   puts(_("%s: Command line arguments are not allowed.\n"));
-#line 536 "../save.c"
+#line 568 "../save.c"
   puts(_("error %d (%s) creating %s\n"));
-#line 235 "../enum.c"
+#line 210 "../enum.c"
   puts(_("%s error:  '%s' does not match any %s keywords.\n"));
 #line 93 "../reset.c"
   puts(_("%s error: The '%s' option requires an argument.\n"));
-#line 186 "../save.c"
+#line 122 "../save.c"
   puts(_("error %d (%s) stat-ing %s\n"));
-#line 239 "../save.c"
+#line 175 "../save.c"
   puts(_("error %d (%s) stat-ing %s\n"));
 #line 143 "../restore.c"
   puts(_("%s error: no saved option state\n"));
-#line 231 "../autoopts.c"
+#line 225 "../autoopts.c"
   puts(_("'%s' is not a command line option.\n"));
 #line 113 "../time.c"
   puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
-#line 131 "../save.c"
-  puts(_("'%s' not defined\n"));
 #line 50 "../time.c"
   puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
 #line 92 "../check.c"
   puts(_("%s error:  The %s option must appear %d times.\n"));
 #line 165 "../numeric.c"
   puts(_("%s error:  '%s' is not a recognizable number.\n"));
-#line 201 "../enum.c"
+#line 176 "../enum.c"
   puts(_("%s error:  %s exceeds %s keyword count\n"));
-#line 333 "../usage.c"
+#line 279 "../usage.c"
   puts(_("Try '%s %s' for more information.\n"));
 #line 45 "../alias.c"
   puts(_("one %s%s option allowed\n"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
   puts(_("standard output"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
   puts(_("standard output"));
-#line 277 "../usage.c"
+#line 223 "../usage.c"
   puts(_("standard output"));
-#line 418 "../usage.c"
+#line 364 "../usage.c"
   puts(_("standard output"));
-#line 628 "../usage.c"
+#line 574 "../usage.c"
   puts(_("standard output"));
-#line 175 "../version.c"
+#line 178 "../version.c"
   puts(_("standard output"));
-#line 277 "../usage.c"
+#line 223 "../usage.c"
   puts(_("standard error"));
-#line 418 "../usage.c"
+#line 364 "../usage.c"
   puts(_("standard error"));
-#line 628 "../usage.c"
+#line 574 "../usage.c"
   puts(_("standard error"));
-#line 175 "../version.c"
+#line 178 "../version.c"
   puts(_("standard error"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
   puts(_("write"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
   puts(_("write"));
-#line 276 "../usage.c"
+#line 222 "../usage.c"
   puts(_("write"));
-#line 417 "../usage.c"
+#line 363 "../usage.c"
   puts(_("write"));
-#line 627 "../usage.c"
+#line 573 "../usage.c"
   puts(_("write"));
-#line 174 "../version.c"
+#line 177 "../version.c"
   puts(_("write"));
 #line 60 "../numeric.c"
   puts(_("%s error:  %s option value %ld is out of range.\n"));
 #line 44 "../check.c"
   puts(_("%s error:  %s option requires the %s option\n"));
-#line 130 "../save.c"
+#line 121 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 185 "../save.c"
+#line 174 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 238 "../save.c"
+#line 193 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 257 "../save.c"
-  puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 535 "../save.c"
+#line 567 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
   /* END-LIBOPTS-MESSAGES */
 
   /* USAGE-TEXT: */
-#line 876 "../usage.c"
+#line 822 "../usage.c"
   puts(_("\t\t\t\t- an alternate for '%s'\n"));
-#line 1151 "../usage.c"
+#line 1097 "../usage.c"
   puts(_("Version, usage and configuration options:"));
-#line 927 "../usage.c"
+#line 873 "../usage.c"
   puts(_("\t\t\t\t- default option for unnamed options\n"));
-#line 840 "../usage.c"
+#line 786 "../usage.c"
   puts(_("\t\t\t\t- disabled as '--%s'\n"));
-#line 1120 "../usage.c"
+#line 1066 "../usage.c"
   puts(_(" --- %-14s %s\n"));
-#line 1118 "../usage.c"
+#line 1064 "../usage.c"
   puts(_("This option has been disabled"));
-#line 867 "../usage.c"
+#line 813 "../usage.c"
   puts(_("\t\t\t\t- enabled by default\n"));
 #line 40 "../alias.c"
   puts(_("%s error:  only "));
-#line 1197 "../usage.c"
+#line 1143 "../usage.c"
   puts(_(" - examining environment variables named %s_*\n"));
 #line 168 "../file.c"
   puts(_("\t\t\t\t- file must not pre-exist\n"));
 #line 172 "../file.c"
   puts(_("\t\t\t\t- file must pre-exist\n"));
-#line 383 "../usage.c"
+#line 329 "../usage.c"
   puts(_("Options are specified by doubled hyphens and their name or by a single\n"
        "hyphen and the flag character.\n"));
-#line 921 "../makeshell.c"
+#line 882 "../makeshell.c"
   puts(_("\n"
        "= = = = = = = =\n\n"
        "This incarnation of genshell will produce\n"
        "a shell script to parse the options for %s:\n\n"));
-#line 167 "../enum.c"
+#line 142 "../enum.c"
   puts(_("  or an integer mask with any of the lower %d bits set\n"));
-#line 900 "../usage.c"
+#line 846 "../usage.c"
   puts(_("\t\t\t\t- is a set membership option\n"));
-#line 921 "../usage.c"
+#line 867 "../usage.c"
   puts(_("\t\t\t\t- must appear between %d and %d times\n"));
-#line 385 "../usage.c"
+#line 331 "../usage.c"
   puts(_("Options are specified by single or double hyphens and their name.\n"));
-#line 907 "../usage.c"
+#line 853 "../usage.c"
   puts(_("\t\t\t\t- may appear multiple times\n"));
-#line 894 "../usage.c"
+#line 840 "../usage.c"
   puts(_("\t\t\t\t- may not be preset\n"));
-#line 1312 "../usage.c"
+#line 1258 "../usage.c"
   puts(_("   Arg Option-Name    Description\n"));
-#line 1248 "../usage.c"
+#line 1194 "../usage.c"
   puts(_("  Flg Arg Option-Name    Description\n"));
-#line 1306 "../usage.c"
+#line 1252 "../usage.c"
   puts(_("  Flg Arg Option-Name    Description\n"));
-#line 1307 "../usage.c"
+#line 1253 "../usage.c"
   puts(_(" %3s %s"));
-#line 1313 "../usage.c"
+#line 1259 "../usage.c"
   puts(_(" %3s %s"));
-#line 390 "../usage.c"
+#line 336 "../usage.c"
   puts(_("The '-#<number>' option may omit the hash char\n"));
-#line 386 "../usage.c"
+#line 332 "../usage.c"
   puts(_("All arguments are named options.\n"));
-#line 974 "../usage.c"
+#line 920 "../usage.c"
   puts(_(" - reading file %s"));
-#line 412 "../usage.c"
+#line 358 "../usage.c"
   puts(_("\n"
        "Please send bug reports to:  <%s>\n"));
 #line 100 "../version.c"
@@ -3130,17 +3130,17 @@ http://tcpreplay.appneta.com\n"));
 #line 129 "../version.c"
   puts(_("\n"
        "Please send bug reports to:  <%s>\n"));
-#line 906 "../usage.c"
+#line 852 "../usage.c"
   puts(_("\t\t\t\t- may NOT appear - preset only\n"));
-#line 947 "../usage.c"
+#line 893 "../usage.c"
   puts(_("\n"
        "The following option preset mechanisms are supported:\n"));
-#line 1195 "../usage.c"
+#line 1141 "../usage.c"
   puts(_("\n"
        "The following option preset mechanisms are supported:\n"));
-#line 685 "../usage.c"
+#line 631 "../usage.c"
   puts(_("prohibits these options:\n"));
-#line 680 "../usage.c"
+#line 626 "../usage.c"
   puts(_("prohibits the option '%s'\n"));
 #line 81 "../numeric.c"
   puts(_("%s%ld to %ld"));
@@ -3158,28 +3158,28 @@ http://tcpreplay.appneta.com\n"));
   puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
 #line 77 "../numeric.c"
   puts(_("%sless than or equal to %ld"));
-#line 393 "../usage.c"
+#line 339 "../usage.c"
   puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
-#line 655 "../usage.c"
+#line 601 "../usage.c"
   puts(_("requires the option '%s'\n"));
-#line 658 "../usage.c"
+#line 604 "../usage.c"
   puts(_("requires these options:\n"));
-#line 1324 "../usage.c"
+#line 1270 "../usage.c"
   puts(_("   Arg Option-Name   Req?  Description\n"));
-#line 1318 "../usage.c"
+#line 1264 "../usage.c"
   puts(_("  Flg Arg Option-Name   Req?  Description\n"));
-#line 168 "../enum.c"
+#line 143 "../enum.c"
   puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
        "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
        "will set them all.  Multiple entries may be passed as an option\n"
        "argument list.\n"));
-#line 913 "../usage.c"
+#line 859 "../usage.c"
   puts(_("\t\t\t\t- may appear up to %d times\n"));
-#line 77 "../enum.c"
+#line 52 "../enum.c"
   puts(_("The valid \"%s\" option keywords are:\n"));
-#line 1155 "../usage.c"
+#line 1101 "../usage.c"
   puts(_("The next option supports vendor supported extra options:"));
-#line 776 "../usage.c"
+#line 722 "../usage.c"
   puts(_("These additional options are:"));
   /* END-USAGE-TEXT */
 }

+ 12 - 3
src/tcpbridge_opts.h

@@ -3,10 +3,10 @@
  *  DO NOT EDIT THIS FILE   (tcpbridge_opts.h)
  *
  *  It has been AutoGen-ed
- *  From the definitions    tcpbridge_opts.def
+ *  From the definitions    ../../src/tcpbridge_opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
  *
  *  AutoOpts is a copyrighted work.  This header file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -47,6 +47,8 @@
 #define AUTOOPTS_TCPBRIDGE_OPTS_H_GUARD 1
 #include "config.h"
 #include <autoopts/options.h>
+#include <stdarg.h>
+#include <stdnoreturn.h>
 
 /**
  *  Ensure that the library used for compiling this generated header is at
@@ -55,13 +57,19 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 167937
+#define AO_TEMPLATE_VERSION 172033
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
   Choke Me.
 #endif
 
+#if GCC_VERSION > 40400
+#define NOT_REACHED __builtin_unreachable();
+#else
+#define NOT_REACHED
+#endif
+
 /**
  *  Enumeration of each option type for tcpbridge
  */
@@ -343,6 +351,7 @@ static inline char* aoGetsText(char const* pz) {
 # endif
 #endif  /* ENABLE_NLS */
 
+
 #ifdef  __cplusplus
 }
 #endif

+ 2 - 2
src/tcpcapinfo.1

@@ -10,12 +10,12 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH tcpcapinfo 1 "26 Aug 2022" "Tcpreplay Suite" "User Commands"
+.TH tcpcapinfo 1 "01 Jan 2023" "Tcpreplay Suite" "User Commands"
 .\"
 .\" DO NOT EDIT THIS FILE (in-mem file)
 .\"
 .\" It has been AutoGen-ed
-.\" From the definitions tcpcapinfo_opts.def
+.\" From the definitions ../../src/tcpcapinfo_opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
 \f\*[B-Font]tcpcapinfo\fP

+ 109 - 109
src/tcpcapinfo_opts.c

@@ -3,10 +3,10 @@
  *  DO NOT EDIT THIS FILE   (tcpcapinfo_opts.c)
  *
  *  It has been AutoGen-ed
- *  From the definitions    tcpcapinfo_opts.def
+ *  From the definitions    ../../src/tcpcapinfo_opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
  *
  *  AutoOpts is a copyrighted work.  This source file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -42,11 +42,15 @@
 #define OPTION_CODE_COMPILE 1
 #include "tcpcapinfo_opts.h"
 #include <sys/types.h>
+#include <sys/stat.h>
 
+#include <errno.h>
+#include <fcntl.h>
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <errno.h>
+#include <string.h>
+#include <unistd.h>
 
 #ifdef  __cplusplus
 extern "C" {
@@ -247,7 +251,7 @@ static tOptDesc optDesc[OPTION_CT] = {
 #define zDetail         (tcpcapinfo_opt_strs+1450)
 /** The full version string for tcpcapinfo. */
 #define zFullVersion    (NULL)
-/* extracted from optcode.tlib near line 364 */
+/* extracted from optcode.tlib near line 342 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -540,12 +544,12 @@ static void bogus_function(void) {
      extract the correct strings.  These strings are actually referenced
      by a field name in the tcpcapinfoOptions structure noted in the
      comments below.  The literal text is defined in tcpcapinfo_opt_strs.
-   
+
      NOTE: the strings below are segmented with respect to the source string
      tcpcapinfo_opt_strs.  The strings above are handed off for translation
      at run time a paragraph at a time.  Consequently, they are presented here
      for translation a paragraph at a time.
-   
+
      ALSO: often the description for an option will reference another option
      by name.  These are set off with apostrophe quotes (I hope).  Do not
      translate option names.
@@ -603,234 +607,230 @@ simple checksum value of the packet.\n"));
   /* LIBOPTS-MESSAGES: */
 #line 67 "../autoopts.c"
   puts(_("allocation of %d bytes failed\n"));
-#line 93 "../autoopts.c"
+#line 89 "../autoopts.c"
   puts(_("allocation of %d bytes failed\n"));
-#line 53 "../init.c"
+#line 48 "../init.c"
   puts(_("AutoOpts function called without option descriptor\n"));
-#line 86 "../init.c"
+#line 81 "../init.c"
   puts(_("\tThis exceeds the compiled library version:  "));
-#line 84 "../init.c"
+#line 79 "../init.c"
   puts(_("Automated Options Processing Error!\n"
        "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
-#line 80 "../autoopts.c"
+#line 78 "../autoopts.c"
   puts(_("realloc of %d bytes at 0x%p failed\n"));
-#line 88 "../init.c"
+#line 83 "../init.c"
   puts(_("\tThis is less than the minimum library version:  "));
 #line 121 "../version.c"
   puts(_("Automated Options version %s\n"
-       "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
-#line 87 "../makeshell.c"
+       "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
+#line 49 "../makeshell.c"
   puts(_("(AutoOpts bug):  %s.\n"));
 #line 90 "../reset.c"
   puts(_("optionResetOpt() called, but reset-option not configured"));
-#line 295 "../usage.c"
+#line 241 "../usage.c"
   puts(_("could not locate the 'help' option"));
-#line 336 "../autoopts.c"
+#line 330 "../autoopts.c"
   puts(_("optionProcess() was called with invalid data"));
-#line 751 "../usage.c"
+#line 697 "../usage.c"
   puts(_("invalid argument type specified"));
-#line 598 "../find.c"
+#line 568 "../find.c"
   puts(_("defaulted to option with optional arg"));
 #line 76 "../alias.c"
   puts(_("aliasing option is out of range."));
-#line 235 "../enum.c"
+#line 210 "../enum.c"
   puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
-#line 108 "../find.c"
+#line 78 "../find.c"
   puts(_("  The following options match:\n"));
-#line 293 "../find.c"
+#line 263 "../find.c"
   puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
 #line 161 "../check.c"
   puts(_("%s: Command line arguments required\n"));
 #line 43 "../alias.c"
   puts(_("%d %s%s options allowed\n"));
-#line 94 "../makeshell.c"
+#line 56 "../makeshell.c"
   puts(_("%s error %d (%s) calling %s for '%s'\n"));
-#line 306 "../makeshell.c"
+#line 268 "../makeshell.c"
   puts(_("interprocess pipe"));
-#line 168 "../version.c"
+#line 171 "../version.c"
   puts(_("error: version option argument '%c' invalid.  Use:\n"
        "\t'v' - version only\n"
        "\t'c' - version and copyright\n"
        "\t'n' - version and full copyright notice\n"));
 #line 58 "../check.c"
   puts(_("%s error:  the '%s' and '%s' options conflict\n"));
-#line 217 "../find.c"
+#line 187 "../find.c"
   puts(_("%s: The '%s' option has been disabled."));
-#line 430 "../find.c"
+#line 400 "../find.c"
   puts(_("%s: The '%s' option has been disabled."));
 #line 38 "../alias.c"
   puts(_("-equivalence"));
-#line 469 "../find.c"
+#line 439 "../find.c"
   puts(_("%s: illegal option -- %c\n"));
 #line 110 "../reset.c"
   puts(_("%s: illegal option -- %c\n"));
-#line 271 "../find.c"
+#line 241 "../find.c"
   puts(_("%s: illegal option -- %s\n"));
-#line 755 "../find.c"
+#line 740 "../find.c"
   puts(_("%s: illegal option -- %s\n"));
 #line 118 "../reset.c"
   puts(_("%s: illegal option -- %s\n"));
-#line 335 "../find.c"
+#line 305 "../find.c"
   puts(_("%s: unknown vendor extension option -- %s\n"));
-#line 160 "../enum.c"
+#line 135 "../enum.c"
   puts(_("  or an integer from %d through %d\n"));
-#line 170 "../enum.c"
+#line 145 "../enum.c"
   puts(_("  or an integer from %d through %d\n"));
-#line 750 "../usage.c"
+#line 696 "../usage.c"
   puts(_("%s error:  invalid option descriptor for %s\n"));
-#line 1084 "../usage.c"
+#line 1030 "../usage.c"
   puts(_("%s error:  invalid option descriptor for %s\n"));
-#line 385 "../find.c"
+#line 355 "../find.c"
   puts(_("%s: invalid option name: %s\n"));
-#line 527 "../find.c"
+#line 497 "../find.c"
   puts(_("%s: The '%s' option requires an argument.\n"));
-#line 156 "../autoopts.c"
+#line 150 "../autoopts.c"
   puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
        "\t'%s' and '%s'."));
 #line 94 "../check.c"
   puts(_("%s error:  The %s option is required\n"));
-#line 632 "../find.c"
+#line 602 "../find.c"
   puts(_("%s: The '%s' option cannot have an argument.\n"));
 #line 151 "../check.c"
   puts(_("%s: Command line arguments are not allowed.\n"));
-#line 536 "../save.c"
+#line 568 "../save.c"
   puts(_("error %d (%s) creating %s\n"));
-#line 235 "../enum.c"
+#line 210 "../enum.c"
   puts(_("%s error:  '%s' does not match any %s keywords.\n"));
 #line 93 "../reset.c"
   puts(_("%s error: The '%s' option requires an argument.\n"));
-#line 186 "../save.c"
+#line 122 "../save.c"
   puts(_("error %d (%s) stat-ing %s\n"));
-#line 239 "../save.c"
+#line 175 "../save.c"
   puts(_("error %d (%s) stat-ing %s\n"));
 #line 143 "../restore.c"
   puts(_("%s error: no saved option state\n"));
-#line 231 "../autoopts.c"
+#line 225 "../autoopts.c"
   puts(_("'%s' is not a command line option.\n"));
 #line 113 "../time.c"
   puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
-#line 131 "../save.c"
-  puts(_("'%s' not defined\n"));
 #line 50 "../time.c"
   puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
 #line 92 "../check.c"
   puts(_("%s error:  The %s option must appear %d times.\n"));
 #line 165 "../numeric.c"
   puts(_("%s error:  '%s' is not a recognizable number.\n"));
-#line 201 "../enum.c"
+#line 176 "../enum.c"
   puts(_("%s error:  %s exceeds %s keyword count\n"));
-#line 333 "../usage.c"
+#line 279 "../usage.c"
   puts(_("Try '%s %s' for more information.\n"));
 #line 45 "../alias.c"
   puts(_("one %s%s option allowed\n"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
   puts(_("standard output"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
   puts(_("standard output"));
-#line 277 "../usage.c"
+#line 223 "../usage.c"
   puts(_("standard output"));
-#line 418 "../usage.c"
+#line 364 "../usage.c"
   puts(_("standard output"));
-#line 628 "../usage.c"
+#line 574 "../usage.c"
   puts(_("standard output"));
-#line 175 "../version.c"
+#line 178 "../version.c"
   puts(_("standard output"));
-#line 277 "../usage.c"
+#line 223 "../usage.c"
   puts(_("standard error"));
-#line 418 "../usage.c"
+#line 364 "../usage.c"
   puts(_("standard error"));
-#line 628 "../usage.c"
+#line 574 "../usage.c"
   puts(_("standard error"));
-#line 175 "../version.c"
+#line 178 "../version.c"
   puts(_("standard error"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
   puts(_("write"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
   puts(_("write"));
-#line 276 "../usage.c"
+#line 222 "../usage.c"
   puts(_("write"));
-#line 417 "../usage.c"
+#line 363 "../usage.c"
   puts(_("write"));
-#line 627 "../usage.c"
+#line 573 "../usage.c"
   puts(_("write"));
-#line 174 "../version.c"
+#line 177 "../version.c"
   puts(_("write"));
 #line 60 "../numeric.c"
   puts(_("%s error:  %s option value %ld is out of range.\n"));
 #line 44 "../check.c"
   puts(_("%s error:  %s option requires the %s option\n"));
-#line 130 "../save.c"
+#line 121 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 185 "../save.c"
+#line 174 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 238 "../save.c"
+#line 193 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 257 "../save.c"
-  puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 535 "../save.c"
+#line 567 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
   /* END-LIBOPTS-MESSAGES */
 
   /* USAGE-TEXT: */
-#line 876 "../usage.c"
+#line 822 "../usage.c"
   puts(_("\t\t\t\t- an alternate for '%s'\n"));
-#line 1151 "../usage.c"
+#line 1097 "../usage.c"
   puts(_("Version, usage and configuration options:"));
-#line 927 "../usage.c"
+#line 873 "../usage.c"
   puts(_("\t\t\t\t- default option for unnamed options\n"));
-#line 840 "../usage.c"
+#line 786 "../usage.c"
   puts(_("\t\t\t\t- disabled as '--%s'\n"));
-#line 1120 "../usage.c"
+#line 1066 "../usage.c"
   puts(_(" --- %-14s %s\n"));
-#line 1118 "../usage.c"
+#line 1064 "../usage.c"
   puts(_("This option has been disabled"));
-#line 867 "../usage.c"
+#line 813 "../usage.c"
   puts(_("\t\t\t\t- enabled by default\n"));
 #line 40 "../alias.c"
   puts(_("%s error:  only "));
-#line 1197 "../usage.c"
+#line 1143 "../usage.c"
   puts(_(" - examining environment variables named %s_*\n"));
 #line 168 "../file.c"
   puts(_("\t\t\t\t- file must not pre-exist\n"));
 #line 172 "../file.c"
   puts(_("\t\t\t\t- file must pre-exist\n"));
-#line 383 "../usage.c"
+#line 329 "../usage.c"
   puts(_("Options are specified by doubled hyphens and their name or by a single\n"
        "hyphen and the flag character.\n"));
-#line 921 "../makeshell.c"
+#line 882 "../makeshell.c"
   puts(_("\n"
        "= = = = = = = =\n\n"
        "This incarnation of genshell will produce\n"
        "a shell script to parse the options for %s:\n\n"));
-#line 167 "../enum.c"
+#line 142 "../enum.c"
   puts(_("  or an integer mask with any of the lower %d bits set\n"));
-#line 900 "../usage.c"
+#line 846 "../usage.c"
   puts(_("\t\t\t\t- is a set membership option\n"));
-#line 921 "../usage.c"
+#line 867 "../usage.c"
   puts(_("\t\t\t\t- must appear between %d and %d times\n"));
-#line 385 "../usage.c"
+#line 331 "../usage.c"
   puts(_("Options are specified by single or double hyphens and their name.\n"));
-#line 907 "../usage.c"
+#line 853 "../usage.c"
   puts(_("\t\t\t\t- may appear multiple times\n"));
-#line 894 "../usage.c"
+#line 840 "../usage.c"
   puts(_("\t\t\t\t- may not be preset\n"));
-#line 1312 "../usage.c"
+#line 1258 "../usage.c"
   puts(_("   Arg Option-Name    Description\n"));
-#line 1248 "../usage.c"
+#line 1194 "../usage.c"
   puts(_("  Flg Arg Option-Name    Description\n"));
-#line 1306 "../usage.c"
+#line 1252 "../usage.c"
   puts(_("  Flg Arg Option-Name    Description\n"));
-#line 1307 "../usage.c"
+#line 1253 "../usage.c"
   puts(_(" %3s %s"));
-#line 1313 "../usage.c"
+#line 1259 "../usage.c"
   puts(_(" %3s %s"));
-#line 390 "../usage.c"
+#line 336 "../usage.c"
   puts(_("The '-#<number>' option may omit the hash char\n"));
-#line 386 "../usage.c"
+#line 332 "../usage.c"
   puts(_("All arguments are named options.\n"));
-#line 974 "../usage.c"
+#line 920 "../usage.c"
   puts(_(" - reading file %s"));
-#line 412 "../usage.c"
+#line 358 "../usage.c"
   puts(_("\n"
        "Please send bug reports to:  <%s>\n"));
 #line 100 "../version.c"
@@ -839,17 +839,17 @@ simple checksum value of the packet.\n"));
 #line 129 "../version.c"
   puts(_("\n"
        "Please send bug reports to:  <%s>\n"));
-#line 906 "../usage.c"
+#line 852 "../usage.c"
   puts(_("\t\t\t\t- may NOT appear - preset only\n"));
-#line 947 "../usage.c"
+#line 893 "../usage.c"
   puts(_("\n"
        "The following option preset mechanisms are supported:\n"));
-#line 1195 "../usage.c"
+#line 1141 "../usage.c"
   puts(_("\n"
        "The following option preset mechanisms are supported:\n"));
-#line 685 "../usage.c"
+#line 631 "../usage.c"
   puts(_("prohibits these options:\n"));
-#line 680 "../usage.c"
+#line 626 "../usage.c"
   puts(_("prohibits the option '%s'\n"));
 #line 81 "../numeric.c"
   puts(_("%s%ld to %ld"));
@@ -867,28 +867,28 @@ simple checksum value of the packet.\n"));
   puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
 #line 77 "../numeric.c"
   puts(_("%sless than or equal to %ld"));
-#line 393 "../usage.c"
+#line 339 "../usage.c"
   puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
-#line 655 "../usage.c"
+#line 601 "../usage.c"
   puts(_("requires the option '%s'\n"));
-#line 658 "../usage.c"
+#line 604 "../usage.c"
   puts(_("requires these options:\n"));
-#line 1324 "../usage.c"
+#line 1270 "../usage.c"
   puts(_("   Arg Option-Name   Req?  Description\n"));
-#line 1318 "../usage.c"
+#line 1264 "../usage.c"
   puts(_("  Flg Arg Option-Name   Req?  Description\n"));
-#line 168 "../enum.c"
+#line 143 "../enum.c"
   puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
        "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
        "will set them all.  Multiple entries may be passed as an option\n"
        "argument list.\n"));
-#line 913 "../usage.c"
+#line 859 "../usage.c"
   puts(_("\t\t\t\t- may appear up to %d times\n"));
-#line 77 "../enum.c"
+#line 52 "../enum.c"
   puts(_("The valid \"%s\" option keywords are:\n"));
-#line 1155 "../usage.c"
+#line 1101 "../usage.c"
   puts(_("The next option supports vendor supported extra options:"));
-#line 776 "../usage.c"
+#line 722 "../usage.c"
   puts(_("These additional options are:"));
   /* END-USAGE-TEXT */
 }

+ 12 - 3
src/tcpcapinfo_opts.h

@@ -3,10 +3,10 @@
  *  DO NOT EDIT THIS FILE   (tcpcapinfo_opts.h)
  *
  *  It has been AutoGen-ed
- *  From the definitions    tcpcapinfo_opts.def
+ *  From the definitions    ../../src/tcpcapinfo_opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
  *
  *  AutoOpts is a copyrighted work.  This header file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -47,6 +47,8 @@
 #define AUTOOPTS_TCPCAPINFO_OPTS_H_GUARD 1
 #include "config.h"
 #include <autoopts/options.h>
+#include <stdarg.h>
+#include <stdnoreturn.h>
 
 /**
  *  Ensure that the library used for compiling this generated header is at
@@ -55,13 +57,19 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 167937
+#define AO_TEMPLATE_VERSION 172033
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
   Choke Me.
 #endif
 
+#if GCC_VERSION > 40400
+#define NOT_REACHED __builtin_unreachable();
+#else
+#define NOT_REACHED
+#endif
+
 /**
  *  Enumeration of each option type for tcpcapinfo
  */
@@ -197,6 +205,7 @@ static inline char* aoGetsText(char const* pz) {
 # endif
 #endif  /* ENABLE_NLS */
 
+
 #ifdef  __cplusplus
 }
 #endif

+ 46 - 132
src/tcpedit/Makefile.in

@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -243,29 +243,7 @@ am__v_at_0 = @
 am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/checksum.Po ./$(DEPDIR)/dlt.Po \
-	./$(DEPDIR)/edit_packet.Po ./$(DEPDIR)/fuzzing.Po \
-	./$(DEPDIR)/incremental_checksum.Po ./$(DEPDIR)/parse_args.Po \
-	./$(DEPDIR)/portmap.Po ./$(DEPDIR)/rewrite_sequence.Po \
-	./$(DEPDIR)/tcpedit.Po ./$(DEPDIR)/tcpedit_api.Po \
-	plugins/$(DEPDIR)/dlt_plugins.Po \
-	plugins/$(DEPDIR)/dlt_utils.Po plugins/$(DEPDIR)/ethernet.Po \
-	plugins/dlt_en10mb/$(DEPDIR)/en10mb.Po \
-	plugins/dlt_en10mb/$(DEPDIR)/en10mb_api.Po \
-	plugins/dlt_hdlc/$(DEPDIR)/hdlc.Po \
-	plugins/dlt_hdlc/$(DEPDIR)/hdlc_api.Po \
-	plugins/dlt_ieee80211/$(DEPDIR)/ieee80211.Po \
-	plugins/dlt_ieee80211/$(DEPDIR)/ieee80211_hdr.Po \
-	plugins/dlt_jnpr_ether/$(DEPDIR)/jnpr_ether.Po \
-	plugins/dlt_linuxsll/$(DEPDIR)/linuxsll.Po \
-	plugins/dlt_loop/$(DEPDIR)/loop.Po \
-	plugins/dlt_null/$(DEPDIR)/null.Po \
-	plugins/dlt_pppserial/$(DEPDIR)/pppserial.Po \
-	plugins/dlt_radiotap/$(DEPDIR)/radiotap.Po \
-	plugins/dlt_raw/$(DEPDIR)/raw.Po \
-	plugins/dlt_user/$(DEPDIR)/user.Po \
-	plugins/dlt_user/$(DEPDIR)/user_api.Po
+am__depfiles_maybe = depfiles
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -481,7 +459,6 @@ prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
 rmmod = @rmmod@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -617,8 +594,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
 	esac;
 $(srcdir)/plugins/Makefile.am $(srcdir)/plugins/dlt_en10mb/Makefile.am $(srcdir)/plugins/dlt_hdlc/Makefile.am $(srcdir)/plugins/dlt_user/Makefile.am $(srcdir)/plugins/dlt_raw/Makefile.am $(srcdir)/plugins/dlt_null/Makefile.am $(srcdir)/plugins/dlt_loop/Makefile.am $(srcdir)/plugins/dlt_linuxsll/Makefile.am $(srcdir)/plugins/dlt_ieee80211/Makefile.am $(srcdir)/plugins/dlt_radiotap/Makefile.am $(srcdir)/plugins/dlt_jnpr_ether/Makefile.am $(srcdir)/plugins/dlt_pppserial/Makefile.am $(am__empty):
 
@@ -773,40 +750,34 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checksum.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlt.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edit_packet.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fuzzing.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/incremental_checksum.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse_args.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/portmap.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rewrite_sequence.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpedit.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpedit_api.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/$(DEPDIR)/dlt_plugins.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/$(DEPDIR)/dlt_utils.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/$(DEPDIR)/ethernet.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_en10mb/$(DEPDIR)/en10mb.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_en10mb/$(DEPDIR)/en10mb_api.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_hdlc/$(DEPDIR)/hdlc.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_hdlc/$(DEPDIR)/hdlc_api.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_ieee80211/$(DEPDIR)/ieee80211.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_ieee80211/$(DEPDIR)/ieee80211_hdr.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_jnpr_ether/$(DEPDIR)/jnpr_ether.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_linuxsll/$(DEPDIR)/linuxsll.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_loop/$(DEPDIR)/loop.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_null/$(DEPDIR)/null.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_pppserial/$(DEPDIR)/pppserial.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_radiotap/$(DEPDIR)/radiotap.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_raw/$(DEPDIR)/raw.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_user/$(DEPDIR)/user.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_user/$(DEPDIR)/user_api.Po@am__quote@ # am--include-marker
-
-$(am__depfiles_remade):
-	@$(MKDIR_P) $(@D)
-	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
-
-am--depfiles: $(am__depfiles_remade)
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checksum.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edit_packet.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fuzzing.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/incremental_checksum.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse_args.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/portmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rewrite_sequence.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpedit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpedit_api.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/$(DEPDIR)/dlt_plugins.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/$(DEPDIR)/dlt_utils.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/$(DEPDIR)/ethernet.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_en10mb/$(DEPDIR)/en10mb.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_en10mb/$(DEPDIR)/en10mb_api.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_hdlc/$(DEPDIR)/hdlc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_hdlc/$(DEPDIR)/hdlc_api.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_ieee80211/$(DEPDIR)/ieee80211.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_ieee80211/$(DEPDIR)/ieee80211_hdr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_jnpr_ether/$(DEPDIR)/jnpr_ether.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_linuxsll/$(DEPDIR)/linuxsll.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_loop/$(DEPDIR)/loop.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_null/$(DEPDIR)/null.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_pppserial/$(DEPDIR)/pppserial.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_radiotap/$(DEPDIR)/radiotap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_raw/$(DEPDIR)/raw.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_user/$(DEPDIR)/user.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@plugins/dlt_user/$(DEPDIR)/user_api.Po@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -890,10 +861,7 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-distdir: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
+distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -992,34 +960,7 @@ clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
 	mostlyclean-am
 
 distclean: distclean-am
-		-rm -f ./$(DEPDIR)/checksum.Po
-	-rm -f ./$(DEPDIR)/dlt.Po
-	-rm -f ./$(DEPDIR)/edit_packet.Po
-	-rm -f ./$(DEPDIR)/fuzzing.Po
-	-rm -f ./$(DEPDIR)/incremental_checksum.Po
-	-rm -f ./$(DEPDIR)/parse_args.Po
-	-rm -f ./$(DEPDIR)/portmap.Po
-	-rm -f ./$(DEPDIR)/rewrite_sequence.Po
-	-rm -f ./$(DEPDIR)/tcpedit.Po
-	-rm -f ./$(DEPDIR)/tcpedit_api.Po
-	-rm -f plugins/$(DEPDIR)/dlt_plugins.Po
-	-rm -f plugins/$(DEPDIR)/dlt_utils.Po
-	-rm -f plugins/$(DEPDIR)/ethernet.Po
-	-rm -f plugins/dlt_en10mb/$(DEPDIR)/en10mb.Po
-	-rm -f plugins/dlt_en10mb/$(DEPDIR)/en10mb_api.Po
-	-rm -f plugins/dlt_hdlc/$(DEPDIR)/hdlc.Po
-	-rm -f plugins/dlt_hdlc/$(DEPDIR)/hdlc_api.Po
-	-rm -f plugins/dlt_ieee80211/$(DEPDIR)/ieee80211.Po
-	-rm -f plugins/dlt_ieee80211/$(DEPDIR)/ieee80211_hdr.Po
-	-rm -f plugins/dlt_jnpr_ether/$(DEPDIR)/jnpr_ether.Po
-	-rm -f plugins/dlt_linuxsll/$(DEPDIR)/linuxsll.Po
-	-rm -f plugins/dlt_loop/$(DEPDIR)/loop.Po
-	-rm -f plugins/dlt_null/$(DEPDIR)/null.Po
-	-rm -f plugins/dlt_pppserial/$(DEPDIR)/pppserial.Po
-	-rm -f plugins/dlt_radiotap/$(DEPDIR)/radiotap.Po
-	-rm -f plugins/dlt_raw/$(DEPDIR)/raw.Po
-	-rm -f plugins/dlt_user/$(DEPDIR)/user.Po
-	-rm -f plugins/dlt_user/$(DEPDIR)/user_api.Po
+	-rm -rf ./$(DEPDIR) plugins/$(DEPDIR) plugins/dlt_en10mb/$(DEPDIR) plugins/dlt_hdlc/$(DEPDIR) plugins/dlt_ieee80211/$(DEPDIR) plugins/dlt_jnpr_ether/$(DEPDIR) plugins/dlt_linuxsll/$(DEPDIR) plugins/dlt_loop/$(DEPDIR) plugins/dlt_null/$(DEPDIR) plugins/dlt_pppserial/$(DEPDIR) plugins/dlt_radiotap/$(DEPDIR) plugins/dlt_raw/$(DEPDIR) plugins/dlt_user/$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -1065,34 +1006,7 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-		-rm -f ./$(DEPDIR)/checksum.Po
-	-rm -f ./$(DEPDIR)/dlt.Po
-	-rm -f ./$(DEPDIR)/edit_packet.Po
-	-rm -f ./$(DEPDIR)/fuzzing.Po
-	-rm -f ./$(DEPDIR)/incremental_checksum.Po
-	-rm -f ./$(DEPDIR)/parse_args.Po
-	-rm -f ./$(DEPDIR)/portmap.Po
-	-rm -f ./$(DEPDIR)/rewrite_sequence.Po
-	-rm -f ./$(DEPDIR)/tcpedit.Po
-	-rm -f ./$(DEPDIR)/tcpedit_api.Po
-	-rm -f plugins/$(DEPDIR)/dlt_plugins.Po
-	-rm -f plugins/$(DEPDIR)/dlt_utils.Po
-	-rm -f plugins/$(DEPDIR)/ethernet.Po
-	-rm -f plugins/dlt_en10mb/$(DEPDIR)/en10mb.Po
-	-rm -f plugins/dlt_en10mb/$(DEPDIR)/en10mb_api.Po
-	-rm -f plugins/dlt_hdlc/$(DEPDIR)/hdlc.Po
-	-rm -f plugins/dlt_hdlc/$(DEPDIR)/hdlc_api.Po
-	-rm -f plugins/dlt_ieee80211/$(DEPDIR)/ieee80211.Po
-	-rm -f plugins/dlt_ieee80211/$(DEPDIR)/ieee80211_hdr.Po
-	-rm -f plugins/dlt_jnpr_ether/$(DEPDIR)/jnpr_ether.Po
-	-rm -f plugins/dlt_linuxsll/$(DEPDIR)/linuxsll.Po
-	-rm -f plugins/dlt_loop/$(DEPDIR)/loop.Po
-	-rm -f plugins/dlt_null/$(DEPDIR)/null.Po
-	-rm -f plugins/dlt_pppserial/$(DEPDIR)/pppserial.Po
-	-rm -f plugins/dlt_radiotap/$(DEPDIR)/radiotap.Po
-	-rm -f plugins/dlt_raw/$(DEPDIR)/raw.Po
-	-rm -f plugins/dlt_user/$(DEPDIR)/user.Po
-	-rm -f plugins/dlt_user/$(DEPDIR)/user_api.Po
+	-rm -rf ./$(DEPDIR) plugins/$(DEPDIR) plugins/dlt_en10mb/$(DEPDIR) plugins/dlt_hdlc/$(DEPDIR) plugins/dlt_ieee80211/$(DEPDIR) plugins/dlt_jnpr_ether/$(DEPDIR) plugins/dlt_linuxsll/$(DEPDIR) plugins/dlt_loop/$(DEPDIR) plugins/dlt_null/$(DEPDIR) plugins/dlt_pppserial/$(DEPDIR) plugins/dlt_radiotap/$(DEPDIR) plugins/dlt_raw/$(DEPDIR) plugins/dlt_user/$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -1113,16 +1027,16 @@ uninstall-am:
 
 .MAKE: all check install install-am install-strip
 
-.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
-	clean-generic clean-libtool clean-noinstLIBRARIES \
-	cscopelist-am ctags ctags-am distclean distclean-compile \
-	distclean-generic distclean-libtool distclean-tags distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \
+	ctags-am distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am

+ 10 - 2
src/tcpedit/tcpedit_stub.h

@@ -3,10 +3,10 @@
  *  DO NOT EDIT THIS FILE   (tcpedit_stub.h)
  *
  *  It has been AutoGen-ed
- *  From the definitions    tcpedit_stub.def
+ *  From the definitions    ../../../src/tcpedit/tcpedit_stub.def
  *  and the template file   options
  *
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
  *
  *  AutoOpts is a copyrighted work.  This header file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -25,6 +25,14 @@
 #ifndef AUTOOPTS_TCPEDIT_STUB_H_GUARD
 #define AUTOOPTS_TCPEDIT_STUB_H_GUARD 1
 #include <autoopts/options.h>
+#include <stdarg.h>
+#include <stdnoreturn.h>
+
+#if GCC_VERSION > 40400
+#define NOT_REACHED __builtin_unreachable();
+#else
+#define NOT_REACHED
+#endif
 
 /**
  *  Enumeration of each option type for tcpedit_stub

+ 2 - 2
src/tcpliveplay.1

@@ -10,12 +10,12 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH tcpliveplay 1 "26 Aug 2022" "tcpliveplay" "User Commands"
+.TH tcpliveplay 1 "01 Jan 2023" "tcpliveplay" "User Commands"
 .\"
 .\" DO NOT EDIT THIS FILE (in-mem file)
 .\"
 .\" It has been AutoGen-ed
-.\" From the definitions tcpliveplay_opts.def
+.\" From the definitions ../../src/tcpliveplay_opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
 \f\*[B-Font]tcpliveplay\fP

+ 109 - 109
src/tcpliveplay_opts.c

@@ -3,10 +3,10 @@
  *  DO NOT EDIT THIS FILE   (tcpliveplay_opts.c)
  *
  *  It has been AutoGen-ed
- *  From the definitions    tcpliveplay_opts.def
+ *  From the definitions    ../../src/tcpliveplay_opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
  *
  *  AutoOpts is a copyrighted work.  This source file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -54,11 +54,15 @@
 #define OPTION_CODE_COMPILE 1
 #include "tcpliveplay_opts.h"
 #include <sys/types.h>
+#include <sys/stat.h>
 
+#include <errno.h>
+#include <fcntl.h>
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <errno.h>
+#include <string.h>
+#include <unistd.h>
 
 #ifdef  __cplusplus
 extern "C" {
@@ -356,7 +360,7 @@ static char const * const apzHomeList[2] = {
 #define zDetail         (tcpliveplay_opt_strs+2561)
 /** The full version string for tcpliveplay. */
 #define zFullVersion    (NULL)
-/* extracted from optcode.tlib near line 364 */
+/* extracted from optcode.tlib near line 342 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -695,12 +699,12 @@ static void bogus_function(void) {
      extract the correct strings.  These strings are actually referenced
      by a field name in the tcpliveplayOptions structure noted in the
      comments below.  The literal text is defined in tcpliveplay_opt_strs.
-   
+
      NOTE: the strings below are segmented with respect to the source string
      tcpliveplay_opt_strs.  The strings above are handed off for translation
      at run time a paragraph at a time.  Consequently, they are presented here
      for translation a paragraph at a time.
-   
+
      ALSO: often the description for an option will reference another option
      by name.  These are set off with apostrophe quotes (I hope).  Do not
      translate option names.
@@ -787,234 +791,230 @@ http://tcpreplay.appneta.com\n"));
   /* LIBOPTS-MESSAGES: */
 #line 67 "../autoopts.c"
   puts(_("allocation of %d bytes failed\n"));
-#line 93 "../autoopts.c"
+#line 89 "../autoopts.c"
   puts(_("allocation of %d bytes failed\n"));
-#line 53 "../init.c"
+#line 48 "../init.c"
   puts(_("AutoOpts function called without option descriptor\n"));
-#line 86 "../init.c"
+#line 81 "../init.c"
   puts(_("\tThis exceeds the compiled library version:  "));
-#line 84 "../init.c"
+#line 79 "../init.c"
   puts(_("Automated Options Processing Error!\n"
        "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
-#line 80 "../autoopts.c"
+#line 78 "../autoopts.c"
   puts(_("realloc of %d bytes at 0x%p failed\n"));
-#line 88 "../init.c"
+#line 83 "../init.c"
   puts(_("\tThis is less than the minimum library version:  "));
 #line 121 "../version.c"
   puts(_("Automated Options version %s\n"
-       "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
-#line 87 "../makeshell.c"
+       "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
+#line 49 "../makeshell.c"
   puts(_("(AutoOpts bug):  %s.\n"));
 #line 90 "../reset.c"
   puts(_("optionResetOpt() called, but reset-option not configured"));
-#line 295 "../usage.c"
+#line 241 "../usage.c"
   puts(_("could not locate the 'help' option"));
-#line 336 "../autoopts.c"
+#line 330 "../autoopts.c"
   puts(_("optionProcess() was called with invalid data"));
-#line 751 "../usage.c"
+#line 697 "../usage.c"
   puts(_("invalid argument type specified"));
-#line 598 "../find.c"
+#line 568 "../find.c"
   puts(_("defaulted to option with optional arg"));
 #line 76 "../alias.c"
   puts(_("aliasing option is out of range."));
-#line 235 "../enum.c"
+#line 210 "../enum.c"
   puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
-#line 108 "../find.c"
+#line 78 "../find.c"
   puts(_("  The following options match:\n"));
-#line 293 "../find.c"
+#line 263 "../find.c"
   puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
 #line 161 "../check.c"
   puts(_("%s: Command line arguments required\n"));
 #line 43 "../alias.c"
   puts(_("%d %s%s options allowed\n"));
-#line 94 "../makeshell.c"
+#line 56 "../makeshell.c"
   puts(_("%s error %d (%s) calling %s for '%s'\n"));
-#line 306 "../makeshell.c"
+#line 268 "../makeshell.c"
   puts(_("interprocess pipe"));
-#line 168 "../version.c"
+#line 171 "../version.c"
   puts(_("error: version option argument '%c' invalid.  Use:\n"
        "\t'v' - version only\n"
        "\t'c' - version and copyright\n"
        "\t'n' - version and full copyright notice\n"));
 #line 58 "../check.c"
   puts(_("%s error:  the '%s' and '%s' options conflict\n"));
-#line 217 "../find.c"
+#line 187 "../find.c"
   puts(_("%s: The '%s' option has been disabled."));
-#line 430 "../find.c"
+#line 400 "../find.c"
   puts(_("%s: The '%s' option has been disabled."));
 #line 38 "../alias.c"
   puts(_("-equivalence"));
-#line 469 "../find.c"
+#line 439 "../find.c"
   puts(_("%s: illegal option -- %c\n"));
 #line 110 "../reset.c"
   puts(_("%s: illegal option -- %c\n"));
-#line 271 "../find.c"
+#line 241 "../find.c"
   puts(_("%s: illegal option -- %s\n"));
-#line 755 "../find.c"
+#line 740 "../find.c"
   puts(_("%s: illegal option -- %s\n"));
 #line 118 "../reset.c"
   puts(_("%s: illegal option -- %s\n"));
-#line 335 "../find.c"
+#line 305 "../find.c"
   puts(_("%s: unknown vendor extension option -- %s\n"));
-#line 160 "../enum.c"
+#line 135 "../enum.c"
   puts(_("  or an integer from %d through %d\n"));
-#line 170 "../enum.c"
+#line 145 "../enum.c"
   puts(_("  or an integer from %d through %d\n"));
-#line 750 "../usage.c"
+#line 696 "../usage.c"
   puts(_("%s error:  invalid option descriptor for %s\n"));
-#line 1084 "../usage.c"
+#line 1030 "../usage.c"
   puts(_("%s error:  invalid option descriptor for %s\n"));
-#line 385 "../find.c"
+#line 355 "../find.c"
   puts(_("%s: invalid option name: %s\n"));
-#line 527 "../find.c"
+#line 497 "../find.c"
   puts(_("%s: The '%s' option requires an argument.\n"));
-#line 156 "../autoopts.c"
+#line 150 "../autoopts.c"
   puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
        "\t'%s' and '%s'."));
 #line 94 "../check.c"
   puts(_("%s error:  The %s option is required\n"));
-#line 632 "../find.c"
+#line 602 "../find.c"
   puts(_("%s: The '%s' option cannot have an argument.\n"));
 #line 151 "../check.c"
   puts(_("%s: Command line arguments are not allowed.\n"));
-#line 536 "../save.c"
+#line 568 "../save.c"
   puts(_("error %d (%s) creating %s\n"));
-#line 235 "../enum.c"
+#line 210 "../enum.c"
   puts(_("%s error:  '%s' does not match any %s keywords.\n"));
 #line 93 "../reset.c"
   puts(_("%s error: The '%s' option requires an argument.\n"));
-#line 186 "../save.c"
+#line 122 "../save.c"
   puts(_("error %d (%s) stat-ing %s\n"));
-#line 239 "../save.c"
+#line 175 "../save.c"
   puts(_("error %d (%s) stat-ing %s\n"));
 #line 143 "../restore.c"
   puts(_("%s error: no saved option state\n"));
-#line 231 "../autoopts.c"
+#line 225 "../autoopts.c"
   puts(_("'%s' is not a command line option.\n"));
 #line 113 "../time.c"
   puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
-#line 131 "../save.c"
-  puts(_("'%s' not defined\n"));
 #line 50 "../time.c"
   puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
 #line 92 "../check.c"
   puts(_("%s error:  The %s option must appear %d times.\n"));
 #line 165 "../numeric.c"
   puts(_("%s error:  '%s' is not a recognizable number.\n"));
-#line 201 "../enum.c"
+#line 176 "../enum.c"
   puts(_("%s error:  %s exceeds %s keyword count\n"));
-#line 333 "../usage.c"
+#line 279 "../usage.c"
   puts(_("Try '%s %s' for more information.\n"));
 #line 45 "../alias.c"
   puts(_("one %s%s option allowed\n"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
   puts(_("standard output"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
   puts(_("standard output"));
-#line 277 "../usage.c"
+#line 223 "../usage.c"
   puts(_("standard output"));
-#line 418 "../usage.c"
+#line 364 "../usage.c"
   puts(_("standard output"));
-#line 628 "../usage.c"
+#line 574 "../usage.c"
   puts(_("standard output"));
-#line 175 "../version.c"
+#line 178 "../version.c"
   puts(_("standard output"));
-#line 277 "../usage.c"
+#line 223 "../usage.c"
   puts(_("standard error"));
-#line 418 "../usage.c"
+#line 364 "../usage.c"
   puts(_("standard error"));
-#line 628 "../usage.c"
+#line 574 "../usage.c"
   puts(_("standard error"));
-#line 175 "../version.c"
+#line 178 "../version.c"
   puts(_("standard error"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
   puts(_("write"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
   puts(_("write"));
-#line 276 "../usage.c"
+#line 222 "../usage.c"
   puts(_("write"));
-#line 417 "../usage.c"
+#line 363 "../usage.c"
   puts(_("write"));
-#line 627 "../usage.c"
+#line 573 "../usage.c"
   puts(_("write"));
-#line 174 "../version.c"
+#line 177 "../version.c"
   puts(_("write"));
 #line 60 "../numeric.c"
   puts(_("%s error:  %s option value %ld is out of range.\n"));
 #line 44 "../check.c"
   puts(_("%s error:  %s option requires the %s option\n"));
-#line 130 "../save.c"
+#line 121 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 185 "../save.c"
+#line 174 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 238 "../save.c"
+#line 193 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 257 "../save.c"
-  puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 535 "../save.c"
+#line 567 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
   /* END-LIBOPTS-MESSAGES */
 
   /* USAGE-TEXT: */
-#line 876 "../usage.c"
+#line 822 "../usage.c"
   puts(_("\t\t\t\t- an alternate for '%s'\n"));
-#line 1151 "../usage.c"
+#line 1097 "../usage.c"
   puts(_("Version, usage and configuration options:"));
-#line 927 "../usage.c"
+#line 873 "../usage.c"
   puts(_("\t\t\t\t- default option for unnamed options\n"));
-#line 840 "../usage.c"
+#line 786 "../usage.c"
   puts(_("\t\t\t\t- disabled as '--%s'\n"));
-#line 1120 "../usage.c"
+#line 1066 "../usage.c"
   puts(_(" --- %-14s %s\n"));
-#line 1118 "../usage.c"
+#line 1064 "../usage.c"
   puts(_("This option has been disabled"));
-#line 867 "../usage.c"
+#line 813 "../usage.c"
   puts(_("\t\t\t\t- enabled by default\n"));
 #line 40 "../alias.c"
   puts(_("%s error:  only "));
-#line 1197 "../usage.c"
+#line 1143 "../usage.c"
   puts(_(" - examining environment variables named %s_*\n"));
 #line 168 "../file.c"
   puts(_("\t\t\t\t- file must not pre-exist\n"));
 #line 172 "../file.c"
   puts(_("\t\t\t\t- file must pre-exist\n"));
-#line 383 "../usage.c"
+#line 329 "../usage.c"
   puts(_("Options are specified by doubled hyphens and their name or by a single\n"
        "hyphen and the flag character.\n"));
-#line 921 "../makeshell.c"
+#line 882 "../makeshell.c"
   puts(_("\n"
        "= = = = = = = =\n\n"
        "This incarnation of genshell will produce\n"
        "a shell script to parse the options for %s:\n\n"));
-#line 167 "../enum.c"
+#line 142 "../enum.c"
   puts(_("  or an integer mask with any of the lower %d bits set\n"));
-#line 900 "../usage.c"
+#line 846 "../usage.c"
   puts(_("\t\t\t\t- is a set membership option\n"));
-#line 921 "../usage.c"
+#line 867 "../usage.c"
   puts(_("\t\t\t\t- must appear between %d and %d times\n"));
-#line 385 "../usage.c"
+#line 331 "../usage.c"
   puts(_("Options are specified by single or double hyphens and their name.\n"));
-#line 907 "../usage.c"
+#line 853 "../usage.c"
   puts(_("\t\t\t\t- may appear multiple times\n"));
-#line 894 "../usage.c"
+#line 840 "../usage.c"
   puts(_("\t\t\t\t- may not be preset\n"));
-#line 1312 "../usage.c"
+#line 1258 "../usage.c"
   puts(_("   Arg Option-Name    Description\n"));
-#line 1248 "../usage.c"
+#line 1194 "../usage.c"
   puts(_("  Flg Arg Option-Name    Description\n"));
-#line 1306 "../usage.c"
+#line 1252 "../usage.c"
   puts(_("  Flg Arg Option-Name    Description\n"));
-#line 1307 "../usage.c"
+#line 1253 "../usage.c"
   puts(_(" %3s %s"));
-#line 1313 "../usage.c"
+#line 1259 "../usage.c"
   puts(_(" %3s %s"));
-#line 390 "../usage.c"
+#line 336 "../usage.c"
   puts(_("The '-#<number>' option may omit the hash char\n"));
-#line 386 "../usage.c"
+#line 332 "../usage.c"
   puts(_("All arguments are named options.\n"));
-#line 974 "../usage.c"
+#line 920 "../usage.c"
   puts(_(" - reading file %s"));
-#line 412 "../usage.c"
+#line 358 "../usage.c"
   puts(_("\n"
        "Please send bug reports to:  <%s>\n"));
 #line 100 "../version.c"
@@ -1023,17 +1023,17 @@ http://tcpreplay.appneta.com\n"));
 #line 129 "../version.c"
   puts(_("\n"
        "Please send bug reports to:  <%s>\n"));
-#line 906 "../usage.c"
+#line 852 "../usage.c"
   puts(_("\t\t\t\t- may NOT appear - preset only\n"));
-#line 947 "../usage.c"
+#line 893 "../usage.c"
   puts(_("\n"
        "The following option preset mechanisms are supported:\n"));
-#line 1195 "../usage.c"
+#line 1141 "../usage.c"
   puts(_("\n"
        "The following option preset mechanisms are supported:\n"));
-#line 685 "../usage.c"
+#line 631 "../usage.c"
   puts(_("prohibits these options:\n"));
-#line 680 "../usage.c"
+#line 626 "../usage.c"
   puts(_("prohibits the option '%s'\n"));
 #line 81 "../numeric.c"
   puts(_("%s%ld to %ld"));
@@ -1051,28 +1051,28 @@ http://tcpreplay.appneta.com\n"));
   puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
 #line 77 "../numeric.c"
   puts(_("%sless than or equal to %ld"));
-#line 393 "../usage.c"
+#line 339 "../usage.c"
   puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
-#line 655 "../usage.c"
+#line 601 "../usage.c"
   puts(_("requires the option '%s'\n"));
-#line 658 "../usage.c"
+#line 604 "../usage.c"
   puts(_("requires these options:\n"));
-#line 1324 "../usage.c"
+#line 1270 "../usage.c"
   puts(_("   Arg Option-Name   Req?  Description\n"));
-#line 1318 "../usage.c"
+#line 1264 "../usage.c"
   puts(_("  Flg Arg Option-Name   Req?  Description\n"));
-#line 168 "../enum.c"
+#line 143 "../enum.c"
   puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
        "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
        "will set them all.  Multiple entries may be passed as an option\n"
        "argument list.\n"));
-#line 913 "../usage.c"
+#line 859 "../usage.c"
   puts(_("\t\t\t\t- may appear up to %d times\n"));
-#line 77 "../enum.c"
+#line 52 "../enum.c"
   puts(_("The valid \"%s\" option keywords are:\n"));
-#line 1155 "../usage.c"
+#line 1101 "../usage.c"
   puts(_("The next option supports vendor supported extra options:"));
-#line 776 "../usage.c"
+#line 722 "../usage.c"
   puts(_("These additional options are:"));
   /* END-USAGE-TEXT */
 }

+ 12 - 3
src/tcpliveplay_opts.h

@@ -3,10 +3,10 @@
  *  DO NOT EDIT THIS FILE   (tcpliveplay_opts.h)
  *
  *  It has been AutoGen-ed
- *  From the definitions    tcpliveplay_opts.def
+ *  From the definitions    ../../src/tcpliveplay_opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
  *
  *  AutoOpts is a copyrighted work.  This header file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -59,6 +59,8 @@
 #define AUTOOPTS_TCPLIVEPLAY_OPTS_H_GUARD 1
 #include "config.h"
 #include <autoopts/options.h>
+#include <stdarg.h>
+#include <stdnoreturn.h>
 
 /**
  *  Ensure that the library used for compiling this generated header is at
@@ -67,13 +69,19 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 167937
+#define AO_TEMPLATE_VERSION 172033
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
   Choke Me.
 #endif
 
+#if GCC_VERSION > 40400
+#define NOT_REACHED __builtin_unreachable();
+#else
+#define NOT_REACHED
+#endif
+
 /**
  *  Enumeration of each option type for tcpliveplay
  */
@@ -222,6 +230,7 @@ static inline char* aoGetsText(char const* pz) {
 # endif
 #endif  /* ENABLE_NLS */
 
+
 #ifdef  __cplusplus
 }
 #endif

+ 2 - 2
src/tcpprep.1

@@ -10,12 +10,12 @@
 .ds B-Font B
 .ds I-Font I
 .ds R-Font R
-.TH tcpprep 1 "26 Aug 2022" "tcpprep" "User Commands"
+.TH tcpprep 1 "01 Jan 2023" "tcpprep" "User Commands"
 .\"
 .\" DO NOT EDIT THIS FILE (in-mem file)
 .\"
 .\" It has been AutoGen-ed
-.\" From the definitions tcpprep_opts.def
+.\" From the definitions ../../src/tcpprep_opts.def
 .\" and the template file agman-cmd.tpl
 .SH NAME
 \f\*[B-Font]tcpprep\fP

+ 109 - 109
src/tcpprep_opts.c

@@ -3,10 +3,10 @@
  *  DO NOT EDIT THIS FILE   (tcpprep_opts.c)
  *
  *  It has been AutoGen-ed
- *  From the definitions    tcpprep_opts.def
+ *  From the definitions    ../../src/tcpprep_opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
  *
  *  AutoOpts is a copyrighted work.  This source file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -42,11 +42,15 @@
 #define OPTION_CODE_COMPILE 1
 #include "tcpprep_opts.h"
 #include <sys/types.h>
+#include <sys/stat.h>
 
+#include <errno.h>
+#include <fcntl.h>
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <errno.h>
+#include <string.h>
+#include <unistd.h>
 
 #ifdef  __cplusplus
 extern "C" {
@@ -1029,7 +1033,7 @@ static char const * const apzHomeList[2] = {
 #define zDetail         (tcpprep_opt_strs+2686)
 /** The full version string for tcpprep. */
 #define zFullVersion    (NULL)
-/* extracted from optcode.tlib near line 364 */
+/* extracted from optcode.tlib near line 342 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -1860,12 +1864,12 @@ static void bogus_function(void) {
      extract the correct strings.  These strings are actually referenced
      by a field name in the tcpprepOptions structure noted in the
      comments below.  The literal text is defined in tcpprep_opt_strs.
-   
+
      NOTE: the strings below are segmented with respect to the source string
      tcpprep_opt_strs.  The strings above are handed off for translation
      at run time a paragraph at a time.  Consequently, they are presented here
      for translation a paragraph at a time.
-   
+
      ALSO: often the description for an option will reference another option
      by name.  These are set off with apostrophe quotes (I hope).  Do not
      translate option names.
@@ -2002,234 +2006,230 @@ http://tcpreplay.appneta.com\n"));
   /* LIBOPTS-MESSAGES: */
 #line 67 "../autoopts.c"
   puts(_("allocation of %d bytes failed\n"));
-#line 93 "../autoopts.c"
+#line 89 "../autoopts.c"
   puts(_("allocation of %d bytes failed\n"));
-#line 53 "../init.c"
+#line 48 "../init.c"
   puts(_("AutoOpts function called without option descriptor\n"));
-#line 86 "../init.c"
+#line 81 "../init.c"
   puts(_("\tThis exceeds the compiled library version:  "));
-#line 84 "../init.c"
+#line 79 "../init.c"
   puts(_("Automated Options Processing Error!\n"
        "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
-#line 80 "../autoopts.c"
+#line 78 "../autoopts.c"
   puts(_("realloc of %d bytes at 0x%p failed\n"));
-#line 88 "../init.c"
+#line 83 "../init.c"
   puts(_("\tThis is less than the minimum library version:  "));
 #line 121 "../version.c"
   puts(_("Automated Options version %s\n"
-       "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
-#line 87 "../makeshell.c"
+       "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
+#line 49 "../makeshell.c"
   puts(_("(AutoOpts bug):  %s.\n"));
 #line 90 "../reset.c"
   puts(_("optionResetOpt() called, but reset-option not configured"));
-#line 295 "../usage.c"
+#line 241 "../usage.c"
   puts(_("could not locate the 'help' option"));
-#line 336 "../autoopts.c"
+#line 330 "../autoopts.c"
   puts(_("optionProcess() was called with invalid data"));
-#line 751 "../usage.c"
+#line 697 "../usage.c"
   puts(_("invalid argument type specified"));
-#line 598 "../find.c"
+#line 568 "../find.c"
   puts(_("defaulted to option with optional arg"));
 #line 76 "../alias.c"
   puts(_("aliasing option is out of range."));
-#line 235 "../enum.c"
+#line 210 "../enum.c"
   puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
-#line 108 "../find.c"
+#line 78 "../find.c"
   puts(_("  The following options match:\n"));
-#line 293 "../find.c"
+#line 263 "../find.c"
   puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
 #line 161 "../check.c"
   puts(_("%s: Command line arguments required\n"));
 #line 43 "../alias.c"
   puts(_("%d %s%s options allowed\n"));
-#line 94 "../makeshell.c"
+#line 56 "../makeshell.c"
   puts(_("%s error %d (%s) calling %s for '%s'\n"));
-#line 306 "../makeshell.c"
+#line 268 "../makeshell.c"
   puts(_("interprocess pipe"));
-#line 168 "../version.c"
+#line 171 "../version.c"
   puts(_("error: version option argument '%c' invalid.  Use:\n"
        "\t'v' - version only\n"
        "\t'c' - version and copyright\n"
        "\t'n' - version and full copyright notice\n"));
 #line 58 "../check.c"
   puts(_("%s error:  the '%s' and '%s' options conflict\n"));
-#line 217 "../find.c"
+#line 187 "../find.c"
   puts(_("%s: The '%s' option has been disabled."));
-#line 430 "../find.c"
+#line 400 "../find.c"
   puts(_("%s: The '%s' option has been disabled."));
 #line 38 "../alias.c"
   puts(_("-equivalence"));
-#line 469 "../find.c"
+#line 439 "../find.c"
   puts(_("%s: illegal option -- %c\n"));
 #line 110 "../reset.c"
   puts(_("%s: illegal option -- %c\n"));
-#line 271 "../find.c"
+#line 241 "../find.c"
   puts(_("%s: illegal option -- %s\n"));
-#line 755 "../find.c"
+#line 740 "../find.c"
   puts(_("%s: illegal option -- %s\n"));
 #line 118 "../reset.c"
   puts(_("%s: illegal option -- %s\n"));
-#line 335 "../find.c"
+#line 305 "../find.c"
   puts(_("%s: unknown vendor extension option -- %s\n"));
-#line 160 "../enum.c"
+#line 135 "../enum.c"
   puts(_("  or an integer from %d through %d\n"));
-#line 170 "../enum.c"
+#line 145 "../enum.c"
   puts(_("  or an integer from %d through %d\n"));
-#line 750 "../usage.c"
+#line 696 "../usage.c"
   puts(_("%s error:  invalid option descriptor for %s\n"));
-#line 1084 "../usage.c"
+#line 1030 "../usage.c"
   puts(_("%s error:  invalid option descriptor for %s\n"));
-#line 385 "../find.c"
+#line 355 "../find.c"
   puts(_("%s: invalid option name: %s\n"));
-#line 527 "../find.c"
+#line 497 "../find.c"
   puts(_("%s: The '%s' option requires an argument.\n"));
-#line 156 "../autoopts.c"
+#line 150 "../autoopts.c"
   puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
        "\t'%s' and '%s'."));
 #line 94 "../check.c"
   puts(_("%s error:  The %s option is required\n"));
-#line 632 "../find.c"
+#line 602 "../find.c"
   puts(_("%s: The '%s' option cannot have an argument.\n"));
 #line 151 "../check.c"
   puts(_("%s: Command line arguments are not allowed.\n"));
-#line 536 "../save.c"
+#line 568 "../save.c"
   puts(_("error %d (%s) creating %s\n"));
-#line 235 "../enum.c"
+#line 210 "../enum.c"
   puts(_("%s error:  '%s' does not match any %s keywords.\n"));
 #line 93 "../reset.c"
   puts(_("%s error: The '%s' option requires an argument.\n"));
-#line 186 "../save.c"
+#line 122 "../save.c"
   puts(_("error %d (%s) stat-ing %s\n"));
-#line 239 "../save.c"
+#line 175 "../save.c"
   puts(_("error %d (%s) stat-ing %s\n"));
 #line 143 "../restore.c"
   puts(_("%s error: no saved option state\n"));
-#line 231 "../autoopts.c"
+#line 225 "../autoopts.c"
   puts(_("'%s' is not a command line option.\n"));
 #line 113 "../time.c"
   puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
-#line 131 "../save.c"
-  puts(_("'%s' not defined\n"));
 #line 50 "../time.c"
   puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
 #line 92 "../check.c"
   puts(_("%s error:  The %s option must appear %d times.\n"));
 #line 165 "../numeric.c"
   puts(_("%s error:  '%s' is not a recognizable number.\n"));
-#line 201 "../enum.c"
+#line 176 "../enum.c"
   puts(_("%s error:  %s exceeds %s keyword count\n"));
-#line 333 "../usage.c"
+#line 279 "../usage.c"
   puts(_("Try '%s %s' for more information.\n"));
 #line 45 "../alias.c"
   puts(_("one %s%s option allowed\n"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
   puts(_("standard output"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
   puts(_("standard output"));
-#line 277 "../usage.c"
+#line 223 "../usage.c"
   puts(_("standard output"));
-#line 418 "../usage.c"
+#line 364 "../usage.c"
   puts(_("standard output"));
-#line 628 "../usage.c"
+#line 574 "../usage.c"
   puts(_("standard output"));
-#line 175 "../version.c"
+#line 178 "../version.c"
   puts(_("standard output"));
-#line 277 "../usage.c"
+#line 223 "../usage.c"
   puts(_("standard error"));
-#line 418 "../usage.c"
+#line 364 "../usage.c"
   puts(_("standard error"));
-#line 628 "../usage.c"
+#line 574 "../usage.c"
   puts(_("standard error"));
-#line 175 "../version.c"
+#line 178 "../version.c"
   puts(_("standard error"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
   puts(_("write"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
   puts(_("write"));
-#line 276 "../usage.c"
+#line 222 "../usage.c"
   puts(_("write"));
-#line 417 "../usage.c"
+#line 363 "../usage.c"
   puts(_("write"));
-#line 627 "../usage.c"
+#line 573 "../usage.c"
   puts(_("write"));
-#line 174 "../version.c"
+#line 177 "../version.c"
   puts(_("write"));
 #line 60 "../numeric.c"
   puts(_("%s error:  %s option value %ld is out of range.\n"));
 #line 44 "../check.c"
   puts(_("%s error:  %s option requires the %s option\n"));
-#line 130 "../save.c"
+#line 121 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 185 "../save.c"
+#line 174 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 238 "../save.c"
+#line 193 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 257 "../save.c"
-  puts(_("%s warning:  cannot save options - %s not regular file\n"));
-#line 535 "../save.c"
+#line 567 "../save.c"
   puts(_("%s warning:  cannot save options - %s not regular file\n"));
   /* END-LIBOPTS-MESSAGES */
 
   /* USAGE-TEXT: */
-#line 876 "../usage.c"
+#line 822 "../usage.c"
   puts(_("\t\t\t\t- an alternate for '%s'\n"));
-#line 1151 "../usage.c"
+#line 1097 "../usage.c"
   puts(_("Version, usage and configuration options:"));
-#line 927 "../usage.c"
+#line 873 "../usage.c"
   puts(_("\t\t\t\t- default option for unnamed options\n"));
-#line 840 "../usage.c"
+#line 786 "../usage.c"
   puts(_("\t\t\t\t- disabled as '--%s'\n"));
-#line 1120 "../usage.c"
+#line 1066 "../usage.c"
   puts(_(" --- %-14s %s\n"));
-#line 1118 "../usage.c"
+#line 1064 "../usage.c"
   puts(_("This option has been disabled"));
-#line 867 "../usage.c"
+#line 813 "../usage.c"
   puts(_("\t\t\t\t- enabled by default\n"));
 #line 40 "../alias.c"
   puts(_("%s error:  only "));
-#line 1197 "../usage.c"
+#line 1143 "../usage.c"
   puts(_(" - examining environment variables named %s_*\n"));
 #line 168 "../file.c"
   puts(_("\t\t\t\t- file must not pre-exist\n"));
 #line 172 "../file.c"
   puts(_("\t\t\t\t- file must pre-exist\n"));
-#line 383 "../usage.c"
+#line 329 "../usage.c"
   puts(_("Options are specified by doubled hyphens and their name or by a single\n"
        "hyphen and the flag character.\n"));
-#line 921 "../makeshell.c"
+#line 882 "../makeshell.c"
   puts(_("\n"
        "= = = = = = = =\n\n"
        "This incarnation of genshell will produce\n"
        "a shell script to parse the options for %s:\n\n"));
-#line 167 "../enum.c"
+#line 142 "../enum.c"
   puts(_("  or an integer mask with any of the lower %d bits set\n"));
-#line 900 "../usage.c"
+#line 846 "../usage.c"
   puts(_("\t\t\t\t- is a set membership option\n"));
-#line 921 "../usage.c"
+#line 867 "../usage.c"
   puts(_("\t\t\t\t- must appear between %d and %d times\n"));
-#line 385 "../usage.c"
+#line 331 "../usage.c"
   puts(_("Options are specified by single or double hyphens and their name.\n"));
-#line 907 "../usage.c"
+#line 853 "../usage.c"
   puts(_("\t\t\t\t- may appear multiple times\n"));
-#line 894 "../usage.c"
+#line 840 "../usage.c"
   puts(_("\t\t\t\t- may not be preset\n"));
-#line 1312 "../usage.c"
+#line 1258 "../usage.c"
   puts(_("   Arg Option-Name    Description\n"));
-#line 1248 "../usage.c"
+#line 1194 "../usage.c"
   puts(_("  Flg Arg Option-Name    Description\n"));
-#line 1306 "../usage.c"
+#line 1252 "../usage.c"
   puts(_("  Flg Arg Option-Name    Description\n"));
-#line 1307 "../usage.c"
+#line 1253 "../usage.c"
   puts(_(" %3s %s"));
-#line 1313 "../usage.c"
+#line 1259 "../usage.c"
   puts(_(" %3s %s"));
-#line 390 "../usage.c"
+#line 336 "../usage.c"
   puts(_("The '-#<number>' option may omit the hash char\n"));
-#line 386 "../usage.c"
+#line 332 "../usage.c"
   puts(_("All arguments are named options.\n"));
-#line 974 "../usage.c"
+#line 920 "../usage.c"
   puts(_(" - reading file %s"));
-#line 412 "../usage.c"
+#line 358 "../usage.c"
   puts(_("\n"
        "Please send bug reports to:  <%s>\n"));
 #line 100 "../version.c"
@@ -2238,17 +2238,17 @@ http://tcpreplay.appneta.com\n"));
 #line 129 "../version.c"
   puts(_("\n"
        "Please send bug reports to:  <%s>\n"));
-#line 906 "../usage.c"
+#line 852 "../usage.c"
   puts(_("\t\t\t\t- may NOT appear - preset only\n"));
-#line 947 "../usage.c"
+#line 893 "../usage.c"
   puts(_("\n"
        "The following option preset mechanisms are supported:\n"));
-#line 1195 "../usage.c"
+#line 1141 "../usage.c"
   puts(_("\n"
        "The following option preset mechanisms are supported:\n"));
-#line 685 "../usage.c"
+#line 631 "../usage.c"
   puts(_("prohibits these options:\n"));
-#line 680 "../usage.c"
+#line 626 "../usage.c"
   puts(_("prohibits the option '%s'\n"));
 #line 81 "../numeric.c"
   puts(_("%s%ld to %ld"));
@@ -2266,28 +2266,28 @@ http://tcpreplay.appneta.com\n"));
   puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
 #line 77 "../numeric.c"
   puts(_("%sless than or equal to %ld"));
-#line 393 "../usage.c"
+#line 339 "../usage.c"
   puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
-#line 655 "../usage.c"
+#line 601 "../usage.c"
   puts(_("requires the option '%s'\n"));
-#line 658 "../usage.c"
+#line 604 "../usage.c"
   puts(_("requires these options:\n"));
-#line 1324 "../usage.c"
+#line 1270 "../usage.c"
   puts(_("   Arg Option-Name   Req?  Description\n"));
-#line 1318 "../usage.c"
+#line 1264 "../usage.c"
   puts(_("  Flg Arg Option-Name   Req?  Description\n"));
-#line 168 "../enum.c"
+#line 143 "../enum.c"
   puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
        "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
        "will set them all.  Multiple entries may be passed as an option\n"
        "argument list.\n"));
-#line 913 "../usage.c"
+#line 859 "../usage.c"
   puts(_("\t\t\t\t- may appear up to %d times\n"));
-#line 77 "../enum.c"
+#line 52 "../enum.c"
   puts(_("The valid \"%s\" option keywords are:\n"));
-#line 1155 "../usage.c"
+#line 1101 "../usage.c"
   puts(_("The next option supports vendor supported extra options:"));
-#line 776 "../usage.c"
+#line 722 "../usage.c"
   puts(_("These additional options are:"));
   /* END-USAGE-TEXT */
 }

+ 12 - 3
src/tcpprep_opts.h

@@ -3,10 +3,10 @@
  *  DO NOT EDIT THIS FILE   (tcpprep_opts.h)
  *
  *  It has been AutoGen-ed
- *  From the definitions    tcpprep_opts.def
+ *  From the definitions    ../../src/tcpprep_opts.def
  *  and the template file   options
  *
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
  *
  *  AutoOpts is a copyrighted work.  This header file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -47,6 +47,8 @@
 #define AUTOOPTS_TCPPREP_OPTS_H_GUARD 1
 #include "config.h"
 #include <autoopts/options.h>
+#include <stdarg.h>
+#include <stdnoreturn.h>
 
 /**
  *  Ensure that the library used for compiling this generated header is at
@@ -55,13 +57,19 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 167937
+#define AO_TEMPLATE_VERSION 172033
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
   Choke Me.
 #endif
 
+#if GCC_VERSION > 40400
+#define NOT_REACHED __builtin_unreachable();
+#else
+#define NOT_REACHED
+#endif
+
 /**
  *  Enumeration of each option type for tcpprep
  */
@@ -265,6 +273,7 @@ static inline char* aoGetsText(char const* pz) {
 # endif
 #endif  /* ENABLE_NLS */
 
+
 #ifdef  __cplusplus
 }
 #endif

+ 0 - 0
src/tcpreplay-edit.1


Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.