From b2fd60c1a471074814ad0a2761530383bc42e414 Mon Sep 17 00:00:00 2001
From: rofl0r <rofl0r@users.noreply.github.com>
Date: Mon, 19 Oct 2020 16:14:49 +0000
Subject: [PATCH] cal: fix invalid use of putp()

according to documentation, putp() is supposed to be only used with:
> ... a terminfo string variable or the return value from tparm, tgetstr, or
> tgoto.

for arbitrary strings, standard libc output routines need to be used.

this caused strings like "11 12 13"... to be truncated to "12 13" in the output
when built with netbsd-curses.
---
 misc-utils/cal.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/misc-utils/cal.c b/misc-utils/cal.c
index 0834be2bd..02ef690b7 100644
--- a/misc-utils/cal.c
+++ b/misc-utils/cal.c
@@ -110,12 +110,7 @@ static int setup_terminal(char *term
 
 static void my_putstring(const char *s)
 {
-#if defined(HAVE_LIBNCURSES) || defined(HAVE_LIBNCURSESW)
-	if (has_term)
-		putp(s);
-	else
-#endif
-		fputs(s, stdout);
+	fputs(s, stdout);
 }
 
 static const char *my_tgetstr(char *ss
-- 
2.25.0


