aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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-locus.h57
-rw-r--r--src/grecs.hin584
-rw-r--r--src/grecsopt.h58
-rw-r--r--src/json-gram.y4
-rw-r--r--src/json-lex.l3
-rw-r--r--src/json.h99
-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--src/wordsplit.h250
29 files changed, 20 insertions, 1085 deletions
diff --git a/src/Make-inst.am b/src/Make-inst.am
index 9dac1ad..a4b6aea 100644
--- a/src/Make-inst.am
+++ b/src/Make-inst.am
@@ -18,5 +18,4 @@ include Make.am
18lib_LTLIBRARIES=libgrecs.la 18lib_LTLIBRARIES=libgrecs.la
19libgrecs_la_SOURCES = $(GRECS_SRC) 19libgrecs_la_SOURCES = $(GRECS_SRC)
20include_HEADERS = $(GRECS_HDR)
21m4datadir = $(datadir)/aclocal 20m4datadir = $(datadir)/aclocal
22dist_m4data_DATA = libgrecs.m4 21dist_m4data_DATA = libgrecs.m4
diff --git a/src/Make-shared.am b/src/Make-shared.am
index 8ec4a76..9a762a4 100644
--- a/src/Make-shared.am
+++ b/src/Make-shared.am
@@ -18,8 +18,2 @@ noinst_LTLIBRARIES=libgrecs.la
18libgrecs_la_SOURCES = $(GRECS_SRC) 18libgrecs_la_SOURCES = $(GRECS_SRC)
19 19
20if GRECS_COND_INSTALLHEADERS
21 grecsincludedir = @GRECS_INCLUDE_DIR@
22 grecsinclude_HEADERS = $(GRECS_HDR)
23else
24 noinst_HEADERS += $(GRECS_HDR)
25endif
diff --git a/src/Make-static.am b/src/Make-static.am
index 7532562..2688b40 100644
--- a/src/Make-static.am
+++ b/src/Make-static.am
@@ -17,5 +17,4 @@ include Make.am
17noinst_LIBRARIES=libgrecs.a 17noinst_LIBRARIES=libgrecs.a
18libgrecs_a_SOURCES = $(GRECS_SRC) 18libgrecs_a_SOURCES = $(GRECS_SRC)
19noinst_HEADERS += $(GRECS_HDR)
20 19
21 20
diff --git a/src/Make.am b/src/Make.am
index cfae734..227973e 100644
--- a/src/Make.am
+++ b/src/Make.am
@@ -76,18 +76,10 @@ GRECS_SRC = \
76 $(GRECS_PARSER_META1) 76 $(GRECS_PARSER_META1)
77 77
78GRECS_HDR = grecs.h grecsopt.h wordsplit.h
79if GRECS_COND_JSON
80 GRECS_HDR += json.h
81endif
82
83if GRECS_COND_SOCKADDR_LIST 78if GRECS_COND_SOCKADDR_LIST
84 GRECS_SRC += sockaddr.c 79 GRECS_SRC += sockaddr.c
85endif 80endif
86 81
87noinst_HEADERS = grecs-locus.h
88
89EXTRA_DIST=\ 82EXTRA_DIST=\
90 grecs-gram.h\ 83 grecs-gram.h\
91 grecs.hin\
92 $(GRECS_EXTRA_BIND)\ 84 $(GRECS_EXTRA_BIND)\
93 $(GRECS_EXTRA_DHCPD)\ 85 $(GRECS_EXTRA_DHCPD)\
@@ -97,6 +89,4 @@ EXTRA_DIST=\
97 Make.am Make-inst.am Make-shared.am Make-static.am 89 Make.am Make-inst.am Make-shared.am Make-static.am
98 90
99BUILT_SOURCES=grecs.h
100
101AM_CPPFLAGS = \ 91AM_CPPFLAGS = \
102 -I$(srcdir)\ 92 -I$(srcdir)\
@@ -113,2 +103,6 @@ inc_DATA = $(PP_SETUP_FILE)
113LEXCOMPILE = $(top_srcdir)/@GRECS_SUBDIR@/build-aux/yyrename '$(LEX) $(LFLAGS) $(AM_LFLAGS)' 103LEXCOMPILE = $(top_srcdir)/@GRECS_SUBDIR@/build-aux/yyrename '$(LEX) $(LFLAGS) $(AM_LFLAGS)'
114YACCCOMPILE = $(top_srcdir)/@GRECS_SUBDIR@/build-aux/yyrename '$(YACC) $(YFLAGS) $(AM_YFLAGS)' 104YACCCOMPILE = $(top_srcdir)/@GRECS_SUBDIR@/build-aux/yyrename '$(YACC) $(YFLAGS) $(AM_YFLAGS)'
105
106
107
108
diff --git a/src/bind-gram.y b/src/bind-gram.y
index 4c8d394..18deb0d 100644
--- a/src/bind-gram.y
+++ b/src/bind-gram.y
@@ -20,5 +20,4 @@
20#endif 20#endif
21#include <grecs.h> 21#include <grecs.h>
22#include <grecs-locus.h>
23#include <bind-gram.h> 22#include <bind-gram.h>
24#include <stdlib.h> 23#include <stdlib.h>
diff --git a/src/bind-lex.l b/src/bind-lex.l
index 096d1f2..e0659e7 100644
--- a/src/bind-lex.l
+++ b/src/bind-lex.l
@@ -25,5 +25,4 @@
25 25
26#include <grecs.h> 26#include <grecs.h>
27#include <grecs-locus.h>
28#include <bind-gram.h> 27#include <bind-gram.h>
29#include <unistd.h> 28#include <unistd.h>
diff --git a/src/cidr.c b/src/cidr.c
index bffa35e..7566fa6 100644
--- a/src/cidr.c
+++ b/src/cidr.c
@@ -23,4 +23,5 @@
23#include <netinet/in.h> 23#include <netinet/in.h>
24#include <arpa/inet.h> 24#include <arpa/inet.h>
25#include <stdlib.h>
25#include "grecs.h" 26#include "grecs.h"
26 27
diff --git a/src/dhcpd-gram.y b/src/dhcpd-gram.y
index 86bfde9..11dd1b2 100644
--- a/src/dhcpd-gram.y
+++ b/src/dhcpd-gram.y
@@ -20,5 +20,4 @@
20#endif 20#endif
21#include <grecs.h> 21#include <grecs.h>
22#include <grecs-locus.h>
23#include <dhcpd-gram.h> 22#include <dhcpd-gram.h>
24#include <stdlib.h> 23#include <stdlib.h>
diff --git a/src/dhcpd-lex.l b/src/dhcpd-lex.l
index 490fd72..79c7274 100644
--- a/src/dhcpd-lex.l
+++ b/src/dhcpd-lex.l
@@ -24,5 +24,4 @@
24 24
25#include <grecs.h> 25#include <grecs.h>
26#include <grecs-locus.h>
27#include <dhcpd-gram.h> 26#include <dhcpd-gram.h>
28#include <unistd.h> 27#include <unistd.h>
diff --git a/src/diag.c b/src/diag.c
index 1424437..bdbb407 100644
--- a/src/diag.c
+++ b/src/diag.c
@@ -19,5 +19,4 @@
19#endif 19#endif
20#include <grecs.h> 20#include <grecs.h>
21#include <grecs-locus.h>
22#include <stdlib.h> 21#include <stdlib.h>
23#include <stdio.h> 22#include <stdio.h>
diff --git a/src/format.c b/src/format.c
index 89202a0..af87329 100644
--- a/src/format.c
+++ b/src/format.c
@@ -19,4 +19,5 @@
19#endif 19#endif
20#include <grecs.h> 20#include <grecs.h>
21#include <wordsplit.h>
21#include <stdio.h> 22#include <stdio.h>
22#include <stdlib.h> 23#include <stdlib.h>
@@ -24,5 +25,4 @@
24#include <string.h> 25#include <string.h>
25#include <errno.h> 26#include <errno.h>
26#include "wordsplit.h"
27 27
28const char * 28const char *
diff --git a/src/grecs-gram.y b/src/grecs-gram.y
index 4545c85..05ed2f5 100644
--- a/src/grecs-gram.y
+++ b/src/grecs-gram.y
@@ -20,5 +20,4 @@
20#endif 20#endif
21#include <grecs.h> 21#include <grecs.h>
22#include <grecs-locus.h>
23#include <grecs-gram.h> 22#include <grecs-gram.h>
24#include <stdlib.h> 23#include <stdlib.h>
diff --git a/src/grecs-lex.l b/src/grecs-lex.l
index 5223765..113ee88 100644
--- a/src/grecs-lex.l
+++ b/src/grecs-lex.l
@@ -25,5 +25,4 @@
25 25
26#include <grecs.h> 26#include <grecs.h>
27#include <grecs-locus.h>
28#include <grecs-gram.h> 27#include <grecs-gram.h>
29#include <unistd.h> 28#include <unistd.h>
diff --git a/src/grecs-locus.h b/src/grecs-locus.h
deleted file mode 100644
index b5573fd..0000000
--- a/src/grecs-locus.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/* grecs - Gray's Extensible Configuration System
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#define YYLTYPE grecs_locus_t
18
19#define YYLLOC_DEFAULT(Current, Rhs, N) \
20 do { \
21 if (N) { \
22 (Current).beg = YYRHSLOC(Rhs, 1).beg; \
23 (Current).end = YYRHSLOC(Rhs, N).end; \
24 } else { \
25 (Current).beg = YYRHSLOC(Rhs, 0).end; \
26 (Current).end = (Current).beg; \
27 } \
28 } while (0)
29
30#define YY_LOCATION_PRINT(File, Loc) do { \
31 if ((Loc).beg.col == 0) \
32 fprintf(File, "%s:%u", \
33 (Loc).beg.file, \
34 (Loc).beg.line); \
35 else if (strcmp((Loc).beg.file, (Loc).end.file)) \
36 fprintf(File, "%s:%u.%u-%s:%u.%u", \
37 (Loc).beg.file, \
38 (Loc).beg.line, (Loc).beg.col, \
39 (Loc).end.file, \
40 (Loc).end.line, (Loc).end.col); \
41 else if