[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 2

_lazySetErrorHandler Subroutine

Purpose

Installs an error handler into the lazy loading runtime system for the current process.

Library

Curses Library (libcurses.a)

Syntax

#include <sys/ldr.h>
#include <sys/errno.h>
typedef void *handler_t
char *module;
char *symbol;
unsigned int errval;
handler_t *_lazySetErrorHandler
handler_t *err_handler;

Description

This function allows a process to install a custom error handler to be called when a lazy loading reference fails to find the required module or function. This function should only be used when the main program or one of its dependent modules was linked with the -blazy option. To call _lazySetErrorHandler from a module that is not linked with the -blazy option, you must use the -lrtl option. If you use -blazy, you do not need to specify -lrtl.

This function is not thread safe. The calling program should ensure that _lazySetErrorHandler is not called by multiple threads at the same time.

The user-supplied error handler may print its own error message, provide a substitute function to be used in place of the called function, or call longjmp subroutine. To provide a substitute function that will be called instead of the orginally referenced function, the error handler should return a pointer

Parameters

Column Specifies the horizontal position to move the logical cursor to before getting the character.
Line Specifies the vertical position to move the logical cursor to before getting the character.
Window Identifies the window to get the character from and echo it into.

Return Values

Upon completion, the character code for the data key or one of the following values is returned:

KEY_xxxx The keypad subroutine is set to TRUE and a control key was recognized. See the curses. h file for a complete list of the key codes that can be returned.

Examples

  1. To get a character and echo it to the stdscr, use:
    mvgetch();
  2. To get a character and echo it into stdscr at the coordinates y=20 , x=30 , use:
    mvgetch(20, 30);
  3. To get a character and echo it into the user-defined window my_window at coordinates y=20 , x=30 , use:
    WINDOW *my_window;
    mvwgetch(my_window, 20, 30);

Implementation Specifics

These subroutines are part of Base Operating System (BOS) Runtime.

Related Information

The keypad subroutine, meta subroutine, nodelay subroutine, echo or noecho subroutine,notimeout subroutine, ebreak or nocbreak subroutine.

Curses Overview for Programming in AIX General Programming Concepts: Writing and Debugging Programs.

Manipulating Characters with Curses in AIX General Programming Concepts: Writing and Debugging Programs.

List of Curses Subroutines in AIX General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Contents | Glossary | Home | Search ]