From 56e2c16aa7c505f0b718a67427a39a7650264287 Mon Sep 17 00:00:00 2001 From: izydorst Date: Thu, 1 May 2003 16:22:53 +0000 Subject: [PATCH] making *p*error.c conform to standard (a bit, in a way) git-svn-id: svn://svn.cc65.org/cc65/trunk@2106 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/geos/common/_poserror.c | 8 ++++++-- libsrc/geos/common/perror.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/libsrc/geos/common/_poserror.c b/libsrc/geos/common/_poserror.c index 80f9eda06..d81826e60 100644 --- a/libsrc/geos/common/_poserror.c +++ b/libsrc/geos/common/_poserror.c @@ -11,7 +11,11 @@ void __fastcall__ _poserror (const char* msg) { + const char *errmsg = _stroserror(_oserror); - DlgBoxOk(msg,_stroserror(_oserror)); - + if (msg && *msg) { + DlgBoxOk(msg, errmsg); + } else { + DlgBoxOk("", errmsg); + } } diff --git a/libsrc/geos/common/perror.c b/libsrc/geos/common/perror.c index 07309b789..d3ec6739c 100644 --- a/libsrc/geos/common/perror.c +++ b/libsrc/geos/common/perror.c @@ -11,7 +11,11 @@ void __fastcall__ perror(const char* msg) { + const char *errmsg = strerror(errno); - DlgBoxOk(msg,strerror(errno)); - + if (msg && *msg) { + DlgBoxOk(msg, errmsg); + } else { + DlgBoxOk("", errmsg); + } } -- 2.39.5