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.c1
-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, 19 insertions, 1084 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
@@ -19,3 +19,2 @@ lib_LTLIBRARIES=libgrecs.la
19libgrecs_la_SOURCES = $(GRECS_SRC) 19libgrecs_la_SOURCES = $(GRECS_SRC)
20include_HEADERS = $(GRECS_HDR)
21m4datadir = $(datadir)/aclocal 20m4datadir = $(datadir)/aclocal
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
@@ -19,7 +19 @@ libgrecs_la_SOURCES = $(GRECS_SRC)
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
@@ -18,3 +18,2 @@ noinst_LIBRARIES=libgrecs.a
18libgrecs_a_SOURCES = $(GRECS_SRC) 18libgrecs_a_SOURCES = $(GRECS_SRC)
19noinst_HEADERS += $(GRECS_HDR)
20 19
diff --git a/src/Make.am b/src/Make.am
index cfae734..227973e 100644
--- a/src/Make.am
+++ b/src/Make.am
@@ -77,7 +77,2 @@ GRECS_SRC = \
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
@@ -86,7 +81,4 @@ endif
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)\
@@ -98,4 +90,2 @@ EXTRA_DIST=\
98 90
99BUILT_SOURCES=grecs.h
100
101AM_CPPFLAGS = \ 91AM_CPPFLAGS = \
@@ -114 +104,5 @@ LEXCOMPILE = $(top_srcdir)/@GRECS_SUBDIR@/build-aux/yyrename '$(LEX) $(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
@@ -21,3 +21,2 @@
21#include <grecs.h> 21#include <grecs.h>
22#include <grecs-locus.h>
23#include <bind-gram.h> 22#include <bind-gram.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
@@ -26,3 +26,2 @@
26#include <grecs.h> 26#include <grecs.h>
27#include <grecs-locus.h>
28#include <bind-gram.h> 27#include <bind-gram.h>
diff --git a/src/cidr.c b/src/cidr.c
index bffa35e..7566fa6 100644
--- a/src/cidr.c
+++ b/src/cidr.c
@@ -24,2 +24,3 @@
24#include <arpa/inet.h> 24#include <arpa/inet.h>
25#include <stdlib.h>
25#include "grecs.h" 26#include "grecs.h"
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
@@ -21,3 +21,2 @@
21#include <grecs.h> 21#include <grecs.h>
22#include <grecs-locus.h>
23#include <dhcpd-gram.h> 22#include <dhcpd-gram.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
@@ -25,3 +25,2 @@
25#include <grecs.h> 25#include <grecs.h>
26#include <grecs-locus.h>
27#include <dhcpd-gram.h> 26#include <dhcpd-gram.h>
diff --git a/src/diag.c b/src/diag.c
index 1424437..bdbb407 100644
--- a/src/diag.c
+++ b/src/diag.c
@@ -20,3 +20,2 @@
20#include <grecs.h> 20#include <grecs.h>
21#include <grecs-locus.h>
22#include <stdlib.h> 21#include <stdlib.h>
diff --git a/src/format.c b/src/format.c
index 89202a0..af87329 100644
--- a/src/format.c
+++ b/src/format.c
@@ -20,2 +20,3 @@
20#include <grecs.h> 20#include <grecs.h>
21#include <wordsplit.h>
21#include <stdio.h> 22#include <stdio.h>
@@ -25,3 +26,2 @@
25#include <errno.h> 26#include <errno.h>
26#include "wordsplit.h"
27 27
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
@@ -21,3 +21,2 @@
21#include <grecs.h> 21#include <grecs.h>
22#include <grecs-locus.h>
23#include <grecs-gram.h> 22#include <grecs-gram.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
@@ -26,3 +26,2 @@
26#include <grecs.h> 26#include <grecs.h>
27#include <grecs-locus.h>
28#include <grecs-gram.h> 27#include <grecs-gram.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 ((Loc).beg.line != (Loc).end.line) \
42 fprintf(File, "%s:%u.%u-%u.%u", \
43 (Loc).beg.file, \
44 (Loc).beg.line, (Loc).beg.col, \
45 (Loc).end.line, (Loc).end.col); \
46 else if ((Loc).beg.col != (Loc).end.col) \
47 fprintf(File, "%s:%u.%u-%u", \
48 (Loc).beg.file, \
49 (Loc).beg.line, (Loc).beg.col, \
50 (Loc).end.col); \
51 else \
52 fprintf(File, "%s:%u.%u", \
53 (Loc).beg.file, \
54 (Loc).beg.line, \
55 (Loc).beg.col); \
56 } while (0)
57
diff --git a/src/grecs.hin b/src/grecs.hin
deleted file mode 100644
index bfaaa49..0000000
--- a/src/grecs.hin
+++ /dev/null
@@ -1,584 +0,0 @@
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 <sys/types.h>
21#include <unistd.h>
22#include <stdlib.h>
23#include <stdio.h>