[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2


unctrl Subroutine

Purpose

Generates a printable representation of a character.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>
 
char *unctrl
(chtype c);

Description

The unctrl subroutine generates a character string that is a printable representation of c. If c is a control character, it is converted to the ^X notation. If c contains rendition information, the effect is undefined.

Parameters


c  

Return Values

Upon successful completion, the unctrl subroutine returns the generated string. Otherwise, it returns a null pointer.

Examples

To display a printable representation of the newline character, enter:

char *new_line;
int my_character;
addstr ("Hit the enter key.");
my_character=getch();
new_line=unctrl (my_character);
printw (Newline=%s", new_line);
refresh();

This prints, "newline=^J".

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The keyname (keyname, key_name Subroutine) subroutine.

Curses Overview for Programming in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.

List of Curses Subroutines in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.

Manipulating Characters with Curses in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]