A simple .ini file interface.

Dependents:   Smart-WiFly-WebServer SignalGenerator WattEye X10Svr

Files at this revision

API Documentation at this revision

Comitter:
WiredHome
Date:
Thu Sep 05 22:50:39 2013 +0000
Parent:
1:1e2ee9bbee40
Child:
3:64fcaf06b012
Commit message:
Improved diagnostics capability.

Changed in this revision

IniManager.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/IniManager.cpp	Sun Sep 01 19:52:53 2013 +0000
+++ b/IniManager.cpp	Thu Sep 05 22:50:39 2013 +0000
@@ -107,10 +107,11 @@
 
         FILE * repair = fopen(newFile, "rt");
         if (repair) {
+            int i;
+
             // helps recover if the system crashed before it could swap in the new file
             INFO("*** repairing\r\n");
             fclose(repair);
-            int i;
             i = remove(bakFile);            // remove an old .bak
             INFO("remove(%s) returned %d\r\n", bakFile, i);
             i = Rename(iniFile, bakFile);   // move the existing .ini to .bak