A simple .ini file interface.
Dependents: Smart-WiFly-WebServer SignalGenerator WattEye X10Svr
Diff: IniManager.cpp
- Revision:
- 12:6cf929bde139
- Parent:
- 11:738604f18088
- Child:
- 13:d5957065d066
- Child:
- 16:82e0f8747b95
--- a/IniManager.cpp Tue Jan 26 11:51:08 2016 +0000
+++ b/IniManager.cpp Mon Apr 11 02:16:18 2016 +0000
@@ -133,6 +133,17 @@
return found;
}
+long int INI::ReadLongInt(const char * section, const char * key, long int defaultValue)
+{
+ char localBuf[16];
+
+ if (ReadString(section, key, localBuf, sizeof(localBuf))) {
+ return atol(localBuf);
+ } else {
+ return defaultValue;
+ }
+}
+
bool INI::CleanUp()
{
char * newFile = (char *)swMalloc(strlen(iniFile)+1);
@@ -419,3 +430,5 @@
return 0;
}
#endif
+
+