Check-in [59af3f328b]
Overview
Comment:Changed to `strtoull' to `strtoll' and updated code. Changed URL in header Added TODO libconfig 0.1.1
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | 0.1.1
Files: files | file ages | folders
SHA1:59af3f328ba05b997ae89a7876d1d1ca9d4d1025
User & Date: rkeene on 2004-10-31 20:46:08
Other Links: manifest | tags
Context
2004-11-17
09:49
Updated libconfig check-in: 67a12fd87a user: rkeene tags: trunk
2004-10-31
20:46
Changed to `strtoull' to `strtoll' and updated code. Changed URL in header Added TODO libconfig 0.1.1 check-in: 59af3f328b user: rkeene tags: trunk, 0.1.1
2004-10-29
16:40
Updated man pages. check-in: 2dfd527012 user: rkeene tags: trunk
Changes

Modified HEADER from [958c9c7bd9] to [6fae83179a].

     1      1                                   @@UTIL@@ @@VERS@@
     2      2   
     3      3   Release information:
     4      4     pkg:  @@UTIL@@ version @@VERS@@
     5         -  url:  http://www.rkeene.org/devel/@@UTIL@@-@@VERS@@.tar.gz
            5  +  url:  http://www.rkeene.org/files/oss/@@UTIL@@/devel/@@UTIL@@-@@VERS@@.tar.gz
            6  +  web:  http://www.rkeene.org/oss/@@UTIL@@/
     6      7     date: @@DATE@@
     7      8     mail: @@UTIL@@@rkeene.org
     8      9   --------------------------------------------------------------------------
     9     10   

Added TODO version [3922149abc].

            1  +SIZE_SIZET

Modified compat.h from [18e2a49265] to [309b8b282c].

     8      8   #include "win32.h"
     9      9   #endif
    10     10   
    11     11   #ifndef LC_LINEBUF_LEN
    12     12   #define LC_LINEBUF_LEN 1024
    13     13   #endif
    14     14   
    15         -#ifndef HAVE_STRTOULL
    16         -#include "strtoull.h"
           15  +#ifndef HAVE_STRTOLL
           16  +#include "strtoll.h"
    17     17   #endif
    18     18   #ifndef HAVE_STRSEP
    19     19   #include "strsep.h"
    20     20   #endif
    21     21   #ifdef HAVE_INTTYPES_H
    22     22   #include <inttypes.h>
    23     23   #endif

Modified config.h.in from [0a6cb3c796] to [3d89d8d8f7].

    32     32   
    33     33   /* Define to 1 if you have the <string.h> header file. */
    34     34   #undef HAVE_STRING_H
    35     35   
    36     36   /* Define to 1 if you have the `strsep' function. */
    37     37   #undef HAVE_STRSEP
    38     38   
    39         -/* Define to 1 if you have the `strtoull' function. */
    40         -#undef HAVE_STRTOULL
           39  +/* Define to 1 if you have the `strtoll' function. */
           40  +#undef HAVE_STRTOLL
    41     41   
    42     42   /* Define to 1 if you have the <sys/stat.h> header file. */
    43     43   #undef HAVE_SYS_STAT_H
    44     44   
    45     45   /* Define to 1 if you have the <sys/time.h> header file. */
    46     46   #undef HAVE_SYS_TIME_H
    47     47   

Modified configure from [80531d32c6] to [9b522e9e7d].

     1      1   #! /bin/sh
     2      2   # From configure.in Revision .
     3      3   # Guess values for system-dependent variables and create Makefiles.
     4         -# Generated by GNU Autoconf 2.59 for libconfig 0.1.0.
            4  +# Generated by GNU Autoconf 2.59 for libconfig 0.1.1.
     5      5   #
     6      6   # Copyright (C) 2003 Free Software Foundation, Inc.
     7      7   # This configure script is free software; the Free Software Foundation
     8      8   # gives unlimited permission to copy, distribute and modify it.
     9      9   ## --------------------- ##
    10     10   ## M4sh Initialization.  ##
    11     11   ## --------------------- ##
