+* Pick up tweaks to autogen-5.18.5 <stenn@ntp.org>
From ntp-4.2.8p9:
---
(4.2.8p9) 2016/11/21 Released by Harlan Stenn <stenn@ntp.org>
endif
libopts_la_SOURCES = libopts.c
libopts_la_CPPFLAGS = -I$(srcdir)
-libopts_la_LDFLAGS = -version-info 41:0:16
+libopts_la_LDFLAGS = -version-info 41:1:16
EXTRA_DIST =
BUILT_SOURCES =
MOSTLYCLEANFILES =
COPYING.gplv3 COPYING.lgplv3 COPYING.mbsd \
MakeDefs.inc README ag-char-map.h \
alias.c ao-strs.c ao-strs.h \
- autoopts/usage-txt.h autoopts/options.h autoopts/project.h \
+ autoopts/project.h autoopts/options.h autoopts/usage-txt.h \
autoopts.c autoopts.h boolean.c \
- check.c compat/compat.h compat/strdup.c \
- compat/windows-config.h compat/strchr.c compat/pathfind.c \
- compat/snprintf.c compat/_Noreturn.h configfile.c \
+ check.c compat/windows-config.h compat/compat.h \
+ compat/pathfind.c compat/snprintf.c compat/strdup.c \
+ compat/strchr.c compat/_Noreturn.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/stdnoreturn.m4 \
- m4/liboptschk.m4 m4/libopts.m4 makeshell.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 \
/*
* 29 bits for 46 character classifications
- * generated by char-mapper on 04/25/15 at 09:53:03
+ * generated by char-mapper on 04/30/15 at 19:55:13
*
* This file contains the character classifications
* used by AutoGen and AutoOpts for identifying tokens.
* @{
*/
/// autoopts structure version
-#define OPTIONS_STRUCT_VERSION 167936
+#define OPTIONS_STRUCT_VERSION 167937
/// autoopts structure version string
-#define OPTIONS_VERSION_STRING "41:0:16"
+#define OPTIONS_VERSION_STRING "41:1:16"
/// 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.0"
+#define OPTIONS_DOTTED_VERSION "41.1"
/// convert a version/release number pair to an integer value
#define OPTIONS_VER_TO_NUM(_v, _r) (((_v) * 4096) + (_r))
/// @}
if (!dot_path || *string == '/') {
result = strdup( string );
- if (result == NULL) {
- return NULL; /* couldn't allocate memory */
- }
} else {
if (dot_path && dot_path[0]) {
result = malloc( 2 + strlen( dot_path ) + strlen( string ) );
- if (result == NULL) {
- return NULL; /* couldn't allocate memory */
- }
strcpy( result, dot_path );
result_len = (int)strlen(result);
if (result[result_len - 1] != '/') {
}
} else {
result = malloc( 3 + strlen( string ) );
- if (result == NULL) {
- return NULL; /* couldn't allocate memory */
- }
result[0] = '.'; result[1] = '/'; result[2] = '\0';
result_len = 2;
}
/* The result cannot be larger than the input PATH. */
result = strdup( path );
- if (result == NULL) {
- return NULL; /* couldn't allocate memory */
- }
+
stub_char = (*path == '/') ? '/' : '.';
/* Walk along RESULT looking for things to compact. */
}
else do {
- tArgList * argl = odesc->optCookie;
- int argct = argl->useCt;
- const void ** poptv = VOIDP(argl->apzArgs);
+ tArgList * argl = odesc->optCookie;
+ int argct = argl->useCt;
+ void ** poptv = (void **)(argl->apzArgs);
if (argct == 0) {
errno = ENOENT;
}
if (name == NULL) {
- res = (const tOptionValue *)*poptv;
+ res = (tOptionValue *)*poptv;
break;
}
char const * pzName, char const * pzVal)
{
bool old_found = false;
- const tOptionValue * res = NULL;
+ tOptionValue * res = NULL;
(void)pzName;
(void)pzVal;
}
else do {
- tArgList * argl = odesc->optCookie;
- int ct = argl->useCt;
- const void ** poptv = VOIDP(argl->apzArgs);
+ tArgList * argl = odesc->optCookie;
+ int ct = argl->useCt;
+ void ** poptv = (void **)argl->apzArgs;
while (--ct >= 0) {
- const tOptionValue * pOV = *(poptv++);
+ tOptionValue * pOV = *(poptv++);
if (old_found) {
res = pOV;
break;
tOptionValue const *
optionGetValue(tOptionValue const * oov, char const * vname)
{
- tArgList * arg_list;
- const tOptionValue * res = NULL;
+ tArgList * arg_list;
+ tOptionValue * res = NULL;
if ((oov == NULL) || (oov->valType != OPARG_TYPE_HIERARCHY)) {
errno = EINVAL;
arg_list = oov->v.nestVal;
if (arg_list->useCt > 0) {
- int ct = arg_list->useCt;
- const void ** ovlist = VOIDP(arg_list->apzArgs);
+ int ct = arg_list->useCt;
+ void ** ovlist = (void **)(arg_list->apzArgs);
if (vname == NULL) {
- res = (const tOptionValue *)*ovlist;
+ res = (tOptionValue *)*ovlist;
} else do {
- const tOptionValue * opt_val = *(ovlist++);
+ tOptionValue * opt_val = *(ovlist++);
if (strcmp(opt_val->pzName, vname) == 0) {
res = opt_val;
break;
tOptionValue const *
optionNextValue(tOptionValue const * ov_list,tOptionValue const * oov )
{
- tArgList * arg_list;
- const tOptionValue * res = NULL;
- int err = EINVAL;
+ tArgList * arg_list;
+ tOptionValue * res = NULL;
+ int err = EINVAL;
if ((ov_list == NULL) || (ov_list->valType != OPARG_TYPE_HIERARCHY)) {
errno = EINVAL;
}
arg_list = ov_list->v.nestVal;
{
- int ct = arg_list->useCt;
- const void ** o_list = VOIDP(arg_list->apzArgs);
+ int ct = arg_list->useCt;
+ void ** o_list = (void **)(arg_list->apzArgs);
while (ct-- > 0) {
- const tOptionValue * nov = *(o_list++);
+ tOptionValue * nov = *(o_list++);
if (nov == oov) {
if (ct == 0) {
err = ENOENT;
} else {
err = 0;
- res = (const tOptionValue *)*o_list;
+ res = (tOptionValue *)*o_list;
}
break;
}
* The result gets stashed in a char * pointer.
*/
uintptr_t res = name_ct;
- size_t len = strlen(name);
+ size_t len = strlen((char *)name);
uintptr_t idx;
if (IS_DEC_DIGIT_CHAR(*name)) {
- char * pz;
- unsigned long val = strtoul(name, &pz, 0);
+ char * pz = VOIDP(name);
+ unsigned long val = strtoul(pz, &pz, 0);
if ((*pz == NUL) && (val < name_ct))
return (uintptr_t)val;
pz_enum_err_fmt = znum_too_large;
* Multiple partial matches means we have an ambiguous match.
*/
for (idx = 0; idx < name_ct; idx++) {
- if (strncmp(paz_names[idx], name, len) == 0) {
+ if (strncmp((char *)paz_names[idx], (char *)name, len) == 0) {
if (paz_names[idx][len] == NUL)
return idx; /* full match */
if (shift_ct >= nm_ct)
return 0UL;
- return (uintptr_t)1U << shift_ct;
+ return 1UL << shift_ct;
}
}
buf[res] = NUL;
*nm_pp = buf;
- *arg_pp = VOIDP(p);
+ *arg_pp = (char *)p;
return res;
default:
* From the definitions genshell.def
* and the template file options
*
- * Generated from AutoOpts 41:0:16 templates.
+ * Generated from AutoOpts 41:1:16 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
* From the definitions genshell.def
* and the template file options
*
- * Generated from AutoOpts 41:0:16 templates.
+ * Generated from AutoOpts 41:1:16 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 167936
+#define AO_TEMPLATE_VERSION 167937
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
*/
if (opts->pzProgName == NULL) {
char const * pz = strrchr(pname, DIRCH);
- char const ** pp = VOIDP(&(opts->pzProgName));
+ char const ** pp =
+ (char const **)(void **)&(opts->pzProgName);
if (pz != NULL)
*pp = pz+1;
else
*pp = pname;
- pz = pathfind(getenv("PATH"), pname, "rx");
+ pz = pathfind(getenv("PATH"), (char *)pname, "rx");
if (pz != NULL)
pname = VOIDP(pz);
#define LOCAL static
#include "ao-strs.h"
static char const ao_ver_string[] =
- "41:0:16\n";
+ "41:1:16\n";
#include "autoopts/options.h"
#include "autoopts/usage-txt.h"
#include "genshell.h"
if (strchr(prg_path, DIRCH) != NULL)
path = prg_path;
else {
- path = pathfind(getenv("PATH"), prg_path, "rx");
+ path = pathfind(getenv("PATH"), (char *)prg_path, "rx");
if (path == NULL)
return false;
/* Copy the program name into the time/name buffer */
for (;;) {
- if ((*pzPN++ = (char)tolower((unsigned char)*pz++)) == NUL)
+ if ((*pzPN++ = (char)tolower(*pz++)) == NUL)
break;
}
continue;
match_ct = 0;
- while ( toupper((unsigned char)od->pz_DisableName[match_ct])
- == toupper((unsigned char)name[match_ct]))
+ while ( toupper(od->pz_DisableName[match_ct])
+ == toupper(name[match_ct]))
match_ct++;
if (match_ct > min_match_ct)
min_match_ct = match_ct;
get_special_char(char const ** ppz, int * ct)
{
char const * pz = *ppz;
- char * rz;
if (*ct < 3)
return '&';
base = 16;
pz++;
}
- retch = (int)strtoul(pz, &rz, base);
- pz = rz;
+ retch = (int)strtoul(pz, (char **)&pz, base);
if (*pz != ';')
return '&';
base = (int)(++pz - *ppz);
static unsigned long
str_const_to_ul (cch_t * str, cch_t ** ppz, int base)
{
- char * pz;
- int rv = strtoul (str, &pz, base);
- *ppz = pz;
- return rv;
+ return strtoul (str, (char **)ppz, base);
}
/* Wrapper around strtol that does not require a cast. */
static long
str_const_to_l (cch_t * str, cch_t ** ppz, int base)
{
- char * pz;
- int rv = strtol (str, &pz, base);
- *ppz = pz;
- return rv;
+ return strtol (str, (char **)ppz, base);
}
/* Returns BASE + VAL * SCALE, interpreting BASE = BAD_TIME
/* -*- buffer-read-only: t -*- vi: set ro:
*
* Prototypes for autoopts
- * Generated Sat Apr 25 09:53:18 PDT 2015
+ * Generated Thu Apr 30 19:55:28 PDT 2015
*/
#ifndef AUTOOPTS_PROTO_H_GUARD
#define AUTOOPTS_PROTO_H_GUARD 1
assert(0 == 1);
}
} else {
- succ = opt_find_long(pOpts, pzArg, &opt_state);
+ succ = opt_find_long(pOpts, (char *)pzArg, &opt_state);
if (! SUCCESSFUL(succ)) {
fprintf(stderr, zIllOptStr, pOpts->pzProgPath, pzArg);
pOpts->pUsageProc(pOpts, EXIT_FAILURE);
if (al == NULL)
return;
opt_ct = al->useCt;
- opt_list = VOIDP(al->apzArgs);
+ opt_list = (void **)al->apzArgs;
if (opt_ct <= 0) {
fprintf(fp, OPEN_CLOSE_FMT, name);
return;
opt_ct = al->useCt;
- opt_list = VOIDP(al->apzArgs);
+ opt_list = (void **)al->apzArgs;
if (opt_ct <= 0)
return;
case NUL: *ppSrc = NULL; return;
case '"': goto done;
case '\\':
- pSrc += ao_string_cook_escape_char((const char *)pSrc, (char *)&ch, 0x7F);
+ pSrc += ao_string_cook_escape_char((char *)pSrc, (char *)&ch, 0x7F);
if (ch == 0x7F)
break;
/* FALLTHROUGH */