printf -> fprintf
authorClaus Gittinger <cg@exept.de>
Tue, 21 Aug 2001 11:27:53 +0200
changeset 3468 b7e913629327
parent 3467 66a720085cd7
child 3469 7e157b8e7a9e
printf -> fprintf
GLXWorkstation.st
ImageReader.st
XWorkstation.st
--- a/GLXWorkstation.st	Fri Aug 17 14:45:36 2001 +0200
+++ b/GLXWorkstation.st	Tue Aug 21 11:27:53 2001 +0200
@@ -550,7 +550,7 @@
 #endif
 
     if (setjmp(errorReturn)) {
-	printf("hard error in GL - return\n");
+	fprintf(stderr, "hard error in GL - return\n");
 #ifdef HAS_SIGACTION
 	sigaction(SIGSEGV, &oldSig, 0);
 #else
@@ -564,11 +564,11 @@
     __CONT__
 
     if (w <= 0) {
-	printf("GL: bad width: %d\n", w);
+	fprintf(stderr, "GL: bad width: %d\n", w);
 	w = 1;
     }
     if (h <= 0) {
-	printf("GL: bad height: %d\n", h);
+	fprintf(stderr, "GL: bad height: %d\n", h);
 	h = 1;
     }
 
@@ -584,7 +584,7 @@
 
       case GLXrgbSingleBuffer:
       case GLXrgbDoubleBuffer:
-	printf("Sorry, VGL can't support %s type of windows\n", typeToName[type]);
+	fprintf(stderr, "Sorry, VGL can't support %s type of windows\n", typeToName[type]);
 	__catchExit(0);
 	return 0;
     }
@@ -618,7 +618,7 @@
 #  endif
 
     if (i < 0) {
-	printf("GLXlink returned %d\n", i);
+	fprintf(stderr, "GLXlink returned %d\n", i);
 	__catchExit(0);
 	return 0;
     }
@@ -658,7 +658,7 @@
     XGetWindowAttributes(dpy, parent, &pwa);
     retconfig = GLXgetconfig(dpy, XScreenNumberOfScreen(pwa.screen), params);
     if (retconfig == 0) {
-	printf("Sorry, can't support %s type of windows\n", typeToName[type]);
+	fprintf(stderr, "Sorry, can't support %s type of windows\n", typeToName[type]);
 	__catchExit(0);
 	return 0;
     }
@@ -732,7 +732,7 @@
 #  endif
 
     if (i < 0) {
-	printf("GLXlink returned %d\n", i);
+	fprintf(stderr, "GLXlink returned %d\n", i);
 	__catchExit(0);
 	return 0;
     }
@@ -755,7 +755,7 @@
 			     CWBorderPixel, &cwa);
 
     vis = XGetVisualInfo(dpy, VisualScreenMask|VisualIDMask, &visual, &nret);
-printf("vis is %x\n", vis);
+    fprintf(stderr, "vis is %x\n", vis);
 #endif /* GLX || VGL */
 
     return win;
@@ -8800,5 +8800,5 @@
 !GLXWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.77 2000-07-02 12:55:42 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.78 2001-08-21 09:27:53 cg Exp $'
 ! !
--- a/ImageReader.st	Fri Aug 17 14:45:36 2001 +0200
+++ b/ImageReader.st	Tue Aug 21 11:27:53 2001 +0200
@@ -1743,8 +1743,8 @@
 	    if (--__nOut == 0) {
 #ifdef DEBUG
 		if (__outP >= outEnd) {
-		 printf("oops\n");
-		 goto fail;
+		    fprintf(stderr, "oops %d\n", __LINE__);
+		    goto fail;
 		}
 #endif
 		*__outP = __outBits;
@@ -1760,8 +1760,8 @@
 
 #ifdef DEBUG
 	    if (__outP >= outEnd) {
-	     printf("oops2\n");
-	     goto fail;
+		fprintf(stderr, "oops2 %d\n", __LINE__);
+	        goto fail;
 	    }
 #endif
 	    *__outP = __outBits;
@@ -2147,5 +2147,5 @@
 !ImageReader class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/ImageReader.st,v 1.73 2000-11-23 17:11:01 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/ImageReader.st,v 1.74 2001-08-21 09:27:53 cg Exp $'
 ! !
--- a/XWorkstation.st	Fri Aug 17 14:45:36 2001 +0200
+++ b/XWorkstation.st	Tue Aug 21 11:27:53 2001 +0200
@@ -219,7 +219,9 @@
 static unsigned INT lastResource = 0;
 
 static int __debug__ = 0;
+
 #define DPRINTF(x)      if (__debug__) { printf x; }
+
 %}
 ! !
 
@@ -512,7 +514,7 @@
 debugResources
 %{
 #ifdef COUNT_RESOURCES
-    printf("colors:%d bitmaps:%d views:%d gc:%d cursors:%d fonts:%d\n",
+    fprintf(stderr, "colors:%d bitmaps:%d views:%d gc:%d cursors:%d fonts:%d\n",
 	    __cnt_color, __cnt_bitmap,
 	    __cnt_view, __cnt_gc, __cnt_cursor, __cnt_font);
 #endif
@@ -1978,7 +1980,7 @@
 	if (XMatchVisualInfo(dpy, screen, depth, cls, &vi)) {
 	    visual.visualid = vi.visualid;
 /*
-	    printf("visualId=%x\n", vi.visualid);
+	    fprintf(stderr, "visualId=%x\n", vi.visualid);
 */
 	}
 	LEAVE_XLIB();
@@ -10231,7 +10233,7 @@
 
 	    default:
 		/* unsupported depth ? */
-		printf("possibly unsupported depth:%d in primGetBits\n", image->depth);
+		fprintf(stderr, "possibly unsupported depth:%d in primGetBits\n", image->depth);
 		numBytes = image->bytes_per_line * image->height;
 		break;
 	}
@@ -11574,6 +11576,6 @@
 !XWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.394 2001-08-17 12:45:36 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.395 2001-08-21 09:27:52 cg Exp $'
 ! !
 XWorkstation initialize!