................................................................................
   264    264   # This variable seems obsolete.  It should probably be removed, and
   265    265   # only ac_max_sed_lines should be used.
   266    266   : ${ac_max_here_lines=38}
   267    267   
   268    268   # Identity of this package.
   269    269   PACKAGE_NAME='libconfig'
   270    270   PACKAGE_TARNAME='libconfig'
   271         -PACKAGE_VERSION='0.1.0'
   272         -PACKAGE_STRING='libconfig 0.1.0'
          271  +PACKAGE_VERSION='0.1.1'
          272  +PACKAGE_STRING='libconfig 0.1.1'
   273    273   PACKAGE_BUGREPORT=''
   274    274   
   275    275   # Factoring default headers for most tests.
   276    276   ac_includes_default="\
   277    277   #include <stdio.h>
   278    278   #if HAVE_SYS_TYPES_H
   279    279   # include <sys/types.h>
................................................................................
   774    774   #
   775    775   # Report the --help message.
   776    776   #
   777    777   if test "$ac_init_help" = "long"; then
   778    778     # Omit some internal or obsolete options to make the list less imposing.
   779    779     # This message is too long to be a string in the A/UX 3.1 sh.
   780    780     cat <<_ACEOF
   781         -\`configure' configures libconfig 0.1.0 to adapt to many kinds of systems.
          781  +\`configure' configures libconfig 0.1.1 to adapt to many kinds of systems.
   782    782   
   783    783   Usage: $0 [OPTION]... [VAR=VALUE]...
   784    784   
   785    785   To assign environment variables (e.g., CC, CFLAGS...), specify them as
   786    786   VAR=VALUE.  See below for descriptions of some of the useful variables.
   787    787   
   788    788   Defaults for the options are specified in brackets.
................................................................................
   835    835     --build=BUILD     configure for building on BUILD [guessed]
   836    836     --host=HOST       cross-compile to build programs to run on HOST [BUILD]
   837    837   _ACEOF
   838    838   fi
   839    839   
   840    840   if test -n "$ac_init_help"; then
   841    841     case $ac_init_help in
   842         -     short | recursive ) echo "Configuration of libconfig 0.1.0:";;
          842  +     short | recursive ) echo "Configuration of libconfig 0.1.1:";;
   843    843      esac
   844    844     cat <<\_ACEOF
   845    845   
   846    846   Some influential environment variables:
   847    847     CC          C compiler command
   848    848     CFLAGS      C compiler flags
   849    849     LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
................................................................................
   946    946       cd $ac_popdir
   947    947     done
   948    948   fi
   949    949   
   950    950   test -n "$ac_init_help" && exit 0
   951    951   if $ac_init_version; then
   952    952     cat <<\_ACEOF
   953         -libconfig configure 0.1.0
          953  +libconfig configure 0.1.1
   954    954   generated by GNU Autoconf 2.59
   955    955   
   956    956   Copyright (C) 2003 Free Software Foundation, Inc.
   957    957   This configure script is free software; the Free Software Foundation
   958    958   gives unlimited permission to copy, distribute and modify it.
   959    959   _ACEOF
   960    960     exit 0
   961    961   fi
   962    962   exec 5>config.log
   963    963   cat >&5 <<_ACEOF
   964    964   This file contains any messages produced by compilers while
   965    965   running configure, to aid debugging if configure makes a mistake.
   966    966   
   967         -It was created by libconfig $as_me 0.1.0, which was
          967  +It was created by libconfig $as_me 0.1.1, which was
   968    968   generated by GNU Autoconf 2.59.  Invocation command line was
   969    969   
   970    970     $ $0 $@
   971    971   
   972    972   _ACEOF
   973    973   {
   974    974   cat <<_ASUNAME
................................................................................
 15429  15429   			break
 15430  15430   		fi
 15431  15431   	done
 15432  15432   
 15433  15433   
 15434  15434   
 15435  15435   
 15436         -for ac_func in strsep strtoull
        15436  +for ac_func in strsep strtoll
 15437  15437   do
 15438  15438   as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 15439  15439   echo "$as_me:$LINENO: checking for $ac_func" >&5
 15440  15440   echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 15441  15441   if eval "test \"\${$as_ac_var+set}\" = set"; then
 15442  15442     echo $ECHO_N "(cached) $ECHO_C" >&6
 15443  15443   else
................................................................................
 16682  16682     echo
 16683  16683     sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
 16684  16684   ## Running $as_me. ##
 16685  16685   _ASBOX
 16686  16686   } >&5
 16687  16687   cat >&5 <<_CSEOF
 16688  16688   
 16689         -This file was extended by libconfig $as_me 0.1.0, which was
        16689  +This file was extended by libconfig $as_me 0.1.1, which was
 16690  16690   generated by GNU Autoconf 2.59.  Invocation command line was
 16691  16691   
 16692  16692     CONFIG_FILES    = $CONFIG_FILES
 16693  16693     CONFIG_HEADERS  = $CONFIG_HEADERS
 16694  16694     CONFIG_LINKS    = $CONFIG_LINKS
 16695  16695     CONFIG_COMMANDS = $CONFIG_COMMANDS
 16696  16696     $ $0 $@
................................................................................
 16742  16742   $config_headers
 16743  16743   
 16744  16744   Report bugs to <bug-autoconf@gnu.org>."
 16745  16745   _ACEOF
 16746  16746   
 16747  16747   cat >>$CONFIG_STATUS <<_ACEOF
 16748  16748   ac_cs_version="\\
 16749         -libconfig config.status 0.1.0
        16749  +libconfig config.status 0.1.1
 16750  16750   configured by $0, generated by GNU Autoconf 2.59,
 16751  16751     with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 16752  16752   
 16753  16753   Copyright (C) 2003 Free Software Foundation, Inc.
 16754  16754   This config.status script is free software; the Free Software Foundation
 16755  16755   gives unlimited permission to copy, distribute and modify it."
 16756  16756   srcdir=$srcdir

Modified configure.in from [10d7c6dbc1] to [eed6770815].

     1      1   AC_REVISION($Revision $)
     2         -AC_INIT(libconfig, 0.1.0)
            2  +AC_INIT(libconfig, 0.1.1)
     3      3   AC_CONFIG_HEADER(config.h)
     4      4   
     5      5   dnl Find out about the host OS
     6      6   DC_CHK_OS_INFO
     7      7   
     8      8   dnl Checks for programs.
     9      9   AC_PROG_CC
................................................................................
    20     20   DC_DO_TYPE(uint64_t, unsigned, 8)
    21     21   DC_DO_TYPE(int64_t, signed, 8)
    22     22   DC_DO_TYPE(uint32_t, unsigned, 4)
    23     23   DC_DO_TYPE(int32_t, signed, 4)
    24     24   DC_DO_TYPE(uint16_t, unsigned, 2)
    25     25   DC_DO_TYPE(int16_t, signed, 2)
    26     26   
    27         -AC_REPLACE_FUNCS(strsep strtoull)
           27  +AC_REPLACE_FUNCS(strsep strtoll)
    28     28   AC_CHECK_FUNCS(getpwuid)
    29     29   
    30     30   dnl Checks for Win32 specific things.
    31     31   DC_DO_WIN32
    32     32   
    33     33   dnl This must be last.
    34     34   DC_GET_SHOBJFLAGS
    35     35   
    36     36   AC_OUTPUT(Makefile lc_geterrno.3 lc_process.3 lc_register_var.3 lc_geterrstr.3 lc_register_callback.3 libconfig.3)

Modified libconfig.c from [b6b91c93e6] to [0729e92710].

    51     51   	return(0);
    52     52   }
    53     53   
    54     54   static int lc_process_var_longlong(void *data, const char *value) {
    55     55   	long long *dataval;
    56     56   
    57     57   	dataval = data;
    58         -	*dataval = strtoull(value, NULL, 10);
           58  +	*dataval = strtoll(value, NULL, 10);
    59     59   
    60     60   	return(0);
    61     61   }
    62     62   
    63     63   static int lc_process_var_long(void *data, const char *value) {
    64     64   	long *dataval;
    65     65   
    66     66   	dataval = data;
    67         -	*dataval = strtoull(value, NULL, 10);
           67  +	*dataval = strtoll(value, NULL, 10);
    68     68   
    69     69   	return(0);
    70     70   }
    71     71   
    72     72   static int lc_process_var_int(void *data, const char *value) {
    73     73   	int *dataval;
    74     74   
    75     75   	dataval = data;
    76         -	*dataval = strtoull(value, NULL, 10);
           76  +	*dataval = strtoll(value, NULL, 10);
    77     77   
    78     78   	return(0);
    79     79   }
    80     80   
    81     81   static int lc_process_var_short(void *data, const char *value) {
    82     82   	short *dataval;
    83     83   
    84     84   	dataval = data;
    85         -	*dataval = strtoull(value, NULL, 10);
           85  +	*dataval = strtoll(value, NULL, 10);
    86     86   
    87     87   	return(0);
    88     88   }
    89     89   
    90     90   static int lc_process_var_bool_byexistance(void *data, const char *value) {
    91     91   	int *dataval;
    92     92   
................................................................................
   126    126   	return(-1);
   127    127   }
   128    128   
   129    129   static long long lc_process_size(const char *value) {
   130    130   	long long retval = -1;
   131    131   	char *mult = NULL;
   132    132   
   133         -	retval = strtoull(value, &mult, 10);
          133  +	retval = strtoll(value, &mult, 10);
   134    134   	if (mult != NULL) {
   135    135   		switch (tolower(mult[0])) {
   136    136   			case 'p':
   137    137   				retval *= 1125899906842624LLU;
   138    138   				break;
   139    139   			case 't':
   140    140   				retval *= 1958505086976LLU;

Modified libconfig.h.in from [27038f8b4f] to [6db6e4f548].

     1      1   !ifndef _RSK_LIBCONFIG_H
     2      2   !define _RSK_LIBCONFIG_H
     3      3   
            4  +!ifdef __cplusplus
            5  +extern "C" {
            6  +!endif
     4      7   __BLANK_LINE__
     5      8   
     6      9   typedef enum {
     7     10           LC_CONF_SECTION,
     8     11           LC_CONF_APACHE,
     9     12           LC_CONF_COLON,
    10     13           LC_CONF_EQUAL,
................................................................................
    75     78   !define LC_CBRET_ERROR (-1)
    76     79   
    77     80   __BLANK_LINE__
    78     81   
    79     82   extern int lc_optind;
    80     83   
    81     84   __BLANK_LINE__
           85  +!ifdef __cplusplus
           86  +}
           87  +!endif
    82     88   
    83     89   !endif

Modified makearch.info from [0dbe9404d2] to [da27350307].

    16     16   
    17     17   # Space sperated list of documents, if they exist, they will be
    18     18   # prefixed with the contents of the DOC_HDR file and substitution
    19     19   # will occur:
    20     20   #     @@UTIL@@ becomes the utility name ${UTIL}
    21     21   #     @@VERS@@ becomes the utility version
    22     22   #     @@DATE@@ becomes the current date
    23         -DOCS="README INSTALL Docs/USAGE"
           23  +DOCS="README INSTALL Docs/USAGE TODO"
    24     24   DOC_HDR="HEADER"
    25     25   
    26     26   # This script is executed immediately after copying the files
    27     27   # to a temp directory to attempt to compile
    28     28   BEFORE="build/prep.sh"
    29     29   
    30     30   # This script is executed immediately prior to creation of the
    31     31   # tarball
    32     32   AFTER=""
    33     33   
    34     34   # Files matching these (space-seperated) patterns are deleted
    35     35   TMPS="*.out HEADER build"

Modified strtoll.c from [a2ea6970d9] to [7e64c39e73].

     1      1   #include <sys/types.h>
     2      2   #include <stdlib.h>
     3      3   #include <limits.h>
     4      4   #include <ctype.h>
     5      5   #include <stdio.h>
     6      6   
     7      7   /* We only handle base 10. */
     8         -unsigned long long int strtoull(const char *nptr, char **endptr, int base) {
            8  +long long int strtoull(const char *nptr, char **endptr, int base) {
     9      9   	unsigned long long int retval = 0;
    10     10   	const char **endptrd = (const char **) endptr;
    11     11   	char *idx = NULL;
           12  +	int allowspace = 1;
           13  +
           14  +	idx = nptr;
           15  +	while (1) {
           16  +		if (*idx == '\0') {
           17  +			break;
           18  +		}
    12     19   
    13         -	for (idx = nptr; *idx != '\0' && isdigit(*idx); idx++) {
           20  +		if (!isdigit(*idx)) {
           21  +			if (*idx == '-') {
           22  +				retval *= -1;
           23  +				continue;
           24  +			}
           25  +			if ((*idx == ' ' || *idx == '\t') && allowspace) {
           26  +				continue
           27  +			}
           28  +			break;
           29  +		}
           30  +
    14     31   		retval *= 10;
    15     32   		retval += (*idx - '0');
           33  +
           34  +		allowspace = 0;
           35  +		idx++;
    16     36   	}
    17     37   
    18     38   	if (endptrd != NULL) {
    19     39   		*endptrd = idx;
    20     40   	}
    21     41   
    22     42   	return(retval);
    23     43   }

Modified strtoll.h from [8b39b46ef3] to [6b4cfebaa6].

     1      1   #ifndef _RSK_STRTOULL_H
     2      2   #define _RSK_STRTOULL_H
     3      3   
     4         -unsigned long long int strtoull(const char *nptr, char **endptr, int base);
            4  +long long int strtoull(const char *nptr, char **endptr, int base);
     5      5   
     6      6   #endif