Check-in [269106f456]
Overview
Comment:Updated to not randomly have libconfig.h passed through the C preprocessor
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 269106f456b0822932219541d61223e045087e06
User & Date: rkeene on 2014-11-24 18:11:57
Other Links: manifest | tags
Context
2014-11-24
18:21
Updated to use individual m4 files from upstream repo, and many other cleanups check-in: 5e72879d0d user: rkeene tags: trunk
18:11
Updated to not randomly have libconfig.h passed through the C preprocessor check-in: 269106f456 user: rkeene tags: trunk
18:02
Updated list of authors check-in: 683cf7201d user: rkeene tags: trunk
Changes

Modified .fossil-settings/ignore-glob from [e97ace63c4] to [168a13de83].

    36     36   libconfig.a/*
    37     37   libconfig.dll
    38     38   libconfig.dll.a
    39     39   libconfig.dll.a/*
    40     40   libconfig.dll.def
    41     41   libconfig.dll.def/*
    42     42   libconfig.dll/*
    43         -libconfig.h
    44         -libconfig.h/*
    45     43   libconfig.so
    46     44   libconfig.so/*
    47     45   test-lc
    48     46   test-lc.exe
    49     47   test-lc.exe/*
    50     48   test-lc/*
    51     49   test.cfg
    52     50   test.cfg/*

Modified Makefile.in from [65d0a00b06] to [8809f1c079].

    48     48   
    49     49   %_shr.o: $(srcdir)/%.c
    50     50   	$(CC) $(CPPFLAGS) $(CFLAGS) $(SHOBJFLAGS) -c -o $@ "$(filter %.c, $^)"
    51     51   
    52     52   %.o: $(srcdir)/%.c
    53     53   	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ "$(filter %.c, $^)"
    54     54   
    55         -libconfig.h: $(srcdir)/libconfig.h.in
    56         -	cat "$^" | $(CPP) $(CPPFLAGS) - | grep -v '^#' | grep -v '^ *$$' | sed 's/^!/#  /g;s/__BLANK_LINE__//' > $@
    57         -
    58     55   test-lc$(EXEEXT): $(LIBS) $(srcdir)/test-lc.c
    59     56   	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(filter %.c, $^) $(LDFLAGS) -Wl,-R -Wl,. -L. -lconfig
    60     57   
    61         -.PHONY: clean distclean install
    62     58   clean:
    63         -	rm -f *.o $(BINS) $(LIBS) libconfig.h *~ test-lc$(EXEEXT) *.dll.a *.dll.def *.dll
           59  +	rm -f *.o $(BINS) $(LIBS) *~ test-lc$(EXEEXT) *.dll.a *.dll.def *.dll
    64     60   
    65     61   distclean: clean
    66     62   	rm -f Makefile config.h config.status config.log lc_geterrno.3 lc_process.3 lc_cleanup.3 lc_process_file.3 lc_register_var.3 lc_geterrstr.3 lc_register_callback.3 libconfig.3
    67     63   
    68     64   install: all libconfig.h
    69     65   	-$(INSTALL) -d "$(mandir)"
    70     66   	-$(INSTALL) -d "$(mandir)/man3"
................................................................................
    83     79   	$(INSTALL) -m 644 lc_geterrno.3 "$(mandir)/man3/lc_geterrno.3"
    84     80   	$(INSTALL) -m 644 lc_process.3 "$(mandir)/man3/lc_process.3"
    85     81   	$(INSTALL) -m 644 lc_cleanup.3 "$(mandir)/man3/lc_cleanup.3"
    86     82   	$(INSTALL) -m 644 libconfig.3 "$(mandir)/man3/libconfig.3"
    87     83   	$(INSTALL) -m 644 libconfig.h "$(includedir)/libconfig.h"
    88     84   	-( cd "$(libdir)" && rm -f libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT).$(PKGVERSMAJOR) )
    89     85   	-( cd "$(libdir)" && rm -f libconfig.$(SHOBJEXT) && $(LN_S) libconfig.$(SHOBJEXT).$(PKGVERS) libconfig.$(SHOBJEXT) )
           86  +
           87  +.PHONY: all clean distclean install

Deleted build/h-to-hin version [34a6b6eb8a].

     1         -#! /bin/sh
     2         -
     3         -if [ libconfig.h -nt libconfig.h.in ]; then
     4         -	echo 'Updating libconfig.h.in ...'
     5         -	sed 's@^#  @!@;s@^ *$@:__BLANK_LINE__:@' libconfig.h | tr ':' "\n" > libconfig.h.in
     6         -else
     7         -	echo 'Updating libconfig.h ...'
     8         -	make libconfig.h
     9         -fi

Added libconfig.h version [7c61a9805e].

            1  +#ifndef _RSK_LIBCONFIG_H
            2  +#  define _RSK_LIBCONFIG_H
            3  +#  ifdef __cplusplus
            4  +extern "C" {
            5  +#  endif
            6  +
            7  +typedef enum {
            8  +        LC_CONF_SECTION,
            9  +        LC_CONF_APACHE,
           10  +        LC_CONF_COLON,
           11  +        LC_CONF_EQUAL,
           12  +        LC_CONF_SPACE,
           13  +        LC_CONF_XML
           14  +} lc_conf_type_t;
           15  +
           16  +typedef enum {
           17  +        LC_VAR_UNKNOWN,
           18  +        LC_VAR_NONE,
           19  +        LC_VAR_STRING,
           20  +        LC_VAR_LONG_LONG,
           21  +        LC_VAR_LONG,
           22  +        LC_VAR_INT,
           23  +        LC_VAR_SHORT,
           24  +        LC_VAR_BOOL,
           25  +        LC_VAR_FILENAME,
           26  +        LC_VAR_DIRECTORY,
           27  +        LC_VAR_SIZE_LONG_LONG,
           28  +        LC_VAR_SIZE_LONG,
           29  +        LC_VAR_SIZE_INT,
           30  +        LC_VAR_SIZE_SHORT,
           31  +        LC_VAR_TIME,
           32  +        LC_VAR_DATE,
           33  +        LC_VAR_SECTION,
           34  +        LC_VAR_SECTIONSTART,
           35  +        LC_VAR_SECTIONEND,
           36  +        LC_VAR_BOOL_BY_EXISTANCE,
           37  +        LC_VAR_SIZE_SIZE_T,
           38  +        LC_VAR_CIDR,
           39  +        LC_VAR_IP,
           40  +        LC_VAR_IP4,
           41  +        LC_VAR_IP6,
           42  +        LC_VAR_ADDR,
           43  +        LC_VAR_ADDR4,
           44  +        LC_VAR_ADDR6,
           45  +        LC_VAR_HOSTNAME,
           46  +        LC_VAR_HOSTNAME4,
           47  +        LC_VAR_HOSTNAME6,
           48  +        LC_VAR_DOUBLE,
           49  +        LC_VAR_FLOAT,
           50  +        LC_VAR_LIST = 0x80
           51  +} lc_var_type_t;
           52  +
           53  +typedef enum {
           54  +        LC_FLAGS_VAR,
           55  +        LC_FLAGS_CMDLINE,
           56  +        LC_FLAGS_ENVIRON,
           57  +        LC_FLAGS_SECTIONSTART,
           58  +        LC_FLAGS_SECTIONEND
           59  +} lc_flags_t;
           60  +
           61  +typedef enum {
           62  +        LC_ERR_NONE,
           63  +        LC_ERR_INVCMD,
           64  +        LC_ERR_INVSECTION,
           65  +        LC_ERR_INVDATA,
           66  +        LC_ERR_BADFORMAT,
           67  +        LC_ERR_CANTOPEN,
           68  +        LC_ERR_CALLBACK,
           69  +        LC_ERR_ENOMEM
           70  +} lc_err_t;
           71  +
           72  +int lc_process(int argc, char **argv, const char *appname, lc_conf_type_t type, const char *extra);
           73  +int lc_register_callback(const char *var, char opt, lc_var_type_t type, int (*callback)(const char *, const char *, const char *, const char *, lc_flags_t, void *), void *extra);
           74  +int lc_register_var(const char *var, lc_var_type_t type, void *data, char opt);
           75  +lc_err_t lc_geterrno(void);
           76  +void lc_seterrstr(const char *usererrstr);
           77  +char *lc_geterrstr(void);
           78  +int lc_process_file(const char *appname, const char *pathname, lc_conf_type_t type);
           79  +int lc_handle_type(lc_var_type_t type, const char *value, void *data);
           80  +void lc_cleanup(void);
           81  +
           82  +#  define LC_CBRET_IGNORESECTION (255)
           83  +#  define LC_CBRET_OKAY (0)
           84  +#  define LC_CBRET_ERROR (-1)
           85  +
           86  +extern int lc_optind;
           87  +
           88  +#  ifdef __cplusplus
           89  +}
           90  +#  endif
           91  +#endif

Deleted libconfig.h.in version [7b32045b6a].

     1         -!ifndef _RSK_LIBCONFIG_H
     2         -!define _RSK_LIBCONFIG_H
     3         -!ifdef __cplusplus
     4         -extern "C" {
     5         -!endif
     6         -
     7         -__BLANK_LINE__
     8         -
     9         -typedef enum {
    10         -        LC_CONF_SECTION,
    11         -        LC_CONF_APACHE,
    12         -        LC_CONF_COLON,
    13         -        LC_CONF_EQUAL,
    14         -        LC_CONF_SPACE,
    15         -        LC_CONF_XML
    16         -} lc_conf_type_t;
    17         -
    18         -__BLANK_LINE__
    19         -
    20         -typedef enum {
    21         -        LC_VAR_UNKNOWN,
    22         -        LC_VAR_NONE,
    23         -        LC_VAR_STRING,
    24         -        LC_VAR_LONG_LONG,
    25         -        LC_VAR_LONG,
    26         -        LC_VAR_INT,
    27         -        LC_VAR_SHORT,
    28         -        LC_VAR_BOOL,
    29         -        LC_VAR_FILENAME,
    30         -        LC_VAR_DIRECTORY,
    31         -        LC_VAR_SIZE_LONG_LONG,
    32         -        LC_VAR_SIZE_LONG,
    33         -        LC_VAR_SIZE_INT,
    34         -        LC_VAR_SIZE_SHORT,
    35         -        LC_VAR_TIME,
    36         -        LC_VAR_DATE,
    37         -        LC_VAR_SECTION,
    38         -        LC_VAR_SECTIONSTART,
    39         -        LC_VAR_SECTIONEND,
    40         -        LC_VAR_BOOL_BY_EXISTANCE,
    41         -        LC_VAR_SIZE_SIZE_T,
    42         -        LC_VAR_CIDR,
    43         -        LC_VAR_IP,
    44         -        LC_VAR_IP4,
    45         -        LC_VAR_IP6,
    46         -        LC_VAR_ADDR,
    47         -        LC_VAR_ADDR4,
    48         -        LC_VAR_ADDR6,
    49         -        LC_VAR_HOSTNAME,
    50         -        LC_VAR_HOSTNAME4,
    51         -        LC_VAR_HOSTNAME6,
    52         -        LC_VAR_DOUBLE,
    53         -        LC_VAR_FLOAT,
    54         -        LC_VAR_LIST = 0x80
    55         -} lc_var_type_t;
    56         -
    57         -__BLANK_LINE__
    58         -
    59         -typedef enum {
    60         -        LC_FLAGS_VAR,
    61         -        LC_FLAGS_CMDLINE,
    62         -        LC_FLAGS_ENVIRON,
    63         -        LC_FLAGS_SECTIONSTART,
    64         -        LC_FLAGS_SECTIONEND
    65         -} lc_flags_t;
    66         -
    67         -__BLANK_LINE__
    68         -
    69         -typedef enum {
    70         -        LC_ERR_NONE,
    71         -        LC_ERR_INVCMD,
    72         -        LC_ERR_INVSECTION,
    73         -        LC_ERR_INVDATA,
    74         -        LC_ERR_BADFORMAT,
    75         -        LC_ERR_CANTOPEN,
    76         -        LC_ERR_CALLBACK,
    77         -        LC_ERR_ENOMEM
    78         -} lc_err_t;
    79         -
    80         -__BLANK_LINE__
    81         -
    82         -int lc_process(int argc, char **argv, const char *appname, lc_conf_type_t type, const char *extra);
    83         -int lc_register_callback(const char *var, char opt, lc_var_type_t type, int (*callback)(const char *, const char *, const char *, const char *, lc_flags_t, void *), void *extra);
    84         -int lc_register_var(const char *var, lc_var_type_t type, void *data, char opt);
    85         -lc_err_t lc_geterrno(void);
    86         -void lc_seterrstr(const char *usererrstr);
    87         -char *lc_geterrstr(void);
    88         -int lc_process_file(const char *appname, const char *pathname, lc_conf_type_t type);
    89         -int lc_handle_type(lc_var_type_t type, const char *value, void *data);
    90         -void lc_cleanup(void);
    91         -
    92         -__BLANK_LINE__
    93         -
    94         -!define LC_CBRET_IGNORESECTION (255)
    95         -!define LC_CBRET_OKAY (0)
    96         -!define LC_CBRET_ERROR (-1)
    97         -
    98         -__BLANK_LINE__
    99         -
   100         -extern int lc_optind;
   101         -
   102         -__BLANK_LINE__
   103         -
   104         -!ifdef __cplusplus
   105         -}
   106         -!endif
   107         -!endif