Simple config file class with added support for floats
Fork of ConfigFile by
Diff: ConfigFile.cpp
- Revision:
- 1:a802df951169
- Parent:
- 0:57f3e167586f
- Child:
- 2:ba316099c799
--- a/ConfigFile.cpp Thu Jan 27 21:08:51 2011 +0000 +++ b/ConfigFile.cpp Thu Jan 27 21:23:19 2011 +0000 @@ -44,13 +44,7 @@ fclose(fp); } -/** Read value. If file is not open, or key does not exist: copy default value (return false) - * @param key name of the key in the file - * @param value pointer to buffer that receives the value - * @param maxlen the maximum length of the value. If the actual value is longer, it is truncated - * @param def Default value. If the key is not found in the file, this value is copied. - * @return "true" if the key is found "false" is key is not found (default value is returned) - */ + bool ConfigFile::Value(char *key, char *value, size_t maxlen, char *def) { int m=0,n=0,c,s=0; @@ -135,7 +129,6 @@ * @param def Default value. If the key is not found in the file, this value is copied. * @return "true" if the key is found "false" is key is not found (default value is returned) */ -// Return int value bool ConfigFile::Value(char *key, int *value, int def) { char val[16];