2001-07-15 16:09:50 +00:00
|
|
|
/*
|
|
|
|
* perror.c
|
|
|
|
*
|
|
|
|
* Maciej 'YTM/Elysium' Witkowiak, 15.07.2001
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <geos.h>
|
|
|
|
|
2003-04-25 16:43:06 +00:00
|
|
|
void __fastcall__ perror(const char* msg)
|
2001-07-15 16:09:50 +00:00
|
|
|
{
|
2003-05-01 16:22:53 +00:00
|
|
|
const char *errmsg = strerror(errno);
|
2001-07-15 16:09:50 +00:00
|
|
|
|
2004-01-02 23:28:00 +00:00
|
|
|
ExitTurbo();
|
2003-05-01 16:22:53 +00:00
|
|
|
if (msg && *msg) {
|
2013-05-09 11:56:54 +00:00
|
|
|
DlgBoxOk(msg, errmsg);
|
2003-05-01 16:22:53 +00:00
|
|
|
} else {
|
2013-05-09 11:56:54 +00:00
|
|
|
DlgBoxOk("", errmsg);
|
2003-05-01 16:22:53 +00:00
|
|
|
}
|
2001-07-15 16:09:50 +00:00
|
|
|
}
|