## LIBOPTS Makefile
-MAINTAINERCLEANFILES = Makefile.in
-lib_LTLIBRARIES = libopts.la
-libopts_la_SOURCES = libopts.c
-libopts_la_CPPFLAGS = -I$(top_srcdir)
-libopts_la_LDFLAGS = -version-info 27:4:3
-EXTRA_DIST = \
+MAINTAINERCLEANFILES = Makefile.in
+if INSTALL_LIBOPTS
+lib_LTLIBRARIES = libopts.la
+else
+noinst_LTLIBRARIES = libopts.la
+endif
+libopts_la_SOURCES = libopts.c
+libopts_la_CPPFLAGS = -I$(top_srcdir)
+libopts_la_LDFLAGS = -version-info 27:4:3
+EXTRA_DIST = \
COPYING.lgpl COPYING.mbsd MakeDefs.inc \
README autoopts/options.h autoopts/usage-txt.h \
autoopts.c autoopts.h boolean.c \
/*
- * $Id: autoopts.c,v 4.22 2006/07/15 22:10:21 bkorb Exp $
+ * $Id: autoopts.c,v 4.14 2006/09/13 14:31:07 bkorb Exp $
* Time-stamp: "2006-09-10 14:42:45 bkorb"
*
* This file contains all of the routines that must be linked into
/*
* Time-stamp: "2006-09-10 14:43:25 bkorb"
*
- * autoopts.h $Id: autoopts.h,v 4.26 2006/08/12 17:31:50 bkorb Exp $
+ * autoopts.h $Id: autoopts.h,v 4.15 2006/09/13 14:31:07 bkorb Exp $
* Time-stamp: "2005-02-14 05:59:50 bkorb"
*
* This file defines all the global structures and special values
*
* DO NOT EDIT THIS FILE (options.h)
*
- * It has been AutoGen-ed Sunday September 10, 2006 at 04:03:10 PM PDT
+ * It has been AutoGen-ed Tuesday September 19, 2006 at 09:27:53 PM PDT
* From the definitions funcs.def
* and the template file options_h
*
extern const tOptionValue* configFileLoad( const char* );
-/* From: configfile.c line 872
+/* From: configfile.c line 871
*
* optionFileLoad - Load the locatable config files, in order
*
extern int optionFileLoad( tOptions*, const char* );
-/* From: configfile.c line 241
+/* From: configfile.c line 240
*
* optionFindNextValue - find a hierarcicaly valued option instance
*
extern void optionFree( tOptions* );
-/* From: configfile.c line 310
+/* From: configfile.c line 309
*
* optionGetValue - get a specific value from a hierarcical list
*
extern void optionLoadLine( tOptions*, const char* );
-/* From: configfile.c line 369
+/* From: configfile.c line 368
*
* optionNextValue - get the next value from a hierarchical list
*
*
* DO NOT EDIT THIS FILE (usage-txt.h)
*
- * It has been AutoGen-ed Sunday September 10, 2006 at 04:03:08 PM PDT
+ * It has been AutoGen-ed Tuesday September 19, 2006 at 09:27:51 PM PDT
* From the definitions usage-txt.def
* and the template file usage-txt.tpl
*
/*
- * $Id: boolean.c,v 4.6 2006/03/25 19:23:28 bkorb Exp $
+ * $Id: boolean.c,v 4.4 2006/03/31 19:52:10 bkorb Exp $
* Time-stamp: "2005-02-14 08:24:12 bkorb"
*
* Automated Options Paged Usage module.
* Author: Gary V Vaughan <gvaughan@oranda.demon.co.uk>
* Created: Mon Jun 30 15:54:46 1997
*
- * $Id: compat.h,v 4.12 2006/09/07 14:46:34 bkorb Exp $
+ * $Id: compat.h,v 4.12 2006/09/16 19:58:55 bkorb Exp $
*/
#ifndef COMPAT_H_GUARD
#define COMPAT_H_GUARD 1
#ifndef HAVE_INT32_T
# if SIZEOF_INT == 4
- typedef signed int int32_t;
+ typedef signed int int32_t;
# elif SIZEOF_LONG == 4
- typedef signed long int32_t;
+ typedef signed long int32_t;
# endif
#endif
#ifndef HAVE_UINT32_T
# if SIZEOF_INT == 4
- typedef unsigned int uint32_t;
+ typedef unsigned int uint32_t;
# elif SIZEOF_LONG == 4
- typedef unsigned long uint32_t;
+ typedef unsigned long uint32_t;
# else
# error Cannot create a uint32_t type.
Choke Me.
/*
* Author: Gary V Vaughan <gvaughan@oranda.demon.co.uk>
* Created: Tue Jun 24 15:07:31 1997
- * Last Modified: $Date: 2006/08/22 16:06:36 $
+ * Last Modified: $Date: 2006/08/22 16:09:02 $
* by: bkorb
*
- * $Id: pathfind.c,v 4.7 2006/08/22 16:06:36 bkorb Exp $
+ * $Id: pathfind.c,v 4.7 2006/08/22 16:09:02 bkorb Exp $
*/
/* Code: */
# include <stdarg.h>
# ifndef VA_START
# define VA_START(a, f) va_start(a, f)
-# define VA_END(a) va_end(a)
+# define VA_END(a) va_end(a)
# endif /* VA_START */
# define SNV_USING_STDARG_H
# include <varargs.h>
# ifndef VA_START
# define VA_START(a, f) va_start(a)
-# define VA_END(a) va_end(a)
+# define VA_END(a) va_end(a)
# endif /* VA_START */
# undef SNV_USING_STDARG_H
char *cp;
if (s == NULL)
- return NULL;
+ return NULL;
cp = (char *) AGALOC((unsigned) (strlen(s)+1), "strdup");
if (cp != NULL)
- (void) strcpy(cp, s);
+ (void) strcpy(cp, s);
return cp;
}
* # define HAVE_VSPRINTF
* # define HAVE_SNPRINTF
* # define HAVE_VSNPRINTF
- * # define HAVE_PROTOTYPES /* from ntpq.mak * /
+ * # define HAVE_PROTOTYPES /* from ntpq.mak * /
* # define HAVE_MEMMOVE
* # define HAVE_TERMIOS_H
* # define HAVE_ERRNO_H
* # define ISC_PLATFORM_NEEDNTOP
* # define ISC_PLATFORM_NEEDPTON
* # define NEED_S_CHAR_TYPEDEF
- * # define USE_PROTOTYPES /* for ntp_types.h * /
+ * # define USE_PROTOTYPES /* for ntp_types.h * /
*
* #define ULONG_CONST(a) a ## UL
*/
#define O_RDONLY _O_RDONLY
#define O_EXCL _O_EXCL
-#ifndef S_ISREG
+#ifndef S_ISREG
# define S_IFREG _S_IFREG
-# define S_ISREG(mode) (((mode) & S_IFREG) == S_IFREG)
+# define S_ISREG(mode) (((mode) & S_IFREG) == S_IFREG)
#endif
-#ifndef S_ISDIR
+#ifndef S_ISDIR
# define S_IFDIR _S_IFDIR
-# define S_ISDIR(mode) (((mode) & S_IFDIR) == S_IFDIR)
+# define S_ISDIR(mode) (((mode) & S_IFDIR) == S_IFDIR)
#endif
#endif /* WINDOWS_CONFIG_HACKERY */
/*
- * $Id: configfile.c,v 4.23 2006/07/01 21:57:23 bkorb Exp $
+ * $Id: configfile.c,v 1.12 2006/09/20 04:27:44 bkorb Exp $
* Time-stamp: "2006-09-10 13:57:10 bkorb"
*
* configuration/rc/ini file handling.
else do {
tArgList* pAL = pOptDesc->optCookie;
int ct = pAL->useCt;
- const tOptionValue** ppOV =
- (const tOptionValue**)(void*)&(pAL->apzArgs);
+ tCC** ppOV = pAL->apzArgs;
if (ct == 0) {
errno = ENOENT;
}
if (pzName == NULL) {
- pRes = *ppOV;
+ pRes = (tOptionValue*)*ppOV;
break;
}
while (--ct >= 0) {
- const tOptionValue* pOV = *(ppOV++);
+ const tOptionValue* pOV = (tOptionValue*)*(ppOV++);
const tOptionValue* pRV = optionGetValue( pOV, pzName );
if (pRV == NULL)
else do {
tArgList* pAL = pOptDesc->optCookie;
int ct = pAL->useCt;
- tOptionValue** ppOV = (tOptionValue**)(void*)&(pAL->apzArgs);
+ tCC** ppOV = pAL->apzArgs;
if (ct == 0) {
errno = ENOENT;
}
while (--ct >= 0) {
- tOptionValue* pOV = *(ppOV++);
+ tOptionValue* pOV = (tOptionValue*)*(ppOV++);
if (foundOldVal) {
pRes = pOV;
break;
if (pAL->useCt > 0) {
int ct = pAL->useCt;
- tOptionValue** papOV = (tOptionValue**)(pAL->apzArgs);
+ tCC** papOV = pAL->apzArgs;
if (pzValName == NULL) {
- pRes = *papOV;
+ pRes = (tOptionValue*)*papOV;
}
else do {
- tOptionValue* pOV = *(papOV++);
+ tOptionValue* pOV = (tOptionValue*)*(papOV++);
if (strcmp( pOV->pzName, pzValName ) == 0) {
pRes = pOV;
break;
pAL = pOVList->v.nestVal;
{
int ct = pAL->useCt;
- tOptionValue** papNV = (tOptionValue**)(pAL->apzArgs);
+ tCC** papNV = pAL->apzArgs;
while (ct-- > 0) {
- tOptionValue* pNV = *(papNV++);
+ tOptionValue* pNV = (tOptionValue*)*(papNV++);
if (pNV == pOldOV) {
if (ct == 0) {
err = ENOENT;
} else {
err = 0;
- pRes = *papNV;
+ pRes = (tOptionValue*)*papNV;
}
break;
}
/*
- * $Id: cook.c,v 4.6 2006/06/24 23:34:51 bkorb Exp $
+ * $Id: cook.c,v 4.4 2006/06/24 23:36:07 bkorb Exp $
* Time-stamp: "2006-06-24 11:29:58 bkorb"
*
* This file contains the routines that deal with processing quoted strings
/*
- * $Id: enumeration.c,v 4.11 2006/06/24 23:34:51 bkorb Exp $
+ * $Id: enumeration.c,v 4.9 2006/06/24 23:36:08 bkorb Exp $
* Time-stamp: "2006-06-24 10:46:02 bkorb"
*
* Automated Options Paged Usage module.
/*
- * $Id: environment.c,v 4.10 2006/03/25 19:23:28 bkorb Exp $
+ * $Id: environment.c,v 4.7 2006/03/31 19:52:10 bkorb Exp $
* Time-stamp: "2005-10-29 13:23:59 bkorb"
*
* This file contains all of the routines that must be linked into
*
* DO NOT EDIT THIS FILE (genshell.c)
*
- * It has been AutoGen-ed Sunday September 10, 2006 at 04:03:10 PM PDT
+ * It has been AutoGen-ed Tuesday September 19, 2006 at 09:27:53 PM PDT
* From the definitions genshell.def
* and the template file options
*/
*/
+#include <limits.h>
#define OPTION_CODE_COMPILE 1
#include "genshell.h"
tSCC zScript_NAME[] = "SCRIPT";
tSCC zScript_Name[] = "script";
#define SCRIPT_FLAGS (OPTST_DISABLED \
- | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Shell option description:
tSCC zNotShell_Pfx[] = "no";
#define zShell_Name (zNotShell_Name + 3)
#define SHELL_FLAGS (OPTST_INITENABLED \
- | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Help/More_Help/Version option descriptions:
*
* DO NOT EDIT THIS FILE (genshell.h)
*
- * It has been AutoGen-ed Sunday September 10, 2006 at 04:03:10 PM PDT
+ * It has been AutoGen-ed Tuesday September 19, 2006 at 09:27:53 PM PDT
* From the definitions genshell.def
* and the template file options
*/
/*
- * $Id: load.c,v 4.23 2006/07/01 21:57:23 bkorb Exp $
+ * $Id: load.c,v 4.11 2006/07/14 04:31:37 bkorb Exp $
* Time-stamp: "2006-07-01 12:43:03 bkorb"
*
* This file contains the routines that deal with processing text strings
dnl
dnl DO NOT EDIT THIS FILE (libopts.m4)
dnl
-dnl It has been AutoGen-ed Sunday September 10, 2006 at 04:03:12 PM PDT
+dnl It has been AutoGen-ed Tuesday September 19, 2006 at 09:27:55 PM PDT
dnl From the definitions libopts.def
dnl and the template file conftest.tpl
dnl
NEED_LIBOPTS_DIR=true
fi])
+ AC_ARG_ENABLE([libopts-install],
+ AC_HELP_STRING([--disable-libopts-install],
+ [Do not install libopts with client installation]))
+ AM_CONDITIONAL([INSTALL_LIBOPTS],[test "X${enable_libopts_install}" != Xno])
+
[if test -z "${NEED_LIBOPTS_DIR}" ; then]
AC_MSG_CHECKING([whether autoopts-config can be found])
AC_ARG_WITH([autoopts-config],
/*
- * $Id: makeshell.c,v 4.14 2006/07/27 02:51:47 bkorb Exp $
+ * $Id: makeshell.c,v 4.10 2006/07/27 02:59:08 bkorb Exp $
* Time-stamp: "2006-07-24 21:30:51 bkorb"
*
* This module will interpret the options set in the tOptions
/*
- * $Id: nested.c,v 4.9 2006/03/25 19:23:28 bkorb Exp $
+ * $Id: nested.c,v 4.5 2006/09/20 04:27:44 bkorb Exp $
* Time-stamp: "2005-07-27 10:10:28 bkorb"
*
* Automated Options Nested Values module.
unloadNestedArglist( tArgList* pAL )
{
int ct = pAL->useCt;
- tOptionValue** ppNV = (tOptionValue**)(pAL->apzArgs);
+ tCC** ppNV = pAL->apzArgs;
while (ct-- > 0) {
- tOptionValue* pNV = *(ppNV++);
+ tOptionValue* pNV = (tOptionValue*)*(ppNV++);
if (pNV->valType == OPARG_TYPE_HIERARCHY)
unloadNestedArglist( pNV->v.nestVal );
free( pNV );
/*
- * $Id: numeric.c,v 4.7 2006/03/25 19:23:28 bkorb Exp $
+ * $Id: numeric.c,v 4.5 2006/03/31 19:52:10 bkorb Exp $
* Time-stamp: "2005-02-14 08:22:56 bkorb"
*/
/*
- * $Id: pgusage.c,v 4.12 2006/07/16 15:27:50 bkorb Exp $
+ * $Id: pgusage.c,v 4.10 2006/07/16 15:29:31 bkorb Exp $
* Time-stamp: "2006-07-16 08:13:26 bkorb"
*
* Automated Options Paged Usage module.
/* -*- buffer-read-only: t -*- vi: set ro:
*
* Prototypes for autoopts
- * Generated Sun Sep 10 16:03:11 PDT 2006
+ * Generated Tue Sep 19 21:27:54 PDT 2006
*/
#ifndef AUTOOPTS_PROTO_H_GUARD
#define AUTOOPTS_PROTO_H_GUARD 1
/*
- * $Id: putshell.c,v 4.12 2006/07/16 15:27:50 bkorb Exp $
+ * $Id: putshell.c,v 4.9 2006/07/16 15:29:31 bkorb Exp $
* Time-stamp: "2006-07-16 08:13:24 bkorb"
*
* This module will interpret the options set in the tOptions
/*
- * restore.c $Id: restore.c,v 4.7 2006/03/25 19:23:28 bkorb Exp $
+ * restore.c $Id: restore.c,v 4.5 2006/03/31 19:52:11 bkorb Exp $
* Time-stamp: "2005-02-23 15:10:20 bkorb"
*
* This module's routines will save the current option state to memory
/*
- * save.c $Id: save.c,v 4.16 2006/07/16 15:27:50 bkorb Exp $
+ * save.c $Id: save.c,v 4.8 2006/07/16 15:29:31 bkorb Exp $
* Time-stamp: "2006-07-16 08:13:22 bkorb"
*
* This module's routines will take the currently set options and
/*
- * sort.c $Id: sort.c,v 4.10 2006/06/24 23:34:51 bkorb Exp $
+ * sort.c $Id: sort.c,v 4.7 2006/06/24 23:36:08 bkorb Exp $
* Time-stamp: "2006-06-24 10:53:35 bkorb"
*
* This module implements argument sorting.
/*
* stack.c
- * $Id: stack.c,v 4.10 2006/07/14 04:20:17 bkorb Exp $
+ * $Id: stack.c,v 4.7 2006/07/14 04:31:38 bkorb Exp $
* Time-stamp: "2006-07-13 21:11:29 bkorb"
*
* This is a special option processing routine that will save the
/*
- * $Id: streqvcmp.c,v 4.10 2006/07/27 02:51:47 bkorb Exp $
+ * $Id: streqvcmp.c,v 4.7 2006/07/27 02:59:08 bkorb Exp $
* Time-stamp: "2006-07-26 18:25:53 bkorb"
*
* String Equivalence Comparison
/*
- * $Id: text_mmap.c,v 4.12 2006/08/22 16:06:36 bkorb Exp $
+ * $Id: text_mmap.c,v 4.12 2006/09/16 19:58:54 bkorb Exp $
*
* Time-stamp: "2006-09-10 14:50:04 bkorb"
*/
#define AO_INVALID_FD -1
#define FILE_WRITABLE(_prt,_flg) \
- ((_prt & PROT_WRITE) && ((_flg & (MAP_SHARED|MAP_PRIVATE)) == MAP_SHARED))
+ ( (_prt & PROT_WRITE) \
+ && ((_flg & (MAP_SHARED|MAP_PRIVATE)) == MAP_SHARED))
#define MAP_FAILED_PTR ((void*)MAP_FAILED)
/*=export_func text_mmap
/* = = = START-STATIC-FORWARD = = = */
/* static forward declarations maintained by :mkfwd */
static void
-copy_cooked( ch_t** ppDest, cc_t** ppSrc );
+copy_cooked( ch_t** ppDest, const char ** ppSrc );
static void
-copy_raw( ch_t** ppDest, cc_t** ppSrc );
+copy_raw( ch_t** ppDest, const char ** ppSrc );
/* = = = END-STATIC-FORWARD = = = */
static void
-copy_cooked( ch_t** ppDest, cc_t** ppSrc )
+copy_cooked( ch_t** ppDest, const char ** ppSrc )
{
ch_t* pDest = (ch_t*)*ppDest;
const ch_t* pSrc = (const ch_t*)(*ppSrc + 1);
done:
*ppDest = (ch_t*)pDest; /* next spot for storing character */
- *ppSrc = (ch_t*)pSrc; /* char following closing quote */
+ *ppSrc = (const char *)pSrc; /* char following closing quote */
}
static void
-copy_raw( ch_t** ppDest, cc_t** ppSrc )
+copy_raw( ch_t** ppDest, const char ** ppSrc )
{
ch_t* pDest = *ppDest;
- cc_t* pSrc = *ppSrc + 1;
+ cc_t* pSrc = (cc_t*) (*ppSrc + 1);
for (;;) {
ch_t ch = *(pSrc++);
done:
*ppDest = pDest; /* next spot for storing character */
- *ppSrc = pSrc; /* char following closing quote */
+ *ppSrc = (const char *) pSrc; /* char following closing quote */
}
* Trim leading white space. Use "ENOENT" and a NULL return to indicate
* an empty string was passed.
*/
- while (isspace( *str )) str++;
+ while (isspace( (ch_t)*str )) str++;
if (*str == NUL) {
bogus_str:
errno = ENOENT;
do {
res->tkn_list[ res->tkn_ct++ ] = pzDest;
for (;;) {
- char ch = *str;
+ int ch = (ch_t)*str;
if (isspace( ch )) {
found_white_space:
- while (isspace( *++str )) ;
+ while (isspace( (ch_t)*++str )) ;
break;
}
switch (ch) {
case '"':
- copy_cooked( &pzDest, (cc_t**)(void*)&str );
+ copy_cooked( &pzDest, &str );
if (str == NULL) {
free(res);
errno = EINVAL;
return NULL;
}
- if (isspace( *str ))
+ if (isspace( (ch_t)*str ))
goto found_white_space;
break;
case '\'':
- copy_raw( &pzDest, (cc_t**)(void*)&str );
+ copy_raw( &pzDest, &str );
if (str == NULL) {
free(res);
errno = EINVAL;
return NULL;
}
- if (isspace( *str ))
+ if (isspace( (ch_t)*str ))
goto found_white_space;
break;
/*
- * usage.c $Id: usage.c,v 4.15 2006/08/12 17:31:50 bkorb Exp $
+ * usage.c $Id: usage.c,v 4.10 2006/08/12 17:36:43 bkorb Exp $
* Time-stamp: "2006-07-01 12:41:02 bkorb"
*
* This module implements the default usage procedure for
-/* $Id: version.c,v 4.9 2006/07/27 02:51:47 bkorb Exp $
+/* $Id: version.c,v 4.7 2006/07/27 02:59:08 bkorb Exp $
* Time-stamp: "2006-07-26 18:38:16 bkorb"
*
* This module implements the default usage procedure for