Commit aa350825 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Simplify VUT options initialization

We don't need an indirection in a separate C file per VUT.
parent 12814efb
...@@ -6,10 +6,10 @@ AM_CPPFLAGS = \ ...@@ -6,10 +6,10 @@ AM_CPPFLAGS = \
bin_PROGRAMS = varnishhist bin_PROGRAMS = varnishhist
varnishhist_SOURCES = varnishhist.c \ varnishhist_SOURCES = \
varnishhist.c \
varnishhist_options.h \ varnishhist_options.h \
varnishhist_profiles.h \ varnishhist_profiles.h
varnishhist_options.c
varnishhist_CFLAGS = \ varnishhist_CFLAGS = \
@SAN_CFLAGS@ @SAN_CFLAGS@
......
...@@ -42,6 +42,9 @@ ...@@ -42,6 +42,9 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#define VOPT_DEFINITION
#define VOPT_INC "varnishhist_options.h"
#include "vdef.h" #include "vdef.h"
#include "vcurses.h" #include "vcurses.h"
#include "vapi/vsl.h" #include "vapi/vsl.h"
......
/*-
* Copyright (c) 2014 Varnish Software AS
* All rights reserved.
*
* Author: Martin Blix Grydeland <martin@varnish-software.com>
*
* 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.
*
* Option definitions for varnishhist
*/
#include <stdlib.h>
#define VOPT_DEFINITION
#define VOPT_INC "varnishhist_options.h"
#include "vapi/voptget.h"
...@@ -8,8 +8,7 @@ bin_PROGRAMS = varnishlog ...@@ -8,8 +8,7 @@ bin_PROGRAMS = varnishlog
varnishlog_SOURCES = \ varnishlog_SOURCES = \
varnishlog.c \ varnishlog.c \
varnishlog_options.h \ varnishlog_options.h
varnishlog_options.c
varnishlog_CFLAGS = \ varnishlog_CFLAGS = \
@SAN_CFLAGS@ @SAN_CFLAGS@
......
...@@ -39,6 +39,10 @@ ...@@ -39,6 +39,10 @@
#include <errno.h> #include <errno.h>
#include <stdint.h> #include <stdint.h>
#define VOPT_DEFINITION
#define VOPT_INC "varnishlog_options.h"
#include "vapi/vsm.h"
#include "vapi/vsl.h" #include "vapi/vsl.h"
#include "vapi/voptget.h" #include "vapi/voptget.h"
#include "vas.h" #include "vas.h"
......
/*-
* Copyright (c) 2006 Verdens Gang AS
* Copyright (c) 2006-2014 Varnish Software AS
* All rights reserved.
*
* Author: Martin Blix Grydeland <martin@varnish-software.com>
*
* 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.
*
* Option definitions for varnishlog
*/
#include <stdlib.h>
#define VOPT_DEFINITION
#define VOPT_INC "varnishlog_options.h"
#include "vapi/voptget.h"
...@@ -9,7 +9,6 @@ bin_PROGRAMS = varnishncsa ...@@ -9,7 +9,6 @@ bin_PROGRAMS = varnishncsa
varnishncsa_SOURCES = \ varnishncsa_SOURCES = \
varnishncsa.c \ varnishncsa.c \
varnishncsa_options.h \ varnishncsa_options.h \
varnishncsa_options.c \
base64.h \ base64.h \
base64.c base64.c
......
...@@ -53,6 +53,9 @@ ...@@ -53,6 +53,9 @@
#include <time.h> #include <time.h>
#include <math.h> #include <math.h>
#define VOPT_DEFINITION
#define VOPT_INC "varnishncsa_options.h"
#include "base64.h" #include "base64.h"
#include "vapi/vsl.h" #include "vapi/vsl.h"
#include "vapi/voptget.h" #include "vapi/voptget.h"
......
/*-
* Copyright (c) 2013-2015 Varnish Software AS
* All rights reserved.
*
* Author: Martin Blix Grydeland <martin@varnish-software.com>
*
* 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.
*
* Option definitions for varnishlog
*/
#include <stdlib.h>
#define VOPT_DEFINITION
#define VOPT_INC "varnishncsa_options.h"
#include "vapi/voptget.h"
...@@ -10,8 +10,7 @@ varnishstat_SOURCES = \ ...@@ -10,8 +10,7 @@ varnishstat_SOURCES = \
varnishstat.h \ varnishstat.h \
varnishstat.c \ varnishstat.c \
varnishstat_curses.c \ varnishstat_curses.c \
varnishstat_options.h \ varnishstat_options.h
varnishstat_options.c
varnishstat_CFLAGS = \ varnishstat_CFLAGS = \
@SAN_CFLAGS@ @SAN_CFLAGS@
......
...@@ -39,6 +39,9 @@ ...@@ -39,6 +39,9 @@
#include <unistd.h> #include <unistd.h>
#include <math.h> #include <math.h>
#define VOPT_DEFINITION
#define VOPT_INC "varnishstat_options.h"
#include "vapi/voptget.h" #include "vapi/voptget.h"
#include "vapi/vsl.h" #include "vapi/vsl.h"
#include "vdef.h" #include "vdef.h"
......
/*-
* Copyright (c) 2016 Varnish Software AS
* All rights reserved.
*
* Author: Federico G. Schwindt <fgsch@lodoss.net>
*
* 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.
*
* Option definitions for varnishstat
*/
#include <stdlib.h>
#define VOPT_DEFINITION
#define VOPT_INC "varnishstat_options.h"
#include "vapi/voptget.h"
...@@ -6,9 +6,9 @@ AM_CPPFLAGS = \ ...@@ -6,9 +6,9 @@ AM_CPPFLAGS = \
bin_PROGRAMS = varnishtop bin_PROGRAMS = varnishtop
varnishtop_SOURCES = varnishtop.c \ varnishtop_SOURCES = \
varnishtop_options.h \ varnishtop.c \
varnishtop_options.c varnishtop_options.h
varnishtop_CFLAGS = \ varnishtop_CFLAGS = \
......
...@@ -42,6 +42,9 @@ ...@@ -42,6 +42,9 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#define VOPT_DEFINITION
#define VOPT_INC "varnishtop_options.h"
#include "vcurses.h" #include "vcurses.h"
#include "vapi/vsl.h" #include "vapi/vsl.h"
#include "vapi/vsm.h" #include "vapi/vsm.h"
......
/*-
* Copyright (c) 2014 Varnish Software AS
* All rights reserved.
*
* Author: Martin Blix Grydeland <martin@varnish-software.com>
*
* 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.
*
* Option definitions for varnishtop
*/
#include <stdlib.h>
#define VOPT_DEFINITION
#define VOPT_INC "varnishtop_options.h"
#include "vapi/voptget.h"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment