[Gridflow-cvs] [svn] commit: r5441 - /trunk/src/classes2.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Thu Apr 15 16:55:07 EDT 2010


Author: matju
Date: Thu Apr 15 16:55:05 2010
New Revision: 5441

Log:
fix libc warning in [parallel_port]

Modified:
    trunk/src/classes2.cxx

Modified: trunk/src/classes2.cxx
==============================================================================
--- trunk/src/classes2.cxx (original)
+++ trunk/src/classes2.cxx Thu Apr 15 16:55:05 2010
@@ -867,10 +867,11 @@
 	\decl 0 float (float x);
 	\decl 0 bang ();
 };
+#define FRAISE(funk,f) RAISE("can't "funk": %s",ferror(f));
 \def 0 float (float x) {
   uint8 foo = (uint8) x;
-  fwrite(&foo,1,1,f);
-  fflush(f);
+  if (fwrite(&foo,1,1,f)<1) FRAISE(fwrite,f);
+  if (!fflush(f)<0)         FRAISE(fflush,f);
 }
 void ParallelPort_call(ParallelPort *self) {self->call();}
 void ParallelPort::call() {



More information about the Gridflow-cvs mailing list