2 ent-strflt.h -- String to float defines
4 Copyright (C) 2005, 2006 Sebastian Freundt
5 Copyright (C) 2006 Nelson Ferreira
7 Author: Sebastian Freundt
10 This file is part of SXEmacs
12 SXEmacs is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, either version 3 of the License, or
15 (at your option) any later version.
17 SXEmacs is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program. If not, see <http://www.gnu.org/licenses/>. */
25 #ifndef INCLUDED_ent_strflt_h_
26 #define INCLUDED_ent_strflt_h_
28 #if fpfloat_double_p && defined(HAVE_STRTOD)
29 #define str_to_fpfloat(s) strtod(s, NULL)
30 #elif fpfloat_double_p && defined(HAVE_STRTOLD)
31 #define str_to_fpfloat(s) (fpfloat)strtold(s, NULL)
32 #elif fpfloat_double_p
33 #define str_to_fpfloat(s) (fpfloat)atof(s)
34 #elif fpfloat_long_double_p && defined(HAVE_STRTOLD)
35 #define str_to_fpfloat(s) strtold(s, NULL)
36 #elif fpfloat_long_double_p && defined(HAVE_STRTOD)
37 #define str_to_fpfloat(s) (fpfloat)strtod(s, NULL)
38 #elif fpfloat_long_double_p
39 #define str_to_fpfloat(s) (fpfloat)atof(s)
41 #define str_to_fpfloat(s) (fpfloat)atof(s)
44 #endif /* INCLUDED_ent_strflt_h_ */