diff options
Diffstat (limited to 'kradio3/src/include/utils.h')
-rw-r--r-- | kradio3/src/include/utils.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/kradio3/src/include/utils.h b/kradio3/src/include/utils.h new file mode 100644 index 0000000..4e93293 --- /dev/null +++ b/kradio3/src/include/utils.h @@ -0,0 +1,47 @@ +/*************************************************************************** + utils.h - description + ------------------- + begin : Sun Feb 3 2002 + copyright : (C) 2002 by Martin Witte / Frank Schwanz + email : [email protected] / [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * 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 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef KRADIO_UTILS_H +#define KRADIO_UTILS_H + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +using namespace std; + +#include <kconfig.h> +#include <klocale.h> +#include <kdebug.h> +#include <qstring.h> +#define __USE_ISOC99 1 +#include <math.h> + +//extern const char *mixerChannelLabels[]; +//extern const char *mixerChannelNames[]; + +extern QString XMLEscape (const QString &s); +QString xmlOpenTag (const QString &tag, bool newline = true); +QString xmlTag (const QString &tag, const QString &s, bool newline = true); +QString xmlTag (const QString &tag, int i, bool newline = true); +QString xmlTag (const QString &tag, float f, bool newline = true); +QString xmlCloseTag (const QString &tag, bool newline = true); + +template<class T1, class T2> inline T1 min (T1 a, T2 b) { return a < b ? a : b; } +template<class T1, class T2> inline T1 max (T1 a, T2 b) { return a < b ? b : a; } + +#endif |