aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source/flsupport.cpp
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-08-05 02:37:17 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-08-05 02:37:17 +0000
commit5aeb36ec9e7aaee34ce8f5f248029d39047e2918 (patch)
tree627801939dd1880c0e84054513940ba80dc06b03 /externals/grill/flext/source/flsupport.cpp
parent0dee5b7f542c44e30c7c5f33852c23262655fe2c (diff)
""
svn path=/trunk/; revision=823
Diffstat (limited to 'externals/grill/flext/source/flsupport.cpp')
-rw-r--r--externals/grill/flext/source/flsupport.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/externals/grill/flext/source/flsupport.cpp b/externals/grill/flext/source/flsupport.cpp
index 14b9bea5..b27196b8 100644
--- a/externals/grill/flext/source/flsupport.cpp
+++ b/externals/grill/flext/source/flsupport.cpp
@@ -174,6 +174,7 @@ int flext::Int2Bits(unsigned long n)
return b;
}
+
void flext::post(const char *fmt, ...)
{
#ifdef FLEXT_THREADS
@@ -182,9 +183,15 @@ void flext::post(const char *fmt, ...)
#endif
va_list ap;
va_start(ap, fmt);
+#if FLEXT_SYS == FLEXT_SYS_MAX
+ char buf[1024]; // \TODO this is quite unsafe.....
+ vsprintf(buf, fmt, ap);
+ ::post(buf);
+#else
vfprintf(stderr, fmt, ap);
+ ::post("");
+#endif
va_end(ap);
- putc('\n', stderr);
#ifdef FLEXT_THREADS
mutex.Unlock();
#endif
@@ -198,10 +205,17 @@ void flext::error(const char *fmt,...)
#endif
va_list ap;
va_start(ap, fmt);
+#if FLEXT_SYS == FLEXT_SYS_MAX
+ char buf[1024]; // \TODO this is quite unsafe.....
+ sprintf(buf,"error: ");
+ vsprintf(buf+7, fmt, ap);
+ ::post(buf);
+#else
fprintf(stderr, "error: ");
vfprintf(stderr, fmt, ap);
+ ::post("");
+#endif
va_end(ap);
- putc('\n', stderr);
#ifdef FLEXT_THREADS
mutex.Unlock();
#endif