unix.c
changeset 529 39d3b5a074c4
parent 507 04b5403aaf6b
child 534 306bc86eb23e
equal deleted inserted replaced
528:4ad0a24ac69e 529:39d3b5a074c4
   417 	puts(str);
   417 	puts(str);
   418 }
   418 }
   419 
   419 
   420 void ShowOSErrorBox(const char *buf)
   420 void ShowOSErrorBox(const char *buf)
   421 {
   421 {
       
   422 #if defined(__APPLE__)
       
   423 	// this creates an error in the console and then opens the console.
       
   424 	// Colourcodes are not used in the console, so they are skipped here
       
   425 	fprintf(stderr, "Error: %s", buf);
       
   426 	system("/Applications/Utilities/Console.app/Contents/MacOS/Console");
       
   427 #else
       
   428 	// all systems, but OSX
   422 	fprintf(stderr, "\033[1;31mError: %s\033[0;39m\n", buf);
   429 	fprintf(stderr, "\033[1;31mError: %s\033[0;39m\n", buf);
   423 
       
   424 #if defined(__APPLE__)
       
   425 	// this opens the crash log opener script
       
   426 	system("./Crash_Log_Opener.app");
       
   427 #endif
   430 #endif
   428 }
   431 }
   429 
   432 
   430 int CDECL main(int argc, char* argv[])
   433 int CDECL main(int argc, char* argv[])
   431 {
   434 {