A simple .ini file interface.

Dependents:   Smart-WiFly-WebServer SignalGenerator WattEye X10Svr

Revision:
26:e8d7b09a77a3
Parent:
25:1362b843de86
Child:
28:4e7fc08a0fea
--- a/IniManager.cpp	Sun Nov 11 22:56:13 2018 +0000
+++ b/IniManager.cpp	Thu Apr 30 14:30:27 2020 +0000
@@ -202,6 +202,7 @@
     INI_Return retVal;
     bool found = false;
     
+    retVal = RetXLate[INI_SECTION_NOT_FOUND][version];     // assume we won't find the section, until we do.
     if (!iniFile)
         return RetXLate[INI_NO_FILE_SPEC][version];
     CleanUp();
@@ -214,7 +215,6 @@
     } else {
         char buf[INTERNAL_BUF_SIZE];
         bool inSection = (section == NULL) ? true : false;
-        retVal = RetXLate[INI_SECTION_NOT_FOUND][version];     // assume we won't find the section, until we do.
         while(fgets(buf, sizeof(buf), fp)) {
             int x = strlen(buf) - 1;        // remove trailing \r\n combinations
             while (x >= 0 && buf[x] < ' ')