summaryrefslogtreecommitdiffstats
path: root/src/include/utils.h
blob: c446c82a7e556a5399662d5f8f88ef24a29b85cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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 <tdeconfig.h>
#include <tdelocale.h>
#include <kdebug.h>
#include <tqstring.h>
#define __USE_ISOC99 1
#include <math.h>

//extern const char *mixerChannelLabels[];
//extern const char *mixerChannelNames[];

extern TQString XMLEscape (const TQString &s);
TQString xmlOpenTag  (const TQString &tag, bool newline = true);
TQString xmlTag      (const TQString &tag, const TQString &s, bool newline = true);
TQString xmlTag      (const TQString &tag, int i,            bool newline = true);
TQString xmlTag      (const TQString &tag, float f,          bool newline = true);
TQString xmlCloseTag (const TQString &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