SerialPort.st
changeset 1839 c10cd58ec334
parent 1599 7c2c8f7233bd
child 1846 3be8e3d770f0
--- a/SerialPort.st	Thu Jan 18 16:16:27 2007 +0100
+++ b/SerialPort.st	Wed Jan 24 16:12:17 2007 +0100
@@ -66,11 +66,9 @@
 #endif
 
 #ifdef DEBUG
-# define DBGPRINTF(x)    { if (__debugging__) printf x; }
-# define DBGFPRINTF(x)   { if (__debugging__) fprintf x; }
+# define DBGPRINTF(x)    { if (__debugging__) console_printf x; }
 #else
 # define DBGPRINTF(x)    /* as nothing */
-# define DBGFPRINTF(x)   /* as nothing */
 #endif
 
 #ifndef TRUE
@@ -489,7 +487,7 @@
 	   );
 
     if (port == INVALID_HANDLE_VALUE) {
-	fprintf(stderr, "Win32OS [info]: serial port open failed\n");
+	console_fprintf(stderr, "Win32OS [info]: serial port open failed\n");
 	errorNumber = __mkSmallInteger( __WIN32_ERR(GetLastError()) );
 	errorSymbol = @symbol(openFailed);
 	goto getOutOfhere;
@@ -559,7 +557,7 @@
     }
 
     if (! SetCommState(port, &dcb)) {
-	fprintf(stderr, "Win32OS [info]: serial port comm-setup failed\n");
+	console_fprintf(stderr, "Win32OS [info]: serial port comm-setup failed\n");
 	errorNumber = __mkSmallInteger( __WIN32_ERR(GetLastError()) );
 	goto errExit;
     }
@@ -577,7 +575,7 @@
     fp = fdopen(port, "r+");
 # endif
     if (! fp) {
-	fprintf(stderr, "Win32OS [info]: fdopen failed\n");
+	console_fprintf(stderr, "Win32OS [info]: fdopen failed\n");
 	errorNumber = __MKSMALLINT(errno);
     errExit: ;
 	CloseHandle(port);
@@ -635,5 +633,5 @@
 !SerialPort class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/SerialPort.st,v 1.6 2006-02-03 11:19:41 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/SerialPort.st,v 1.7 2007-01-24 15:12:15 cg Exp $'
 ! !