X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Flibrary%2Floggers%2Fcritical_events.cpp;h=ce955274fb569231360676ccc5637453bdb47a2e;hb=d10cb14bfbbe0014b573afca07dc206faa33f208;hp=79f872616d7bd819555971b8c674b3d55ca498cc;hpb=5a8e13e7a44ed98d9683bc6cd3bb374e9d3b0756;p=feisty_meow.git diff --git a/nucleus/library/loggers/critical_events.cpp b/nucleus/library/loggers/critical_events.cpp index 79f87261..ce955274 100644 --- a/nucleus/library/loggers/critical_events.cpp +++ b/nucleus/library/loggers/critical_events.cpp @@ -26,9 +26,7 @@ #include #include -#ifndef _MSC_VER - #include -#endif +#include using namespace basis; using namespace structures; @@ -56,8 +54,8 @@ basis::un_int critical_events::system_error() { #if defined(__UNIX__) || defined(__GNU_WINDOWS__) return errno; -#elif defined(_MSC_VER) - return GetLastError(); +//#elif defined(_MSC_VER) +// return GetLastError(); #else #pragma error("hmmm: no code for error number for this operating system") return 0; @@ -68,17 +66,19 @@ astring critical_events::system_error_text(basis::un_int to_name) { #if defined(__UNIX__) || defined(__GNU_WINDOWS__) return strerror(to_name); +/* #elif defined(_MSC_VER) char error_text[1000]; - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NIL, to_name, + FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL_POINTER, to_name, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)error_text, - sizeof(error_text) - 1, NIL); + sizeof(error_text) - 1, NULL_POINTER); astring to_return = error_text; // trim off the ridiculous carriage return they add. while ( (to_return[to_return.end()] == '\r') || (to_return[to_return.end()] == '\n') ) to_return.zap(to_return.end(), to_return.end()); return to_return; +*/ #else #pragma error("hmmm: no code for error text for this operating system") return ""; @@ -141,7 +141,7 @@ void critical_events::alert_message(const char *info, const char *title) to_print += info; program_wide_logger::get().log(to_print, ALWAYS_PRINT); - fflush(NIL); // flush all output streams. + fflush(NULL_POINTER); // flush all output streams. } void critical_events::alert_message(const astring &info) { alert_message(info.s()); }