From 714a1cf68c0b4b8f544273375df4aa2147e6ae16 Mon Sep 17 00:00:00 2001 From: Stefan Pöschel Date: Sat, 4 Feb 2017 01:50:37 +0100 Subject: Add common header --- src/charset.h | 2 ++ src/common.h | 36 ++++++++++++++++++++++++++++++++++++ src/crc.h | 2 ++ src/odr-padenc.cpp | 8 ++------ 4 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 src/common.h (limited to 'src') diff --git a/src/charset.h b/src/charset.h index 8d1e1a2..a31ca25 100644 --- a/src/charset.h +++ b/src/charset.h @@ -25,6 +25,8 @@ #ifndef __CHARSET_H_ #define __CHARSET_H_ +#include "common.h" + #include "utf8.h" #include #include diff --git a/src/common.h b/src/common.h new file mode 100644 index 0000000..ca7e728 --- /dev/null +++ b/src/common.h @@ -0,0 +1,36 @@ +/* + Copyright (C) 2017 Stefan Pöschel (http://opendigitalradio.org) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ +/*! + \file common.h + \brief Includes common settings/includes/etc. + + \author Stefan Pöschel +*/ + +#ifndef COMMON_H_ +#define COMMON_H_ + +// include settings by configure +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +//#define DEBUG + +extern int verbose; + +#endif /* COMMON_H_ */ diff --git a/src/crc.h b/src/crc.h index 37c55dc..19b047c 100644 --- a/src/crc.h +++ b/src/crc.h @@ -18,6 +18,8 @@ #pragma once +#include "common.h" + #include namespace odr{ diff --git a/src/odr-padenc.cpp b/src/odr-padenc.cpp index 2708a05..1ae5a73 100644 --- a/src/odr-padenc.cpp +++ b/src/odr-padenc.cpp @@ -27,9 +27,7 @@ \author Stefan Pöschel */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "common.h" #include #include @@ -59,7 +57,6 @@ -//#define DEBUG #define SLEEPDELAY_DEFAULT 10 // seconds #define XSTR(x) #x @@ -84,8 +81,7 @@ enum { }; typedef std::vector uint8_vector_t; -static int verbose = 0; - +int verbose = 0; struct MSCDG { // MSC Data Group Header (extension field not supported) -- cgit v1.2.3