[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

putp in non-screen app

From: Charles Wilson
Subject: putp in non-screen app
Date: Fri, 20 Nov 2009 13:40:35 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/20090812 Thunderbird/ Mnenhy/

With --enable-sp-funcs, it appears that putp can't be used in non-screen
apps anymore (such as tput.exe).

This is because, when NCURSES_SP_FUNCS, putp is;

putp(const char *string)
    return NCURSES_SP_NAME(putp) (CURRENT_SCREEN, string);

So, to use putp, you need to call initscr() (and possibly various other
setup functions) when NCURSES_SP_FUNCS.  However, the man page for putp
only says you need to call setupterm().

Is this change in the behavior/requirements of putp intended (when
--enable-sp-funcs), or is this a bug?  If it is intended, then tput
needs the following change (or something similar):

--- progs/tput.c    2009-10-26 17:49:12.971112200 -0400
+++ progs/tput.c    2009-11-20 13:14:16.700000000 -0500
@@ -345,8 +345,7 @@ tput(int argc, char *argv[])

-       /* use putp() in order to perform padding */
-       putp(s);
+       tputs(s, 1, putchar);
        return exit_code(STRING, 0);
     return exit_code(STRING, 1);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]