[Simh] [PATCH 11 of 14] sim_printf_log() changes for Ibm1130

Peter Lund firefly at vax64.dk
Mon Sep 10 17:09:45 EDT 2007


1 file changed, 8 insertions(+), 12 deletions(-)
Ibm1130/ibm1130_gui.c |   20 ++++++++------------


# HG changeset patch
# User Peter Lund <firefly at vax64.dk>
# Date 1189306613 -7200
# Node ID 927436e7e39957a2862a76b65613700882cb8907
# Parent  ad6458771e5d063753b811b5269d9eb20ed04d11
sim_printf_log() changes for Ibm1130

diff -r ad6458771e5d -r 927436e7e399 Ibm1130/ibm1130_gui.c
--- a/Ibm1130/ibm1130_gui.c	Sun Sep 09 04:56:31 2007 +0200
+++ b/Ibm1130/ibm1130_gui.c	Sun Sep 09 04:56:53 2007 +0200
@@ -32,6 +32,7 @@
 
 #include "ibm1130_defs.h"
 #include "ibm1130res.h"
+#include "sim_console.h"
 
 #define UPDATE_BY_TIMER
 
@@ -93,7 +94,6 @@ DEVICE console_dev = {
 /* reset for the "console" display device  */
 
 extern char *read_line (char *cptr, int size, FILE *stream);
-extern FILE *sim_log;
 extern DEVICE *find_unit (char *cptr, UNIT **uptr);
 
 extern UNIT cr_unit;									/* pointers to 1442 and 1132 (1403) printers */
@@ -115,7 +115,7 @@ extern UNIT prt_unit;
 	void   stuff_cmd (char *cmd) 				  				{}
 	t_bool stuff_and_wait (char *cmd, int timeout, int delay)	{return FALSE;}
 	char  *read_cmdline (char *ptr, int size, FILE *stream)		{return read_line(ptr, size, stream);}
-	void   remark_cmd (char *remark)			  				{printf("%s\n", remark); if (sim_log) fprintf(sim_log, "%s\n", remark);}
+	void   remark_cmd (char *remark)			  				{sim_printf_log("%s\n", remark);}
 #else
 
 t_stat console_reset (DEVICE *dptr)
@@ -1566,8 +1566,7 @@ char *read_cmdline (char *ptr, int size,
 		;
 
 	if (scp_stuffed) {										/* stuffed command needs to be echoed */
-		printf("%s\n", cptr);
-		if (sim_log) fprintf(sim_log, "%s\n", cptr);
+		sim_printf_log("%s\n", cptr);
 	}
 
 	return cptr;
@@ -1640,16 +1639,13 @@ void remark_cmd (char *remark)
 void remark_cmd (char *remark)
 {
 	if (scp_reading) {
-		putchar('\n');
-		if (sim_log) putc('\n', sim_log);
-	}
-
-	printf("%s\n", remark);
-	if (sim_log) fprintf(sim_log, "%s\n", remark);
+		sim_printf_log("\n");
+	}
+
+	sim_printf_log("%s\n", remark);
 
 	if (scp_reading) {
-		printf("sim> ");
-		if (sim_log) fprintf(sim_log, "sim> ");
+		sim_printf_log("sim> ");
 	}
 }
 



More information about the Simh mailing list