From: Harlan Stenn Date: Fri, 22 Sep 2006 23:38:01 +0000 (-0400) Subject: Upgrade to libopts-27.4.3 X-Git-Tag: NTP_4_2_3P50~3^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7552a0a7452b049f5607e893fcf45fc13dc5fd58;p=thirdparty%2Fntp.git Upgrade to libopts-27.4.3 bk: 451473d9jh3RpgEEZnc6MlCqToeVWg --- diff --git a/libopts/Makefile.am b/libopts/Makefile.am index 9c1479cce..a5729889c 100644 --- a/libopts/Makefile.am +++ b/libopts/Makefile.am @@ -1,10 +1,14 @@ ## 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 \ diff --git a/libopts/autoopts.c b/libopts/autoopts.c index 1cb86b6f2..22104a9f8 100644 --- a/libopts/autoopts.c +++ b/libopts/autoopts.c @@ -1,6 +1,6 @@ /* - * $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 diff --git a/libopts/autoopts.h b/libopts/autoopts.h index 219baedaf..51f5269d8 100644 --- a/libopts/autoopts.h +++ b/libopts/autoopts.h @@ -2,7 +2,7 @@ /* * 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 diff --git a/libopts/autoopts/options.h b/libopts/autoopts/options.h index f15d7d525..6c78724c8 100644 --- a/libopts/autoopts/options.h +++ b/libopts/autoopts/options.h @@ -2,7 +2,7 @@ * * 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 * @@ -446,7 +446,7 @@ extern token_list_t* ao_string_tokenize( const char* ); extern const tOptionValue* configFileLoad( const char* ); -/* From: configfile.c line 872 +/* From: configfile.c line 871 * * optionFileLoad - Load the locatable config files, in order * @@ -476,7 +476,7 @@ extern const tOptionValue* configFileLoad( const char* ); extern int optionFileLoad( tOptions*, const char* ); -/* From: configfile.c line 241 +/* From: configfile.c line 240 * * optionFindNextValue - find a hierarcicaly valued option instance * @@ -525,7 +525,7 @@ extern const tOptionValue* optionFindValue( const tOptDesc*, const char*, const extern void optionFree( tOptions* ); -/* From: configfile.c line 310 +/* From: configfile.c line 309 * * optionGetValue - get a specific value from a hierarcical list * @@ -567,7 +567,7 @@ extern const tOptionValue* optionGetValue( const tOptionValue*, const char* ); 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 * diff --git a/libopts/autoopts/usage-txt.h b/libopts/autoopts/usage-txt.h index bd229551b..013f4e418 100644 --- a/libopts/autoopts/usage-txt.h +++ b/libopts/autoopts/usage-txt.h @@ -2,7 +2,7 @@ * * 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 * diff --git a/libopts/boolean.c b/libopts/boolean.c index d09833003..b0c40a7fa 100644 --- a/libopts/boolean.c +++ b/libopts/boolean.c @@ -1,6 +1,6 @@ /* - * $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. diff --git a/libopts/compat/compat.h b/libopts/compat/compat.h index 38b50cc69..fc711db53 100644 --- a/libopts/compat/compat.h +++ b/libopts/compat/compat.h @@ -7,7 +7,7 @@ * Author: Gary V Vaughan * 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 @@ -237,17 +237,17 @@ #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. diff --git a/libopts/compat/pathfind.c b/libopts/compat/pathfind.c index 540e08f9c..9cfbebb1d 100644 --- a/libopts/compat/pathfind.c +++ b/libopts/compat/pathfind.c @@ -5,10 +5,10 @@ /* * Author: Gary V Vaughan * 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: */ diff --git a/libopts/compat/snprintf.c b/libopts/compat/snprintf.c index 78bda479b..99c7eb679 100644 --- a/libopts/compat/snprintf.c +++ b/libopts/compat/snprintf.c @@ -7,7 +7,7 @@ # include # 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 @@ -15,7 +15,7 @@ # include # 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 diff --git a/libopts/compat/strdup.c b/libopts/compat/strdup.c index 34dbcc57f..a65dc4750 100644 --- a/libopts/compat/strdup.c +++ b/libopts/compat/strdup.c @@ -8,12 +8,12 @@ strdup( const char *s ) 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; } diff --git a/libopts/compat/windows-config.h b/libopts/compat/windows-config.h index a88ddbb86..359b17b69 100644 --- a/libopts/compat/windows-config.h +++ b/libopts/compat/windows-config.h @@ -36,7 +36,7 @@ * # 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 @@ -48,7 +48,7 @@ * # 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 */ @@ -105,14 +105,14 @@ #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 */ diff --git a/libopts/configfile.c b/libopts/configfile.c index c73364654..2b4d6d4af 100644 --- a/libopts/configfile.c +++ b/libopts/configfile.c @@ -1,5 +1,5 @@ /* - * $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. @@ -205,8 +205,7 @@ optionFindValue( const tOptDesc* pOptDesc, 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; @@ -214,12 +213,12 @@ optionFindValue( const tOptDesc* pOptDesc, } 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) @@ -283,7 +282,7 @@ optionFindNextValue( const tOptDesc* pOptDesc, const tOptionValue* pPrevVal, 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; @@ -291,7 +290,7 @@ optionFindNextValue( const tOptDesc* pOptDesc, const tOptionValue* pPrevVal, } while (--ct >= 0) { - tOptionValue* pOV = *(ppOV++); + tOptionValue* pOV = (tOptionValue*)*(ppOV++); if (foundOldVal) { pRes = pOV; break; @@ -346,14 +345,14 @@ optionGetValue( const tOptionValue* pOld, const char* pzValName ) 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; @@ -407,17 +406,17 @@ optionNextValue( const tOptionValue* pOVList, const tOptionValue* pOldOV ) 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; } diff --git a/libopts/cook.c b/libopts/cook.c index aecd4ec48..134be4cfd 100644 --- a/libopts/cook.c +++ b/libopts/cook.c @@ -1,6 +1,6 @@ /* - * $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 diff --git a/libopts/enumeration.c b/libopts/enumeration.c index 0dbe56614..cf5d6d117 100644 --- a/libopts/enumeration.c +++ b/libopts/enumeration.c @@ -1,6 +1,6 @@ /* - * $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. diff --git a/libopts/environment.c b/libopts/environment.c index caaa712ba..d7e9e8c74 100644 --- a/libopts/environment.c +++ b/libopts/environment.c @@ -1,6 +1,6 @@ /* - * $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 diff --git a/libopts/genshell.c b/libopts/genshell.c index 5512fd27c..404597466 100644 --- a/libopts/genshell.c +++ b/libopts/genshell.c @@ -2,7 +2,7 @@ * * 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 */ @@ -38,6 +38,7 @@ */ +#include #define OPTION_CODE_COMPILE 1 #include "genshell.h" @@ -80,7 +81,7 @@ tSCC zScriptText[] = 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: @@ -92,7 +93,7 @@ tSCC zNotShell_Name[] = "no-shell"; 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: diff --git a/libopts/genshell.h b/libopts/genshell.h index ee76422f4..4f197c70b 100644 --- a/libopts/genshell.h +++ b/libopts/genshell.h @@ -2,7 +2,7 @@ * * 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 */ diff --git a/libopts/load.c b/libopts/load.c index 19edbcd34..350f8208e 100644 --- a/libopts/load.c +++ b/libopts/load.c @@ -1,6 +1,6 @@ /* - * $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 diff --git a/libopts/m4/libopts.m4 b/libopts/m4/libopts.m4 index eb2aaf14e..7ef37ef20 100644 --- a/libopts/m4/libopts.m4 +++ b/libopts/m4/libopts.m4 @@ -2,7 +2,7 @@ dnl -*- buffer-read-only: t -*- vi: set ro: 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 @@ -422,6 +422,11 @@ AC_DEFUN([LIBOPTS_CHECK],[ 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], diff --git a/libopts/makeshell.c b/libopts/makeshell.c index dbb4ff590..171cb23b8 100644 --- a/libopts/makeshell.c +++ b/libopts/makeshell.c @@ -1,6 +1,6 @@ /* - * $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 diff --git a/libopts/nested.c b/libopts/nested.c index 00b88691a..2246654d6 100644 --- a/libopts/nested.c +++ b/libopts/nested.c @@ -1,6 +1,6 @@ /* - * $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. @@ -511,10 +511,10 @@ static void 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 ); diff --git a/libopts/numeric.c b/libopts/numeric.c index 26790df3c..08c520be1 100644 --- a/libopts/numeric.c +++ b/libopts/numeric.c @@ -1,6 +1,6 @@ /* - * $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" */ diff --git a/libopts/pgusage.c b/libopts/pgusage.c index 61684555d..4dc707541 100644 --- a/libopts/pgusage.c +++ b/libopts/pgusage.c @@ -1,6 +1,6 @@ /* - * $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. diff --git a/libopts/proto.h b/libopts/proto.h index e2950bcc8..03d431d55 100644 --- a/libopts/proto.h +++ b/libopts/proto.h @@ -1,7 +1,7 @@ /* -*- 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 diff --git a/libopts/putshell.c b/libopts/putshell.c index f98f75260..1f7a611ce 100644 --- a/libopts/putshell.c +++ b/libopts/putshell.c @@ -1,6 +1,6 @@ /* - * $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 diff --git a/libopts/restore.c b/libopts/restore.c index ce788b330..798614cee 100644 --- a/libopts/restore.c +++ b/libopts/restore.c @@ -1,6 +1,6 @@ /* - * 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 diff --git a/libopts/save.c b/libopts/save.c index d225c27b4..9c73057e4 100644 --- a/libopts/save.c +++ b/libopts/save.c @@ -1,6 +1,6 @@ /* - * 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 diff --git a/libopts/sort.c b/libopts/sort.c index de0bd5634..90c81a8c9 100644 --- a/libopts/sort.c +++ b/libopts/sort.c @@ -1,6 +1,6 @@ /* - * 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. diff --git a/libopts/stack.c b/libopts/stack.c index 5f51f37db..65db828eb 100644 --- a/libopts/stack.c +++ b/libopts/stack.c @@ -1,7 +1,7 @@ /* * 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 diff --git a/libopts/streqvcmp.c b/libopts/streqvcmp.c index 42336dc97..f66ddd804 100644 --- a/libopts/streqvcmp.c +++ b/libopts/streqvcmp.c @@ -1,6 +1,6 @@ /* - * $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 diff --git a/libopts/text_mmap.c b/libopts/text_mmap.c index 84d7242a0..e0878f9c8 100644 --- a/libopts/text_mmap.c +++ b/libopts/text_mmap.c @@ -1,5 +1,5 @@ /* - * $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" */ @@ -19,7 +19,8 @@ #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 diff --git a/libopts/tokenize.c b/libopts/tokenize.c index 09b80f585..2c9c5e7ea 100644 --- a/libopts/tokenize.c +++ b/libopts/tokenize.c @@ -30,14 +30,14 @@ /* = = = 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); @@ -60,15 +60,15 @@ copy_cooked( ch_t** ppDest, cc_t** ppSrc ) 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++); @@ -108,7 +108,7 @@ copy_raw( ch_t** ppDest, cc_t** ppSrc ) done: *ppDest = pDest; /* next spot for storing character */ - *ppSrc = pSrc; /* char following closing quote */ + *ppSrc = (const char *) pSrc; /* char following closing quote */ } @@ -189,7 +189,7 @@ ao_string_tokenize( const char* str ) * 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; @@ -231,33 +231,33 @@ ao_string_tokenize( const char* str ) 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; diff --git a/libopts/usage.c b/libopts/usage.c index 2dae8c09a..18843cdd0 100644 --- a/libopts/usage.c +++ b/libopts/usage.c @@ -1,6 +1,6 @@ /* - * 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 diff --git a/libopts/version.c b/libopts/version.c index e01809a80..dd50ec4d8 100644 --- a/libopts/version.c +++ b/libopts/version.c @@ -1,5 +1,5 @@ -/* $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