updates lurching towards functionality
[feisty_meow.git] / nucleus / library / configuration / ini_configurator.cpp
index 67436f835333441ea4de92b025881d6bda3906ad..7ca4ba1bab1170d5081f19bc062240ac1be52991 100644 (file)
@@ -30,6 +30,8 @@
 #include <structures/string_table.h>
 #include <structures/symbol_table.h>
 
+#include <stdio.h>
+
 #undef LOG
 #define LOG(to_print) printf("%s::%s: %s\n", static_class_name(), func, astring(to_print).s())
 
@@ -57,7 +59,9 @@ ini_configurator::ini_configurator(const astring &ini_filename,
   _where(where),
   _add_spaces(false)
 {
+  FUNCDEF("constructor");
   name(ini_filename);  // set name properly.
+LOG(astring("calculated ini name as: '") + _ini_name->raw() + "'");
 }
 
 ini_configurator::~ini_configurator()
@@ -335,8 +339,8 @@ bool ini_configurator::put_profile_string(const astring &section,
     const astring &entry, const astring &to_store)
 {
   return bool(WritePrivateProfileString(to_unicode_temp(section),
-      entry.length() ? (flexichar *)to_unicode_temp(entry) : NIL,
-      to_store.length() ? (flexichar *)to_unicode_temp(to_store) : NIL,
+      entry.length() ? (flexichar *)to_unicode_temp(entry) : NULL_POINTER,
+      to_store.length() ? (flexichar *)to_unicode_temp(to_store) : NULL_POINTER,
       to_unicode_temp(name())));
 }
 
@@ -345,8 +349,8 @@ void ini_configurator::get_profile_string(const astring &section,
     flexichar *return_buffer, int buffer_size)
 {
   GetPrivateProfileString(section.length() ?
-      (flexichar *)to_unicode_temp(section) : NIL,
-      entry.length() ? (flexichar *)to_unicode_temp(entry) : NIL,
+      (flexichar *)to_unicode_temp(section) : NULL_POINTER,
+      entry.length() ? (flexichar *)to_unicode_temp(entry) : NULL_POINTER,
       to_unicode_temp(default_value),
       return_buffer, buffer_size, to_unicode_temp(name()));
 }