[master] 92f239c Get the vcli includes into line

Poul-Henning Kamp phk at varnish-cache.org
Mon Oct 10 13:33:30 CEST 2011


commit 92f239c0fa236362ec0e6538efccbc71c11bfa91
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Oct 10 11:33:19 2011 +0000

    Get the vcli includes into line

diff --git a/bin/varnishd/cache_acceptor.c b/bin/varnishd/cache_acceptor.c
index 80d7b81..e6ad6e3 100644
--- a/bin/varnishd/cache_acceptor.c
+++ b/bin/varnishd/cache_acceptor.c
@@ -32,8 +32,8 @@
 
 #include "cache.h"
 
-#include "cli_priv.h"
 #include "vcli.h"
+#include "vcli_priv.h"
 #include "vtcp.h"
 #include "vtim.h"
 
diff --git a/bin/varnishd/cache_backend_cfg.c b/bin/varnishd/cache_backend_cfg.c
index 2e6d83c..b10512d 100644
--- a/bin/varnishd/cache_backend_cfg.c
+++ b/bin/varnishd/cache_backend_cfg.c
@@ -38,7 +38,7 @@
 #include "cache.h"
 
 #include "cache_backend.h"
-#include "cli_priv.h"
+#include "vcli_priv.h"
 #include "vrt.h"
 
 struct lock VBE_mtx;
diff --git a/bin/varnishd/cache_backend_poll.c b/bin/varnishd/cache_backend_poll.c
index a0ad62b..d79a806 100644
--- a/bin/varnishd/cache_backend_poll.c
+++ b/bin/varnishd/cache_backend_poll.c
@@ -45,7 +45,7 @@
 #include "cache.h"
 
 #include "cache_backend.h"
-#include "cli_priv.h"
+#include "vcli_priv.h"
 #include "vrt.h"
 #include "vtcp.h"
 #include "vtim.h"
diff --git a/bin/varnishd/cache_ban.c b/bin/varnishd/cache_ban.c
index bec8d85..d556ace 100644
--- a/bin/varnishd/cache_ban.c
+++ b/bin/varnishd/cache_ban.c
@@ -67,9 +67,9 @@
 
 #include "cache.h"
 
-#include "cli_priv.h"
 #include "hash_slinger.h"
 #include "vcli.h"
+#include "vcli_priv.h"
 #include "vend.h"
 #include "vtim.h"
 
diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c
index ba61e9c..463a05b 100644
--- a/bin/varnishd/cache_center.c
+++ b/bin/varnishd/cache_center.c
@@ -65,10 +65,10 @@ DOT acceptor -> start [style=bold,color=green]
 
 #include "cache.h"
 
-#include "cli_priv.h"
 #include "hash_slinger.h"
 #include "stevedore.h"
 #include "vcl.h"
+#include "vcli_priv.h"
 #include "vsha256.h"
 #include "vtcp.h"
 #include "vtim.h"
diff --git a/bin/varnishd/cache_cli.c b/bin/varnishd/cache_cli.c
index a278e84..ea4d367 100644
--- a/bin/varnishd/cache_cli.c
+++ b/bin/varnishd/cache_cli.c
@@ -40,10 +40,10 @@
 
 #include "cache.h"
 
-#include "vcli.h"
-#include "cli_common.h"
-#include "cli_priv.h"
 #include "hash_slinger.h"		// objhead
+#include "vcli.h"
+#include "vcli_common.h"
+#include "vcli_priv.h"
 #include "vcli_serve.h"
 
 pthread_t		cli_thread;
diff --git a/bin/varnishd/cache_fetch.c b/bin/varnishd/cache_fetch.c
index 4bbc272..75319d8 100644
--- a/bin/varnishd/cache_fetch.c
+++ b/bin/varnishd/cache_fetch.c
@@ -36,8 +36,8 @@
 
 #include "cache.h"
 
-#include "cli_priv.h"
 #include "stevedore.h"
+#include "vcli_priv.h"
 #include "vct.h"
 #include "vtcp.h"
 
diff --git a/bin/varnishd/cache_vcl.c b/bin/varnishd/cache_vcl.c
index 48568ff..c77ab08 100644
--- a/bin/varnishd/cache_vcl.c
+++ b/bin/varnishd/cache_vcl.c
@@ -39,10 +39,10 @@
 
 #include "cache.h"
 
