Strictly speaking, you cannot do your assignment using only POSIX. Likewise, X/Open Curses does not overlap much with ECMA-48: the form and content of escape sequences are not detailed in that document. ECMA-48: Control Functions for Coded Character SetsĪs a rule, POSIX does not overlap much with other standards (you will find most exceptions to that rule versus the C standard). Escape sequences are standardized in ECMA-48: However, neither curses nor ANSI escape sequences are part of POSIX. But you are not likely to encounter that on an assignment using "POSIX", and in any case, you can accomplish the same goal, using a slightly different vocabulary. On some platforms you may encounter a version of tput which uses termcap names rather than terminfo. Most of the platforms which you use provide an implementation of X/Open Curses. The program will retrieve any value from the terminal database. If the attribute is of type boolean, tput simply sets the exit statuħ326 (0 for TRUE if the terminal has the capability, 1 for FALSE if it does not), and produces n Thħ324 tput utility outputs a string if the capability attribute (capname) is of type string, or an integer iħ325 the attribute is of type integer. Quoting from the description in X/Open Curses: 7319 When XCURSES is supported, this description for the tput utility replaces that in the XCħ321 The tput utility uses the terminfo database to make the values of terminal-dependenħ322 capabilities and information available to the shell (see sh in the XCU specification) to clearħ323 initialize, or reset the terminal or to return the long name of the requested terminal type. There appears to be no direct link to an HTML version of the latter (in particular the command-line tput), but it is more detailed (about twice as long).
0 Comments
Leave a Reply. |