Browse code

Switched all output to stderr in uxncli

Andrew Alderwick authored on 14/07/2021 19:11:10
Showing 1 changed files
... ...
@@ -22,7 +22,7 @@ static Device *devconsole;
22 22
 static int
23 23
 error(char *msg, const char *err)
24 24
 {
25
-	printf("Error %s: %s\n", msg, err);
25
+	fprintf(stderr, "Error %s: %s\n", msg, err);
26 26
 	return 0;
27 27
 }
28 28
 
... ...
@@ -30,13 +30,13 @@ static void
30 30
 printstack(Stack *s)
31 31
 {
32 32
 	Uint8 x, y;
33
-	printf("\n\n");
33
+	fprintf(stderr, "\n\n");
34 34
 	for(y = 0; y < 0x08; ++y) {
35 35
 		for(x = 0; x < 0x08; ++x) {
36 36
 			Uint8 p = y * 0x08 + x;
37
-			printf(p == s->ptr ? "[%02x]" : " %02x ", s->dat[p]);
37
+			fprintf(stderr, p == s->ptr ? "[%02x]" : " %02x ", s->dat[p]);
38 38
 		}
39
-		printf("\n");
39
+		fprintf(stderr, "\n");
40 40
 	}
41 41
 }
42 42