aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--am/grecs.m416
-rw-r--r--configure.ac2
-rw-r--r--include/Makefile.am19
-rw-r--r--include/grecs.h40
-rw-r--r--include/grecs/.gitignore1
-rw-r--r--include/grecs/Makefile.am43
-rw-r--r--include/grecs/doc.h32
-rw-r--r--include/grecs/error.h38
-rw-r--r--include/grecs/format.h62
-rw-r--r--include/grecs/json.h (renamed from src/json.h)0
-rw-r--r--include/grecs/lex.h51
-rw-r--r--include/grecs/list.h55
-rw-r--r--include/grecs/locus.h (renamed from src/grecs-locus.h)23
-rw-r--r--include/grecs/mem.h33
-rw-r--r--include/grecs/node.h62
-rw-r--r--include/grecs/opt.h (renamed from src/grecsopt.h)4
-rw-r--r--include/grecs/parser.h53
-rw-r--r--include/grecs/preproc.h46
-rw-r--r--include/grecs/sockaddr.h66
-rw-r--r--include/grecs/symtab.h52
-rw-r--r--include/grecs/table.h98
-rw-r--r--include/grecs/tree.h71
-rw-r--r--include/grecs/txtacc.h36
-rw-r--r--include/grecs/types.h.in24
-rw-r--r--include/grecs/util.h26
-rw-r--r--include/grecs/value.h52
-rw-r--r--include/grecs/version.h40
-rw-r--r--include/wordsplit.h (renamed from src/wordsplit.h)0
-rw-r--r--src/Make-inst.am1
-rw-r--r--src/Make-shared.am6
-rw-r--r--src/Make-static.am1
-rw-r--r--src/Make.am14
-rw-r--r--src/bind-gram.y1
-rw-r--r--src/bind-lex.l1
-rw-r--r--src/cidr.c1
-rw-r--r--src/dhcpd-gram.y1
-rw-r--r--src/dhcpd-lex.l1
-rw-r--r--src/diag.c1
-rw-r--r--src/format.c2
-rw-r--r--src/grecs-gram.y1
-rw-r--r--src/grecs-lex.l1
-rw-r--r--src/grecs.hin584
-rw-r--r--src/json-gram.y4
-rw-r--r--src/json-lex.l3
-rw-r--r--src/jsonfmt.c3
-rw-r--r--src/lookup.c3
-rw-r--r--src/meta1-gram.y1
-rw-r--r--src/meta1-lex.l1
-rw-r--r--src/opthelp.c2
-rw-r--r--src/preproc.c3
-rw-r--r--src/sockaddr.c1
-rw-r--r--src/txtacc.c3
-rw-r--r--src/version.c1
-rw-r--r--tests/gcfenum.c1
-rw-r--r--tests/gcffmt.c1
-rw-r--r--tests/gcfpeek.c1
-rw-r--r--tests/gcfset.c1
-rw-r--r--tests/gcfver.c1
-rw-r--r--tests/json.c3
60 files changed, 1067 insertions, 629 deletions
diff --git a/Makefile.am b/Makefile.am
index e499bb4..3eaa8df 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,3 +17,3 @@
17ACLOCAL_AMFLAGS = -I am 17ACLOCAL_AMFLAGS = -I am
18SUBDIRS=. src @GRECS_TESTDIR@ @GRECS_DOCDIR@ 18SUBDIRS=. include src @GRECS_TESTDIR@ @GRECS_DOCDIR@
19EXTRA_DIST=build-aux/yyrename @GRECS_BUILD_AUX@ @GRECS_DISTDOC@ gitid.h 19EXTRA_DIST=build-aux/yyrename @GRECS_BUILD_AUX@ @GRECS_DISTDOC@ gitid.h
diff --git a/am/grecs.m4 b/am/grecs.m4
index 74b7840..60244a1 100644
--- a/am/grecs.m4
+++ b/am/grecs.m4
@@ -204,3 +204,3 @@ AC_DEFUN([GRECS_SETUP],[
204 AC_SUBST([GRECS_README]) 204 AC_SUBST([GRECS_README])
205 AC_SUBST([GRECS_INCLUDES],['-I$(top_srcdir)/]grecsdir[src] [-I$(top_builddir)/]grecsdir[src]') 205 AC_SUBST([GRECS_INCLUDES],['-I$(top_srcdir)/]grecsdir[include] [-I$(top_builddir)/]grecsdir[include]')
206 AC_SUBST([GRECS_HOST_PROJECT_INCLUDES]) 206 AC_SUBST([GRECS_HOST_PROJECT_INCLUDES])
@@ -208,5 +208,6 @@ AC_DEFUN([GRECS_SETUP],[
208 AC_SUBST([GRECS_INCLUDE_DIR],['$(pkgincludedir)']) 208 AC_SUBST([GRECS_INCLUDE_DIR],['$(pkgincludedir)'])
209 209
210 _GRECS_OPTION_SWITCH([install],[ 210 _GRECS_OPTION_SWITCH([install],[
211 LT_INIT 211 LT_INIT
212 GRECS_BUILD_TYPE=install
212 GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.la'] 213 GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.la']
@@ -220,2 +221,3 @@ AC_DEFUN([GRECS_SETUP],[
220 LT_INIT 221 LT_INIT
222 GRECS_BUILD_TYPE=shared
221 GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.la'] 223 GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.la']
@@ -226,2 +228,3 @@ AC_DEFUN([GRECS_SETUP],[
226 ],[ 228 ],[
229 GRECS_BUILD_TYPE=static
227 GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.a'] 230 GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.a']
@@ -232,3 +235,10 @@ AC_DEFUN([GRECS_SETUP],[
232 ]) 235 ])
233 AC_CONFIG_FILES(grecsdir[Makefile] grecsdir[src/grecs.h]:grecsdir[src/grecs.hin]) 236 AM_CONDITIONAL([GRECS_COND_BUILD_INSTALL],[test $GRECS_BUILD_TYPE = install])
237 AM_CONDITIONAL([GRECS_COND_BUILD_SHARED],[test $GRECS_BUILD_TYPE = shared])
238 AM_CONDITIONAL([GRECS_COND_BUILD_STATIC],[test $GRECS_BUILD_TYPE = static])
239
240 AC_CONFIG_FILES(grecsdir[Makefile]
241 grecsdir[include/Makefile]
242 grecsdir[include/grecs/Makefile]
243 grecsdir[include/grecs/types.h]:grecsdir[include/grecs/types.h.in])
234 m4_popdef([grecsdir]) 244 m4_popdef([grecsdir])
diff --git a/configure.ac b/configure.ac
index b923c9b..6ffa55b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,3 +18,3 @@ AC_PREREQ(2.63)
18AC_INIT([libgrecs], [1.0], [gray+grecs@gnu.org.ua]) 18AC_INIT([libgrecs], [1.0], [gray+grecs@gnu.org.ua])
19AC_CONFIG_SRCDIR([src/grecs.hin]) 19AC_CONFIG_SRCDIR([src/grecs-gram.y])
20AC_CONFIG_AUX_DIR([build-aux]) 20AC_CONFIG_AUX_DIR([build-aux])
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644
index 0000000..21a51e7
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1,19 @@
1SUBDIRS = grecs
2GRECS_HDR = grecs.h wordsplit.h
3
4if GRECS_COND_BUILD_INSTALL
5 include_HEADERS = $(GRECS_HDR)
6endif
7
8if GRECS_COND_BUILD_SHARED
9 if GRECS_COND_INSTALLHEADERS
10 grecsincludedir = @GRECS_INCLUDE_DIR@
11 grecsinclude_HEADERS = $(GRECS_HDR)
12 else
13 noinst_HEADERS = $(GRECS_HDR)
14 endif
15endif
16
17if GRECS_COND_BUILD_STATIC
18 noinst_HEADERS = $(GRECS_HDR)
19endif
diff --git a/include/grecs.h b/include/grecs.h
new file mode 100644
index 0000000..eac11d4
--- /dev/null
+++ b/include/grecs.h
@@ -0,0 +1,40 @@
1/* grecs - Gray's Extensible Configuration System -*- c -*-
2 Copyright (C) 2007-2016 Sergey Poznyakoff
3
4 Grecs is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the
6 Free Software Foundation; either version 3 of the License, or (at your
7 option) any later version.
8
9 Grecs is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License along
15 with Grecs. If not, see <http://www.gnu.org/licenses/>. */
16
17#ifndef _GRECS_H
18#define _GRECS_H
19
20#include <grecs/types.h>
21#include <grecs/version.h>
22#include <grecs/doc.h>
23#include <grecs/error.h>
24#include <grecs/format.h>
25#include <grecs/lex.h>
26#include <grecs/list.h>
27#include <grecs/locus.h>
28#include <grecs/mem.h>
29#include <grecs/node.h>
30#include <grecs/parser.h>
31#include <grecs/preproc.h>
32#include <grecs/sockaddr.h>
33#include <grecs/symtab.h>
34#include <grecs/table.h>
35#include <grecs/tree.h>
36#include <grecs/txtacc.h>
37#include <grecs/util.h>
38#include <grecs/value.h>
39
40#endif
diff --git a/include/grecs/.gitignore b/include/grecs/.gitignore
new file mode 100644
index 0000000..8cb8a05
--- /dev/null
+++ b/include/grecs/.gitignore
@@ -0,0 +1 @@
types.h
diff --git a/include/grecs/Makefile.am b/include/grecs/Makefile.am
new file mode 100644
index 0000000..c239c1b
--- /dev/null
+++ b/include/grecs/Makefile.am
@@ -0,0 +1,43 @@
1GRECS_PKG_HDR =\
2 doc.h\
3 error.h\
4 format.h\
5 lex.h\
6 list.h\
7 locus.h\
8 mem.h\
9 node.h\
10 opt.h\
11 parser.h\
12 preproc.h\
13 sockaddr.h\
14 symtab.h\
15 table.h\
16 tree.h\
17 txtacc.h\
18 types.h\
19 util.h\
20 value.h\
21 version.h
22
23if GRECS_COND_JSON
24 GRECS_PKG_HDR += json.h
25endif
26
27if GRECS_COND_BUILD_INSTALL
28 grecsincludedir = @GRECS_INCLUDE_DIR@
29 grecsinclude_HEADERS = $(GRECS_PKG_HDR)