Allow TABS in config
[clinton/Smoothieware.git] / src / libs / ConfigSources / FileConfigSource.cpp
index 5006e4d..2718813 100644 (file)
@@ -9,12 +9,14 @@
 #include "ConfigValue.h"
 #include "FileConfigSource.h"
 #include "ConfigCache.h"
+#include "utils.h"
 #include <malloc.h>
 
 
 using namespace std;
 #include <string>
 
+#include <stdio.h>
 
 FileConfigSource::FileConfigSource(string config_file, uint16_t name_checksum){
     this->name_checksum = name_checksum;
@@ -61,7 +63,7 @@ void FileConfigSource::write( string setting, string value ){
             if( candidate.compare(setting) != 0 ){ buffer.clear(); continue; }
             int free_space = int(int(buffer.find_first_of("\r\n#", begin_value+1))-begin_value);
             if( int(value.length()) >= free_space ){
-                //this->kernel->streams->printf("ERROR: Not enough room for value\r\n");
+                //THEKERNEL->streams->printf("ERROR: Not enough room for value\r\n");
                 fclose(lp);
                 return;
             }
@@ -79,7 +81,7 @@ void FileConfigSource::write( string setting, string value ){
         }
     } while (c != EOF);
     fclose(lp);
-    //this->kernel->streams->printf("ERROR: configuration key not found\r\n");
+    //THEKERNEL->streams->printf("ERROR: configuration key not found\r\n");
 }
 
 // Return the value for a specific checksum