bug-ncurses
[Top][All Lists]
Advanced

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

Re: chgat() function does not work correctly after refresh()


From: Bryan Christ
Subject: Re: chgat() function does not work correctly after refresh()
Date: Fri, 18 May 2007 09:40:22 -0500
User-agent: Thunderbird 1.5.0.10 (X11/20070302)

are you sure that the terminal you are using supports A_BLINK? many terminals do not.

Alexey Miheev wrote:
LSB 3.1 refers to SUSv2 (The Single UNIX Specification, Version 2) for the
description of the libncurses functions.
According to the standard chgat() family of functions shall change renditions
of characters in a window.
But in the following code chgat() do nothing and renditions stay the
same. Note that if we will comment out first refresh() call then
everything is OK and renditions are changed. This behaviour seems to be
quite unpredictable from the documentation.


#include <ncurses.h>

int main(int argc, char *argv[])
{       initscr();                      /* Start curses mode            */
        start_color();                  /* Start color functionality    */
init_pair(1, COLOR_CYAN, COLOR_BLACK);
        printw("A Big string");
        refresh(); // IF THIS IS COMMENTED THEN EVERYTHING IS OK
        /*
* First two parameters specify the position at which to start * Third parameter number of characters to update. -1 means till * end of line * Forth parameter is the normal attribute you wanted to give * to the charcter
         * Fifth is the color index. It is the index given during init_pair()
         * use 0 if you didn't want color
* Sixth one is always NULL */
        mvchgat(0, 0, -1, A_BLINK, 1, NULL);
        refresh();
        getch();
        endwin();                       /* End curses mode                */
        return 0;
}

Regards, Alexey Miheev
Linux Verification Center, ISPRAS
web:    http://www.linuxtesting.org
e-mail: address@hidden




_______________________________________________
Bug-ncurses mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-ncurses




reply via email to

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