changeset 282:8b6aba552f6f

Excise md_putchar(). The function wrapped the standard putchar(), doing nothing beside discarding the return value. That could cause problems with tputs(), which expects an int to be returned.
author John "Elwin" Edwards
date Mon, 18 Sep 2017 19:11:57 -0400
parents 4a3f4729257c
children d71e5e1f49cf
files arogue5/mdport.c arogue7/mdport.c rogue3/mdport.c rogue4/mdport.c rogue5/mdport.c srogue/mdport.c urogue/mdport.c
diffstat 7 files changed, 11 insertions(+), 53 deletions(-) [+]
line wrap: on
line diff
--- a/arogue5/mdport.c	Fri Sep 15 21:16:28 2017 -0400
+++ b/arogue5/mdport.c	Mon Sep 18 19:11:57 2017 -0400
@@ -120,17 +120,11 @@
 }
 
 #ifdef	attron
-# define	_puts(s)	tputs(s, 0, md_putchar);
+# define	_puts(s)	tputs(s, 0, putchar);
 # define	SO		enter_standout_mode
 # define	SE		exit_standout_mode
 #endif
 
-int
-md_putchar(int c)
-{
-    putchar(c);
-}
-
 static int md_standout_mode = 0;
 
 int
--- a/arogue7/mdport.c	Fri Sep 15 21:16:28 2017 -0400
+++ b/arogue7/mdport.c	Mon Sep 18 19:11:57 2017 -0400
@@ -95,17 +95,11 @@
 }
 
 #ifdef	attron
-# define	_puts(s)	tputs(s, 0, md_putchar);
+# define	_puts(s)	tputs(s, 0, putchar);
 # define	SO		enter_standout_mode
 # define	SE		exit_standout_mode
 #endif
 
-int
-md_putchar(int c)
-{
-    putchar(c);
-}
-
 static int md_standout_mode = 0;
 
 int
--- a/rogue3/mdport.c	Fri Sep 15 21:16:28 2017 -0400
+++ b/rogue3/mdport.c	Mon Sep 18 19:11:57 2017 -0400
@@ -282,12 +282,6 @@
 #endif
 }
 
-void
-md_putchar(int c)
-{
-    putchar(c);
-}
-
 #ifdef _WIN32
 static int md_standout_mode = 0;
 #endif
@@ -310,7 +304,7 @@
         md_standout_mode = 1;
     }
 #elif defined(SO)
-    tputs(SO,0,md_putchar);
+    tputs(SO,0,putchar);
     fflush(stdout);
 #endif
 }
@@ -333,7 +327,7 @@
         md_standout_mode = 0;
     }
 #elif defined(SE)
-    tputs(SE,0,md_putchar);
+    tputs(SE,0,putchar);
     fflush(stdout);
 #endif
 }
--- a/rogue4/mdport.c	Fri Sep 15 21:16:28 2017 -0400
+++ b/rogue4/mdport.c	Mon Sep 18 19:11:57 2017 -0400
@@ -119,12 +119,6 @@
 #endif
 }
 
-void
-md_putchar(int c)
-{
-    putchar(c);
-}
-
 static int md_standout_mode = 0;
 
 void
@@ -145,7 +139,7 @@
         md_standout_mode = 1;
     }
 #elif defined(SO)
-    tputs(SO,0,md_putchar);
+    tputs(SO,0,putchar);
     fflush(stdout);
 #endif
 }
@@ -168,7 +162,7 @@
         md_standout_mode = 0;
     }
 #elif defined(SE)
-    tputs(SE,0,md_putchar);
+    tputs(SE,0,putchar);
     fflush(stdout);
 #endif
 }
--- a/rogue5/mdport.c	Fri Sep 15 21:16:28 2017 -0400
+++ b/rogue5/mdport.c	Mon Sep 18 19:11:57 2017 -0400
@@ -278,12 +278,6 @@
 #endif
 }
 
-void
-md_putchar(int c)
-{
-    putchar(c);
-}
-
 #ifdef _WIN32
 static int md_standout_mode = 0;
 #endif
@@ -306,7 +300,7 @@
         md_standout_mode = 1;
     }
 #elif defined(SO)
-    tputs(SO,0,md_putchar);
+    tputs(SO,0,putchar);
     fflush(stdout);
 #endif
 }
@@ -329,7 +323,7 @@
         md_standout_mode = 0;
     }
 #elif defined(SE)
-    tputs(SE,0,md_putchar);
+    tputs(SE,0,putchar);
     fflush(stdout);
 #endif
 }
--- a/srogue/mdport.c	Fri Sep 15 21:16:28 2017 -0400
+++ b/srogue/mdport.c	Mon Sep 18 19:11:57 2017 -0400
@@ -278,12 +278,6 @@
 #endif
 }
 
-void
-md_putchar(int c)
-{
-    putchar(c);
-}
-
 #ifdef _WIN32
 static int md_standout_mode = 0;
 #endif
@@ -306,7 +300,7 @@
         md_standout_mode = 1;
     }
 #elif defined(SO)
-    tputs(SO,0,md_putchar);
+    tputs(SO,0,putchar);
     fflush(stdout);
 #endif
 }
@@ -329,7 +323,7 @@
         md_standout_mode = 0;
     }
 #elif defined(SE)
-    tputs(SE,0,md_putchar);
+    tputs(SE,0,putchar);
     fflush(stdout);
 #endif
 }
--- a/urogue/mdport.c	Fri Sep 15 21:16:28 2017 -0400
+++ b/urogue/mdport.c	Mon Sep 18 19:11:57 2017 -0400
@@ -110,17 +110,11 @@
 }
 
 #ifdef	attron
-# define	_puts(s)	tputs(s, 0, md_putchar);
+# define	_puts(s)	tputs(s, 0, putchar);
 # define	SO		enter_standout_mode
 # define	SE		exit_standout_mode
 #endif
 
-void
-md_putchar(int c)
-{
-    putchar(c);
-}
-
 static int md_standout_mode = 0;
 
 void