[master] 905144b This is a table-generating #include
Poul-Henning Kamp
phk at varnish-cache.org
Mon Oct 10 12:51:29 CEST 2011
commit 905144b25b68e6c940c71af5164ba2a04868659a
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Oct 10 10:51:18 2011 +0000
This is a table-generating #include
diff --git a/include/Makefile.am b/include/Makefile.am
index 948cef7..935a6f9 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -9,6 +9,7 @@ pkginclude_HEADERS = \
tbl/http_response.h \
tbl/locks.h \
tbl/steps.h \
+ tbl/symbol_kind.h \
tbl/vcc_types.h \
tbl/vcl_returns.h \
tbl/vrt_stv_var.h \
diff --git a/include/tbl/symbol_kind.h b/include/tbl/symbol_kind.h
new file mode 100644
index 0000000..155d36e
--- /dev/null
+++ b/include/tbl/symbol_kind.h
@@ -0,0 +1,41 @@
+/*-
+ * Copyright (c) 2010 Varnish Software AS
+ * All rights reserved.
+ *
+ * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+/*lint -save -e525 -e539 */
+VCC_SYMB(NONE, none, "undefined")
+VCC_SYMB(VAR, var, "variable")
+VCC_SYMB(FUNC, func, "function") /* VMOD function */
+VCC_SYMB(PROC, proc, "procedure") /* VMOD procedure */
+VCC_SYMB(VMOD, vmod, "vmod")
+VCC_SYMB(ACL, acl, "acl")
+VCC_SYMB(SUB, sub, "sub") /* VCL subroutine */
+VCC_SYMB(BACKEND, backend, "backend")
+VCC_SYMB(PROBE, probe, "probe")
+VCC_SYMB(WILDCARD, wildcard, "wildcard")
+/*lint -restore */
diff --git a/lib/libvcl/Makefile.am b/lib/libvcl/Makefile.am
index 8406ed7..44e2957 100644
--- a/lib/libvcl/Makefile.am
+++ b/lib/libvcl/Makefile.am
@@ -9,7 +9,6 @@ libvcl_la_LDFLAGS = -avoid-version
libvcl_la_SOURCES = \
vcc_compile.h \
vcc_token_defs.h \
- symbol_kind.h \
\
vcc_acl.c \
vcc_action.c \
diff --git a/lib/libvcl/symbol_kind.h b/lib/libvcl/symbol_kind.h
deleted file mode 100644
index 155d36e..0000000
--- a/lib/libvcl/symbol_kind.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * Copyright (c) 2010 Varnish Software AS
- * All rights reserved.
- *
- * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-/*lint -save -e525 -e539 */
-VCC_SYMB(NONE, none, "undefined")
-VCC_SYMB(VAR, var, "variable")
-VCC_SYMB(FUNC, func, "function") /* VMOD function */
-VCC_SYMB(PROC, proc, "procedure") /* VMOD procedure */
-VCC_SYMB(VMOD, vmod, "vmod")
-VCC_SYMB(ACL, acl, "acl")
-VCC_SYMB(SUB, sub, "sub") /* VCL subroutine */
-VCC_SYMB(BACKEND, backend, "backend")
-VCC_SYMB(PROBE, probe, "probe")
-VCC_SYMB(WILDCARD, wildcard, "wildcard")
-/*lint -restore */
diff --git a/lib/libvcl/vcc_compile.h b/lib/libvcl/vcc_compile.h
index c59c632..8088509 100644
--- a/lib/libvcl/vcc_compile.h
+++ b/lib/libvcl/vcc_compile.h
@@ -99,7 +99,7 @@ struct token {
enum symkind {
#define VCC_SYMB(uu, ll, dd) SYM_##uu,
-#include "symbol_kind.h"
+#include "tbl/symbol_kind.h"
#undef VCC_SYMB
};
diff --git a/lib/libvcl/vcc_symb.c b/lib/libvcl/vcc_symb.c
index 0acb0cd..222680f 100644
--- a/lib/libvcl/vcc_symb.c
+++ b/lib/libvcl/vcc_symb.c
@@ -41,7 +41,7 @@ VCC_SymKind(struct vcc *tl, const struct symbol *s)
{
switch(s->kind) {
#define VCC_SYMB(uu, ll, dd) case SYM_##uu: return(dd);
-#include "symbol_kind.h"
+#include "tbl/symbol_kind.h"
#undef VCC_SYMB
default:
ErrInternal(tl);
More information about the varnish-commit
mailing list