summaryrefslogtreecommitdiff
path: root/tools.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-12-06 10:29:23 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-12-06 10:29:23 +0100
commit9a0236b9e249f002accfb222a969be0c676115b7 (patch)
tree716651c5a29f20266b8074fb8301ce2be9f93c98 /tools.h
parentc005465d9005c7b8918564055639c1766c099121 (diff)
downloadvdr-9a0236b9e249f002accfb222a969be0c676115b7.tar.gz
vdr-9a0236b9e249f002accfb222a969be0c676115b7.tar.bz2
Changed reading and writing of floating point numbers into configuration files to make it independent of the decimal point used in the current locale
Diffstat (limited to 'tools.h')
-rw-r--r--tools.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools.h b/tools.h
index 3e546a17..70c643fc 100644
--- a/tools.h
+++ b/tools.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.h 2.22 2012/09/30 11:02:21 kls Exp $
+ * $Id: tools.h 2.23 2012/12/06 08:59:39 kls Exp $
*/
#ifndef __TOOLS_H
@@ -216,6 +216,14 @@ int64_t StrToNum(const char *s);
bool StrInArray(const char *a[], const char *s);
///< Returns true if the string s is equal to one of the strings pointed
///< to by the (NULL terminated) array a.
+double atod(const char *s);
+ ///< Converts the given string, which is a floating point number using a '.' as
+ ///< the decimal point, to a double value, independent of the currently selected
+ ///< locale.
+cString dtoa(double d, const char *Format = "%f");
+ ///< Converts the given double value to a string, making sure it uses a '.' as
+ ///< the decimal point, independent of the currently selected locale.
+ ///< If Format is given, it will be used instead of the default.
cString itoa(int n);
cString AddDirectory(const char *DirName, const char *FileName);
bool EntriesOnSameFileSystem(const char *File1, const char *File2);