-------------------------------------------------------------------------*/ @brief Get the string associated to a key, convert to a double @param d Dictionary to search @param key Key string to look for @param notfound Value to return in case of error @return double This function queries a dictionary for a key. A key as read from an ini file is given as "section:key". If
| 778 | */ |
| 779 | /*--------------------------------------------------------------------------*/ |
| 780 | double iniparser_getdouble(dictionary * d, char * key, double notfound) |
| 781 | { |
| 782 | char * str ; |
| 783 | |
| 784 | str = iniparser_getstring(d, key, INI_INVALID_KEY); |
| 785 | if (str==INI_INVALID_KEY) return notfound ; |
| 786 | return atof(str); |
| 787 | } |
| 788 | |
| 789 | |
| 790 |
nothing calls this directly
no test coverage detected