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.
This commit is contained in:
John "Elwin" Edwards 2017-09-18 19:11:57 -04:00
parent 3349419ebc
commit 0936c8f216
7 changed files with 11 additions and 53 deletions

View file

@ -120,17 +120,11 @@ md_hasclreol(void)
} }
#ifdef attron #ifdef attron
# define _puts(s) tputs(s, 0, md_putchar); # define _puts(s) tputs(s, 0, putchar);
# define SO enter_standout_mode # define SO enter_standout_mode
# define SE exit_standout_mode # define SE exit_standout_mode
#endif #endif
int
md_putchar(int c)
{
putchar(c);
}
static int md_standout_mode = 0; static int md_standout_mode = 0;
int int

View file

@ -95,17 +95,11 @@ md_init(void)
} }
#ifdef attron #ifdef attron
# define _puts(s) tputs(s, 0, md_putchar); # define _puts(s) tputs(s, 0, putchar);
# define SO enter_standout_mode # define SO enter_standout_mode
# define SE exit_standout_mode # define SE exit_standout_mode
#endif #endif
int
md_putchar(int c)
{
putchar(c);
}
static int md_standout_mode = 0; static int md_standout_mode = 0;
int int

View file

@ -282,12 +282,6 @@ md_hasclreol(void)
#endif #endif
} }
void
md_putchar(int c)
{
putchar(c);
}
#ifdef _WIN32 #ifdef _WIN32
static int md_standout_mode = 0; static int md_standout_mode = 0;
#endif #endif
@ -310,7 +304,7 @@ md_raw_standout(void)
md_standout_mode = 1; md_standout_mode = 1;
} }
#elif defined(SO) #elif defined(SO)
tputs(SO,0,md_putchar); tputs(SO,0,putchar);
fflush(stdout); fflush(stdout);
#endif #endif
} }
@ -333,7 +327,7 @@ md_raw_standend(void)
md_standout_mode = 0; md_standout_mode = 0;
} }
#elif defined(SE) #elif defined(SE)
tputs(SE,0,md_putchar); tputs(SE,0,putchar);
fflush(stdout); fflush(stdout);
#endif #endif
} }

View file

@ -119,12 +119,6 @@ md_hasclreol(void)
#endif #endif
} }
void
md_putchar(int c)
{
putchar(c);
}
static int md_standout_mode = 0; static int md_standout_mode = 0;
void void
@ -145,7 +139,7 @@ md_raw_standout(void)
md_standout_mode = 1; md_standout_mode = 1;
} }
#elif defined(SO) #elif defined(SO)
tputs(SO,0,md_putchar); tputs(SO,0,putchar);
fflush(stdout); fflush(stdout);
#endif #endif
} }
@ -168,7 +162,7 @@ md_raw_standend(void)
md_standout_mode = 0; md_standout_mode = 0;
} }
#elif defined(SE) #elif defined(SE)
tputs(SE,0,md_putchar); tputs(SE,0,putchar);
fflush(stdout); fflush(stdout);
#endif #endif
} }

View file

@ -278,12 +278,6 @@ md_hasclreol(void)
#endif #endif
} }
void
md_putchar(int c)
{
putchar(c);
}
#ifdef _WIN32 #ifdef _WIN32
static int md_standout_mode = 0; static int md_standout_mode = 0;
#endif #endif
@ -306,7 +300,7 @@ md_raw_standout(void)
md_standout_mode = 1; md_standout_mode = 1;
} }
#elif defined(SO) #elif defined(SO)
tputs(SO,0,md_putchar); tputs(SO,0,putchar);
fflush(stdout); fflush(stdout);
#endif #endif
} }
@ -329,7 +323,7 @@ md_raw_standend(void)
md_standout_mode = 0; md_standout_mode = 0;
} }
#elif defined(SE) #elif defined(SE)
tputs(SE,0,md_putchar); tputs(SE,0,putchar);
fflush(stdout); fflush(stdout);
#endif #endif
} }

View file

@ -278,12 +278,6 @@ md_hasclreol(void)
#endif #endif
} }
void
md_putchar(int c)
{
putchar(c);
}
#ifdef _WIN32 #ifdef _WIN32
static int md_standout_mode = 0; static int md_standout_mode = 0;
#endif #endif
@ -306,7 +300,7 @@ md_raw_standout(void)
md_standout_mode = 1; md_standout_mode = 1;
} }
#elif defined(SO) #elif defined(SO)
tputs(SO,0,md_putchar); tputs(SO,0,putchar);
fflush(stdout); fflush(stdout);
#endif #endif
} }
@ -329,7 +323,7 @@ md_raw_standend(void)
md_standout_mode = 0; md_standout_mode = 0;
} }
#elif defined(SE) #elif defined(SE)
tputs(SE,0,md_putchar); tputs(SE,0,putchar);
fflush(stdout); fflush(stdout);
#endif #endif
} }

View file

@ -110,17 +110,11 @@ md_hasclreol()
} }
#ifdef attron #ifdef attron
# define _puts(s) tputs(s, 0, md_putchar); # define _puts(s) tputs(s, 0, putchar);
# define SO enter_standout_mode # define SO enter_standout_mode
# define SE exit_standout_mode # define SE exit_standout_mode
#endif #endif
void
md_putchar(int c)
{
putchar(c);
}
static int md_standout_mode = 0; static int md_standout_mode = 0;
void void