-#include "cli_priv.h"
 #include "libvcl.h"
 #include "vcl.h"
 #include "vcli.h"
+#include "vcli_priv.h"
 
 struct vcls {
 	unsigned		magic;
diff --git a/bin/varnishd/cache_vrt_vmod.c b/bin/varnishd/cache_vrt_vmod.c
index bb4eeb8..6b3b846 100644
--- a/bin/varnishd/cache_vrt_vmod.c
+++ b/bin/varnishd/cache_vrt_vmod.c
@@ -36,7 +36,7 @@
 
 #include "cache.h"
 
-#include "cli_priv.h"
+#include "vcli_priv.h"
 #include "vrt.h"
 
 /*--------------------------------------------------------------------
diff --git a/bin/varnishd/cache_waiter.c b/bin/varnishd/cache_waiter.c
index 08c5809..9c30edf 100644
--- a/bin/varnishd/cache_waiter.c
+++ b/bin/varnishd/cache_waiter.c
@@ -33,8 +33,8 @@
 #include "cache.h"
 
 #include "cache_waiter.h"
-#include "cli_priv.h"
 #include "vcli.h"
+#include "vcli_priv.h"
 
 static const struct waiter * const vca_waiters[] = {
     #if defined(HAVE_KQUEUE)
diff --git a/bin/varnishd/hash_critbit.c b/bin/varnishd/hash_critbit.c
index add2397..78bda7a 100644
--- a/bin/varnishd/hash_critbit.c
+++ b/bin/varnishd/hash_critbit.c
@@ -36,8 +36,8 @@
 
 #include "cache.h"
 
-#include "cli_priv.h"
 #include "hash_slinger.h"
+#include "vcli_priv.h"
 #include "vmb.h"
 #include "vtim.h"
 
diff --git a/bin/varnishd/mgt_child.c b/bin/varnishd/mgt_child.c
index 7338e6c..5af26fe 100644
--- a/bin/varnishd/mgt_child.c
+++ b/bin/varnishd/mgt_child.c
@@ -46,18 +46,19 @@
 
 #include "mgt.h"
 
-#include "cli_priv.h"
 #include "heritage.h"
-#include "mgt_cli.h"
 #include "vapi/vsm_int.h"
 #include "vbm.h"
 #include "vcli.h"
+#include "vcli_priv.h"
 #include "vev.h"
 #include "vlu.h"
 #include "vss.h"
 #include "vtcp.h"
 #include "vtim.h"
 
+#include "mgt_cli.h"
+
 pid_t		child_pid = -1;
 
 
diff --git a/bin/varnishd/mgt_cli.c b/bin/varnishd/mgt_cli.c
index f1bb2d8..dea5e7f 100644
--- a/bin/varnishd/mgt_cli.c
+++ b/bin/varnishd/mgt_cli.c
@@ -44,17 +44,18 @@
 
 #include "mgt.h"
 
-#include "vcli.h"
-#include "cli_common.h"
-#include "cli_priv.h"
 #include "heritage.h"
-#include "mgt_cli.h"
+#include "vcli.h"
+#include "vcli_common.h"
+#include "vcli_priv.h"
 #include "vcli_serve.h"
 #include "vev.h"
 #include "vlu.h"
 #include "vss.h"
 #include "vtcp.h"
 
+#include "mgt_cli.h"
+
 #ifndef HAVE_SRANDOMDEV
 #include "compat/srandomdev.h"
 #endif
diff --git a/bin/varnishd/mgt_param.c b/bin/varnishd/mgt_param.c
index 4bb1adf..9ded195 100644
--- a/bin/varnishd/mgt_param.c
+++ b/bin/varnishd/mgt_param.c
@@ -39,16 +39,17 @@
 
 #include "mgt.h"
 
-#include "vcli.h"
 #include "cache_waiter.h"
-#include "cli_common.h"
-#include "cli_priv.h"
 #include "heritage.h"
-#include "mgt_cli.h"
 #include "vav.h"
+#include "vcli.h"
+#include "vcli_common.h"
+#include "vcli_priv.h"
 #include "vparam.h"
 #include "vss.h"
 
+#include "mgt_cli.h"
+
 #define MAGIC_INIT_STRING	"\001"
 struct params master;
 static int nparspec;
diff --git a/bin/varnishd/mgt_vcc.c b/bin/varnishd/mgt_vcc.c
index 78a29dd..5901408 100644
--- a/bin/varnishd/mgt_vcc.c
+++ b/bin/varnishd/mgt_vcc.c
@@ -40,14 +40,15 @@
 
 #include "mgt.h"
 
-#include "cli_priv.h"
 #include "libvcl.h"
-#include "mgt_cli.h"
 #include "vcl.h"
 #include "vcli.h"
+#include "vcli_priv.h"
 #include "vfil.h"
 #include "vsub.h"
 
+#include "mgt_cli.h"
+
 struct vclprog {
 	VTAILQ_ENTRY(vclprog)	list;
 	char			*name;
diff --git a/bin/varnishd/stevedore.c b/bin/varnishd/stevedore.c
index 538ae27..ff1bdf5 100644
--- a/bin/varnishd/stevedore.c
+++ b/bin/varnishd/stevedore.c
@@ -38,9 +38,9 @@
 
 #include "cache.h"
 
-#include "cli_priv.h"
 #include "stevedore.h"
 #include "vav.h"
+#include "vcli_priv.h"
 #include "vrt.h"
 #include "vrt_obj.h"
 
diff --git a/bin/varnishd/storage_persistent.c b/bin/varnishd/storage_persistent.c
index d3ab02e..d379c4a 100644
--- a/bin/varnishd/storage_persistent.c
+++ b/bin/varnishd/storage_persistent.c
@@ -45,10 +45,10 @@
 
 #include "cache.h"
 
-#include "cli_priv.h"
 #include "hash_slinger.h"
 #include "stevedore.h"
 #include "vcli.h"
+#include "vcli_priv.h"
 #include "vend.h"
 #include "vsha256.h"
 
diff --git a/bin/varnishd/varnishd.c b/bin/varnishd/varnishd.c
index 7cecfe4..722c10e 100644
--- a/bin/varnishd/varnishd.c
+++ b/bin/varnishd/varnishd.c
@@ -46,12 +46,12 @@
 
 #include "mgt.h"
 
-#include "vcli.h"
-#include "cli_common.h"
 #include "hash_slinger.h"
 #include "heritage.h"
 #include "stevedore.h"
 #include "vav.h"
+#include "vcli.h"
+#include "vcli_common.h"
 #include "vev.h"
 #include "vfil.h"
 #include "vin.h"
diff --git a/include/Makefile.am b/include/Makefile.am
index 9c92b1e..62292fc 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -26,8 +26,6 @@ pkginclude_HEADERS = \
 
 nobase_noinst_HEADERS = \
 	binary_heap.h \
-	cli_common.h \
-	cli_priv.h \
 	compat/daemon.h \
 	compat/execinfo.h \
 	compat/srandomdev.h \
@@ -39,6 +37,8 @@ nobase_noinst_HEADERS = \
 	vav.h \
 	vbm.h \
 	vcl.h \
+	vcli_common.h \
+	vcli_priv.h \
 	vcli_serve.h \
 	vcs_version.h \
 	vcs.h \
diff --git a/include/cli_common.h b/include/cli_common.h
deleted file mode 100644
index 80d680f..0000000
--- a/include/cli_common.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-
- * Copyright (c) 2006 Verdens Gang AS
- * Copyright (c) 2006-2011 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.
- *
- */
-
-struct vlu;
-struct VCLS;
-
-struct cli {
-	unsigned		magic;
-#define CLI_MAGIC		0x4038d570
-	struct vsb		*sb;
-	enum VCLI_status_e	result;
-	char			*cmd;
-	unsigned		auth;
-	char			challenge[34];
-	char			*ident;
-	struct vlu		*vlu;
-	struct VCLS		*cls;
-};
diff --git a/include/cli_priv.h b/include/cli_priv.h
deleted file mode 100644
index 60d6d69..0000000
--- a/include/cli_priv.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 2006 Verdens Gang AS
- * Copyright (c) 2006-2011 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.
- *
- * Varnish process internal CLI stuff.
- *
- * XXX: at a latter date we may want to move some to cli.h/libvarnishapi
- */
-
-#define CLI_PRIV_H
-
-struct cli;	/* NB: struct cli is opaque at this level.  */
-
-typedef void cli_func_t(struct cli*, const char * const *av, void *priv);
-
-struct cli_proto {
-	/* These must match the CLI_* macros in cli.h */
-	const char		*request;
-	const char		*syntax;
-	const char		*help;
-	unsigned		minarg;
-	unsigned		maxarg;
-	char			flags[4];
-
-	/* Dispatch information */
-	cli_func_t		*func;
-	void			*priv;
-};
-
-/* The implementation must provide these functions */
-void VCLI_Out(struct cli *cli, const char *fmt, ...);
-void VCLI_Quote(struct cli *cli, const char *str);
-void VCLI_SetResult(struct cli *cli, unsigned r);
diff --git a/include/vcli_common.h b/include/vcli_common.h
new file mode 100644
index 0000000..80d680f
--- /dev/null
+++ b/include/vcli_common.h
@@ -0,0 +1,45 @@
+/*-
+ * Copyright (c) 2006 Verdens Gang AS
+ * Copyright (c) 2006-2011 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.
+ *
+ */
+
+struct vlu;
+struct VCLS;
+
+struct cli {
+	unsigned		magic;
+#define CLI_MAGIC		0x4038d570
+	struct vsb		*sb;
+	enum VCLI_status_e	result;
+	char			*cmd;
+	unsigned		auth;
+	char			challenge[34];
+	char			*ident;
+	struct vlu		*vlu;
+	struct VCLS		*cls;
+};
diff --git a/include/vcli_priv.h b/include/vcli_priv.h
new file mode 100644
index 0000000..60d6d69
--- /dev/null
+++ b/include/vcli_priv.h
@@ -0,0 +1,57 @@
+/*-
+ * Copyright (c) 2006 Verdens Gang AS
+ * Copyright (c) 2006-2011 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.
+ *
+ * Varnish process internal CLI stuff.
+ *
+ * XXX: at a latter date we may want to move some to cli.h/libvarnishapi
+ */
+
+#define CLI_PRIV_H
+
+struct cli;	/* NB: struct cli is opaque at this level.  */
+
+typedef void cli_func_t(struct cli*, const char * const *av, void *priv);
+
+struct cli_proto {
+	/* These must match the CLI_* macros in cli.h */
+	const char		*request;
+	const char		*syntax;
+	const char		*help;
+	unsigned		minarg;
+	unsigned		maxarg;
+	char			flags[4];
+
+	/* Dispatch information */
+	cli_func_t		*func;
+	void			*priv;
+};
+
+/* The implementation must provide these functions */
+void VCLI_Out(struct cli *cli, const char *fmt, ...);
+void VCLI_Quote(struct cli *cli, const char *str);
+void VCLI_SetResult(struct cli *cli, unsigned r);
diff --git a/lib/libvarnish/cli_common.c b/lib/libvarnish/cli_common.c
index cb4e8af..43b91c3 100644
--- a/lib/libvarnish/cli_common.c
+++ b/lib/libvarnish/cli_common.c
@@ -43,10 +43,10 @@
 #include <time.h>
 #include <unistd.h>
 
-#include "vcli.h"
-#include "cli_common.h"
-#include "cli_priv.h"
 #include "vas.h"
+#include "vcli.h"
+#include "vcli_common.h"
+#include "vcli_priv.h"
 #include "vsb.h"
 
 /*lint -e{818} cli could be const */
diff --git a/lib/libvarnish/cli_serve.c b/lib/libvarnish/cli_serve.c
index 9a9daed..f3def96 100644
--- a/lib/libvarnish/cli_serve.c
+++ b/lib/libvarnish/cli_serve.c
@@ -43,10 +43,10 @@
 #include "miniobj.h"
 #include "vas.h"
 
-#include "vcli.h"
-#include "cli_common.h"
-#include "cli_priv.h"
 #include "vav.h"
+#include "vcli.h"
+#include "vcli_common.h"
+#include "vcli_priv.h"
 #include "vcli_serve.h"
 #include "vlu.h"
 #include "vqueue.h"



More information about the varnish-commit mailing list