Details

[Home]

Issue of the Standard # S0357

Brief

Enabling or disabling meta characters does not influence the behaviour of keyname() function

Detailed Description

LSB 3.1 refers to SUSv2 (The Single UNIX Specification, Version 2) for the description of the libncurses functions. According to this standard for keyname() function, "the meta-character notation shown above is used only if meta-characters are enabled". But on the following example one may see that the result of keyname() function doesn't depend on whether the meta characters notation is on or off. But this behaviour doesn't contradict ncurses man pages, because there are no statements like "the meta-character notation shown above is used only if meta- characters are enabled".

#include <ncurses.h> int main(int argc, char* argv[]) { WINDOW * win; win = initscr(); mvprintw(3, 1, "meta off: %d", meta(win, false)); mvprintw(4, 1, "keyname() for %d: %s ", 180, keyname(180)); mvprintw(5, 1, "meta on: %d", meta(win, true)); mvprintw(6, 1, "keyname() for %d: %s ", 180, keyname(180)); slk_refresh(); getch(); endwin(); printf("\n"); return 0; }

Problem location(s) in the standard

Linux Standard Base Core Specification 3.1, Chapter 14. Utility Libraries, 14.5. Interfaces for libncurses.

References

No references to this problem found

Accepted

LSB Bugzilla, 1604

[Home]