-------------------------------------------------------------------------*/ @brief Get the string associated to a key, convert to an int @param d Dictionary to search @param key Key string to look for @param notfound Value to return in case of error @return integer This function queries a dictionary for a key. A key as read from an ini file is given as "section:key". If
| 755 | */ |
| 756 | /*--------------------------------------------------------------------------*/ |
| 757 | int iniparser_getint(dictionary * d, char * key, int notfound) |
| 758 | { |
| 759 | char * str ; |
| 760 | |
| 761 | str = iniparser_getstring(d, key, INI_INVALID_KEY); |
| 762 | if (str==INI_INVALID_KEY) return notfound ; |
| 763 | return atoi(str); |
| 764 | } |
| 765 | |
| 766 | |
| 767 | /*-------------------------------------------------------------------------*/ |
nothing calls this directly
no test coverage detected