Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Release Notes for HP-UX 10.30: HP 9000 Computers > Chapter 7 Other Operating System and Subsystem Changes

Curses for 10.30

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

Features of X/Open Curses

The shared library libcurses.sl, linked to libxcurses.1, complies to the X/Open CAE specification for the curses library, X/Open Curses, Issue 4, Version 2 (XPG4v2).

Features of HP Curses

The legacy HP Curses library (libHcurses.sl or libHcurses.a) is not X/Open compliant.

Summary of Change to X/Open Curses

A number of API declarations are added and changed in the <curses.h> and <term.h> header files to comply to XPG4v2. As a result, no binary incompatibilities were introduced.

Changes:

  • The following changes introduce source incompatibilities for ANSI C and C++ users:

    • The prototype for the tparm API (declared in <term.h>) changed from

        extern char *tparm (char *, ...);

      to

        extern char *tparm (char *, long, long, long, long, long \
      long, long, long, long);

      To use the new prototypes, ANSI C users might have to change their parameter specifications and recompile. Alternatively, the old prototypes can still be used by defining __10_10_COMPAT_CODE to the preprocessor.

    • The APIs color_set and wcolor_set each added one parameter.

  • The following changes introduce source incompatibilities that might result in compiler errors for C++ users and warnings for ANSI C users:

    • a parameter formerly of type int was changed to type bool for the following APIs: clearok, intrflush, isendwin, keypad, leaveok, meta, nodelay, notimeout, scrollok, syncok, and use_env.

    • a parameter of type wint_t (*) (wint_t) was changed to type int (*) (int) in the API vid_puts.

  • X/Open Enhanced Curses features in the <curses.h> and <term.h> header files are available to applications only if _XOPEN_SOURCE_EXTENDED is defined to the preprocessor. X/Open applications that use data types, constants, or variables defined as Enhanced Curses features might encounter compilation errors if _XOPEN_SOURCE_EXTENDED is not defined. See the XPG4v2 specification or the white paper "Migrating HP Curses Applications to Xcurses" for detailed information.

  • Some APIs not specified by XPG4v2, but available in previous releases of HP-UX, have been retained as unsupported APIs. Using these features is not recommended because they are not supported by X/Open and they are not portable across other UNIX95 branded systems. X/Open applications that need these features must define __HP_CURSES_COMPAT to the preprocessor. See the white paper "Migrating HP Curses Applications to Xcurses" for detailed information.

  • It is no longer necessary to define _XOPEN_SOURCE_EXTENDED to include the basic X/Open Curses sections of <curses.h> and <term.h>. If no Enhanced Curses features are needed, you should instead define _XOPEN_SOURCE. _XOPEN_SOURCE_EXTENDED should be defined to make use of X/Open Enhanced Curses features.

  • Applications can force inclusion of functions rather than macros for many APIs by defining NOMACROS to the preprocessor (this switch existed in previous releases, but was undocumented).

  • C++ compilers that implement bool as an internal keyword are not compatible with this implementation of X/Open curses.

Summary of Change for HP Curses

Header files for the HP Curses library (libHcurses.sl or libHcurses.a) have been moved to:

/usr/old/usr/include/curses.h
/usr/old/usr/include/term.h

HP Curses applications can make use of these header files by

  • including them directly (the recommended approach):

    #include "/usr/old/usr/include/curses.h"
  • defining __HP_CURSES to the preprocessor:

    cc -D__HP_CURSES foo.c -lHcurses

Impact on X/Open Curses: Compliance to X/Open Curses, Issue 4, Version 2

API prototype declarations

X/Open applications that use the old prototypes for tparm, color_set, or wcolor_set will encounter a compilation error in ANSI-C mode if __10_10_COMPAT_CODE is not defined to the preprocessor.

X/Open Enhanced Curses features

X/Open applications that use constants and variables defined as X/Open Enhanced Curses features and those that refer to the address of APIs defined as X/Open Enhanced Curses features will encounter a compilation error if _XOPEN_SOURCE_EXTENDED is not defined to the preprocessor.

Features not defined in XPG4v2

X/Open applications that use constants and variables that are not defined in XPG4v2 and those that refer to the addresses of APIs that are not defined by XPG4v2 2 will encounter a compilation error if __HP_CURSES_COMPAT is not defined to the preprocessor.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997, Hewlett-Packard Development Company, L.P.