This document, titled "ULTRIX Guide to X/Open curses Screen Handling," is a manual for ULTRIX C programmers (Version 4.0 or higher).
Purpose: Its primary aim is to describe the X/Open curses library routines, explain their basic concepts, and demonstrate how to write screen-management programs for character-cell displays using these routines.
Key Content Areas:
- X/Open Curses Library: Introduces the library, defines core terms like Window, Screen, Terminal, and Subwindow, and explains how the library optimizes terminal-dependent functions, particularly screen updates and cursor movement. It details naming conventions for routines and the use of environment variables.
- Curses Routines: Categorizes and lists routines by function, including those for:
- Setting screen characteristics (attributes like highlighting).
- Manipulating windows (creating, deleting, moving).
- Adding and clearing characters/strings from windows.
- Refreshing the physical terminal screen.
- Handling input (reading characters and strings).
- Controlling input and output options (e.g.,
echo, cbreak, beep).
- Querying environment and terminal characteristics.
- Starting and ending curses programs (
initscr, endwin).
- Programming with Curses: Covers the essential elements for writing curses programs, including the
<cursesX.h> header file, data types (like WINDOW*, chtype), general constants (e.g., LINES, COLS), video attribute constants, and input constants for virtual keypads.
- Terminfo Database: Explains the
terminfo database, which the curses library uses to obtain detailed descriptions of various terminal types, allowing for terminal-independent screen management.
- Compiling and Restrictions: Provides instructions on compiling curses programs and discusses potential restrictions when developing applications for synchronous or networked asynchronous terminals, particularly concerning single-character input and character echoing.
- Comparison with BSD 4.2 Curses: A dedicated appendix outlines the differences between X/Open curses and the older BSD 4.2 curses routines, noting that X/Open curses offers additional features (like 8-bit data transparency and AT&T System V compatibility) while coexisting with BSD. It also provides guidance for converting BSD 4.2 programs to use X/Open routines and lists corresponding routines.
- Example Programs: Includes annotated C code examples to illustrate the practical application of curses routines in screen-management programs.
In essence, the guide serves as a comprehensive resource for C programmers to develop efficient, portable, and interactive screen-based applications on the ULTRIX operating system.