[Scummvm-git-logs] scummvm master -> 81a8da05ff4d236a7faf16e2ebaa4370cd3d3f1d

aquadran noreply at scummvm.org
Wed Dec 8 17:29:31 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
81a8da05ff TINYGL: Replace stdio functions with debugstream


Commit: 81a8da05ff4d236a7faf16e2ebaa4370cd3d3f1d
    https://github.com/scummvm/scummvm/commit/81a8da05ff4d236a7faf16e2ebaa4370cd3d3f1d
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2021-12-08T18:29:25+01:00

Commit Message:
TINYGL: Replace stdio functions with debugstream

Changed paths:
    graphics/tinygl/list.cpp


diff --git a/graphics/tinygl/list.cpp b/graphics/tinygl/list.cpp
index 43abfd5ced..4f4b27ff71 100644
--- a/graphics/tinygl/list.cpp
+++ b/graphics/tinygl/list.cpp
@@ -26,10 +26,7 @@
  * It also has modifications by the ResidualVM-team, which are covered under the GPLv2 (or later).
  */
 
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-#define FORBIDDEN_SYMBOL_EXCEPTION_fprintf
-#define FORBIDDEN_SYMBOL_EXCEPTION_fputc
-#define FORBIDDEN_SYMBOL_EXCEPTION_stderr
+#include "common/streamdebug.h"
 
 #include "graphics/tinygl/zgl.h"
 
@@ -100,9 +97,10 @@ static GLList *alloc_list(GLContext *c, int list) {
 	return l;
 }
 
-static void gl_print_op(FILE *f, GLParam *p) {
+static void gl_print_op(GLParam *p) {
 	int op;
 	const char *s;
+	Common::StreamDebug debug = streamDbg();
 
 	op = p[0].op;
 	p++;
@@ -112,19 +110,19 @@ static void gl_print_op(FILE *f, GLParam *p) {
 			s++;
 			switch (*s++) {
 			case 'f':
-				fprintf(f, "%g", p[0].f);
+				debug << p[0].f;
 				break;
 			default:
-				fprintf(f, "%d", p[0].i);
+				debug << p[0].i;
 				break;
 			}
 			p++;
 		} else {
-			fputc(*s, f);
+			debug << *s;
 			s++;
 		}
 	}
-	fprintf(f, "\n");
+	debug << "\n";
 }
 
 void GLContext::gl_compile_op(GLParam *p) {
@@ -171,7 +169,7 @@ void GLContext::gl_add_op(GLParam *p) {
 		gl_compile_op(p);
 	}
 	if (print_flag) {
-		gl_print_op(stderr, p);
+		gl_print_op(p);
 	}
 }
 




More information about the Scummvm-git-logs mailing list