Overview
| Comment: | Changed to `strtoull' to `strtoll' and updated code. Changed URL in header Added TODO libconfig 0.1.1 |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk | 0.1.1 |
| Files: | files | file ages | folders |
| SHA1: |
59af3f328ba05b997ae89a7876d1d1ca |
| User & Date: | rkeene on 2004-10-31 20:46:08.000 |
| 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: 0.1.1, trunk | |
|
2004-10-29
| ||
| 16:40 | Updated man pages. check-in: 2dfd527012 user: rkeene tags: trunk | |
Changes
Modified HEADER
from [958c9c7bd9]
to [6fae83179a].
1 2 3 4 |
@@UTIL@@ @@VERS@@
Release information:
pkg: @@UTIL@@ version @@VERS@@
| > | | 1 2 3 4 5 6 7 8 9 10 |
@@UTIL@@ @@VERS@@
Release information:
pkg: @@UTIL@@ version @@VERS@@
url: http://www.rkeene.org/files/oss/@@UTIL@@/devel/@@UTIL@@-@@VERS@@.tar.gz
web: http://www.rkeene.org/oss/@@UTIL@@/
date: @@DATE@@
mail: @@UTIL@@@rkeene.org
--------------------------------------------------------------------------
|
Added TODO version [3922149abc].
Modified compat.h
from [18e2a49265]
to [309b8b282c].
| ︙ | ︙ | |||
8 9 10 11 12 13 14 | #include "win32.h" #endif #ifndef LC_LINEBUF_LEN #define LC_LINEBUF_LEN 1024 #endif | | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #include "win32.h" #endif #ifndef LC_LINEBUF_LEN #define LC_LINEBUF_LEN 1024 #endif #ifndef HAVE_STRTOLL #include "strtoll.h" #endif #ifndef HAVE_STRSEP #include "strsep.h" #endif #ifdef HAVE_INTTYPES_H #include <inttypes.h> #endif |
| ︙ | ︙ |
Modified config.h.in
from [0a6cb3c796]
to [3d89d8d8f7].
| ︙ | ︙ | |||
32 33 34 35 36 37 38 | /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strsep' function. */ #undef HAVE_STRSEP | | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strsep' function. */ #undef HAVE_STRSEP /* Define to 1 if you have the `strtoll' function. */ #undef HAVE_STRTOLL /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the <sys/time.h> header file. */ #undef HAVE_SYS_TIME_H |
| ︙ | ︙ |
Modified configure
from [80531d32c6]
to [9b522e9e7d].
1 2 3 | #! /bin/sh # From configure.in Revision . # Guess values for system-dependent variables and create Makefiles. | | | 1 2 3 4 5 6 7 8 9 10 11 | #! /bin/sh # From configure.in Revision . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for libconfig 0.1.1. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## |
| ︙ | ︙ | |||
264 265 266 267 268 269 270 |
# This variable seems obsolete. It should probably be removed, and
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}
# Identity of this package.
PACKAGE_NAME='libconfig'
PACKAGE_TARNAME='libconfig'
| | | | 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
# This variable seems obsolete. It should probably be removed, and
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}
# Identity of this package.
PACKAGE_NAME='libconfig'
PACKAGE_TARNAME='libconfig'
PACKAGE_VERSION='0.1.1'
PACKAGE_STRING='libconfig 0.1.1'
PACKAGE_BUGREPORT=''
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
|
| ︙ | ︙ | |||
774 775 776 777 778 779 780 | # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF | | | 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 | # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures libconfig 0.1.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. |
| ︙ | ︙ | |||
835 836 837 838 839 840 841 | --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in | | | 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 |
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of libconfig 0.1.1:";;
esac
cat <<\_ACEOF
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
|
| ︙ | ︙ | |||
946 947 948 949 950 951 952 |
cd $ac_popdir
done
fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
| | | | 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 |
cd $ac_popdir
done
fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
libconfig configure 0.1.1
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
exit 0
fi
exec 5>config.log
cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libconfig $as_me 0.1.1, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
_ACEOF
{
cat <<_ASUNAME
|
| ︙ | ︙ | |||
15429 15430 15431 15432 15433 15434 15435 | break fi done | | | 15429 15430 15431 15432 15433 15434 15435 15436 15437 15438 15439 15440 15441 15442 15443 |
break
fi
done
for ac_func in strsep strtoll
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
|
| ︙ | ︙ | |||
16682 16683 16684 16685 16686 16687 16688 | echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF | | | 16682 16683 16684 16685 16686 16687 16688 16689 16690 16691 16692 16693 16694 16695 16696 | echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by libconfig $as_me 0.1.1, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ |
| ︙ | ︙ | |||
16742 16743 16744 16745 16746 16747 16748 | $config_headers Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ | | | 16742 16743 16744 16745 16746 16747 16748 16749 16750 16751 16752 16753 16754 16755 16756 | $config_headers Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ libconfig config.status 0.1.1 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir |
| ︙ | ︙ |
Modified configure.in
from [10d7c6dbc1]
to [eed6770815].
1 | AC_REVISION($Revision $) | | | 1 2 3 4 5 6 7 8 9 | AC_REVISION($Revision $) AC_INIT(libconfig, 0.1.1) AC_CONFIG_HEADER(config.h) dnl Find out about the host OS DC_CHK_OS_INFO dnl Checks for programs. AC_PROG_CC |
| ︙ | ︙ | |||
20 21 22 23 24 25 26 | DC_DO_TYPE(uint64_t, unsigned, 8) DC_DO_TYPE(int64_t, signed, 8) DC_DO_TYPE(uint32_t, unsigned, 4) DC_DO_TYPE(int32_t, signed, 4) DC_DO_TYPE(uint16_t, unsigned, 2) DC_DO_TYPE(int16_t, signed, 2) | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | DC_DO_TYPE(uint64_t, unsigned, 8) DC_DO_TYPE(int64_t, signed, 8) DC_DO_TYPE(uint32_t, unsigned, 4) DC_DO_TYPE(int32_t, signed, 4) DC_DO_TYPE(uint16_t, unsigned, 2) DC_DO_TYPE(int16_t, signed, 2) AC_REPLACE_FUNCS(strsep strtoll) AC_CHECK_FUNCS(getpwuid) dnl Checks for Win32 specific things. DC_DO_WIN32 dnl This must be last. DC_GET_SHOBJFLAGS 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 52 53 54 55 56 57 |
return(0);
}
static int lc_process_var_longlong(void *data, const char *value) {
long long *dataval;
dataval = data;
| | | | | | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
return(0);
}
static int lc_process_var_longlong(void *data, const char *value) {
long long *dataval;
dataval = data;
*dataval = strtoll(value, NULL, 10);
return(0);
}
static int lc_process_var_long(void *data, const char *value) {
long *dataval;
dataval = data;
*dataval = strtoll(value, NULL, 10);
return(0);
}
static int lc_process_var_int(void *data, const char *value) {
int *dataval;
dataval = data;
*dataval = strtoll(value, NULL, 10);
return(0);
}
static int lc_process_var_short(void *data, const char *value) {
short *dataval;
dataval = data;
*dataval = strtoll(value, NULL, 10);
return(0);
}
static int lc_process_var_bool_byexistance(void *data, const char *value) {
int *dataval;
|
| ︙ | ︙ | |||
126 127 128 129 130 131 132 |
return(-1);
}
static long long lc_process_size(const char *value) {
long long retval = -1;
char *mult = NULL;
| | | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
return(-1);
}
static long long lc_process_size(const char *value) {
long long retval = -1;
char *mult = NULL;
retval = strtoll(value, &mult, 10);
if (mult != NULL) {
switch (tolower(mult[0])) {
case 'p':
retval *= 1125899906842624LLU;
break;
case 't':
retval *= 1958505086976LLU;
|
| ︙ | ︙ |
Modified libconfig.h.in
from [27038f8b4f]
to [6db6e4f548].
1 2 3 4 5 6 7 8 9 10 |
!ifndef _RSK_LIBCONFIG_H
!define _RSK_LIBCONFIG_H
__BLANK_LINE__
typedef enum {
LC_CONF_SECTION,
LC_CONF_APACHE,
LC_CONF_COLON,
LC_CONF_EQUAL,
| > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 |
!ifndef _RSK_LIBCONFIG_H
!define _RSK_LIBCONFIG_H
!ifdef __cplusplus
extern "C" {
!endif
__BLANK_LINE__
typedef enum {
LC_CONF_SECTION,
LC_CONF_APACHE,
LC_CONF_COLON,
LC_CONF_EQUAL,
|
| ︙ | ︙ | |||
75 76 77 78 79 80 81 | !define LC_CBRET_ERROR (-1) __BLANK_LINE__ extern int lc_optind; __BLANK_LINE__ | > | > > | 78 79 80 81 82 83 84 85 86 87 88 89 | !define LC_CBRET_ERROR (-1) __BLANK_LINE__ extern int lc_optind; __BLANK_LINE__ !ifdef __cplusplus } !endif !endif |
Modified makearch.info
from [0dbe9404d2]
to [da27350307].
| ︙ | ︙ | |||
16 17 18 19 20 21 22 |
# Space sperated list of documents, if they exist, they will be
# prefixed with the contents of the DOC_HDR file and substitution
# will occur:
# @@UTIL@@ becomes the utility name ${UTIL}
# @@VERS@@ becomes the utility version
# @@DATE@@ becomes the current date
| | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# Space sperated list of documents, if they exist, they will be
# prefixed with the contents of the DOC_HDR file and substitution
# will occur:
# @@UTIL@@ becomes the utility name ${UTIL}
# @@VERS@@ becomes the utility version
# @@DATE@@ becomes the current date
DOCS="README INSTALL Docs/USAGE TODO"
DOC_HDR="HEADER"
# This script is executed immediately after copying the files
# to a temp directory to attempt to compile
BEFORE="build/prep.sh"
# This script is executed immediately prior to creation of the
|
| ︙ | ︙ |
Renamed and modified
strtoull.c
[a2ea6970d9]
to strtoll.c
[7e64c39e73].
1 2 3 4 5 6 7 | #include <sys/types.h> #include <stdlib.h> #include <limits.h> #include <ctype.h> #include <stdio.h> /* We only handle base 10. */ | | > | > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
#include <sys/types.h>
#include <stdlib.h>
#include <limits.h>
#include <ctype.h>
#include <stdio.h>
/* We only handle base 10. */
long long int strtoull(const char *nptr, char **endptr, int base) {
unsigned long long int retval = 0;
const char **endptrd = (const char **) endptr;
char *idx = NULL;
int allowspace = 1;
idx = nptr;
while (1) {
if (*idx == '\0') {
break;
}
if (!isdigit(*idx)) {
if (*idx == '-') {
retval *= -1;
continue;
}
if ((*idx == ' ' || *idx == '\t') && allowspace) {
continue
}
break;
}
retval *= 10;
retval += (*idx - '0');
allowspace = 0;
idx++;
}
if (endptrd != NULL) {
*endptrd = idx;
}
return(retval);
|
| ︙ | ︙ |
Renamed and modified
strtoull.h
[8b39b46ef3]
to strtoll.h
[6b4cfebaa6].
1 2 3 | #ifndef _RSK_STRTOULL_H #define _RSK_STRTOULL_H | | | 1 2 3 4 5 6 | #ifndef _RSK_STRTOULL_H #define _RSK_STRTOULL_H long long int strtoull(const char *nptr, char **endptr, int base); #endif |