Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Determines whether a character is a control character.

Files

lib_ascii.h/lib_ascii.c

Prototypes

          ASCII_IS_CTRL(c);
           
          CPU_BOOLEAN  ASCII_IsCtrl (CPU_CHAR  c);

Arguments

c

Character to examine.

Returned Value

DEF_YES,

if character is a control character;

DEF_NO,

if character is not a control character.

Required Configuration

None.

Notes / Warnings

ISO/IEC 9899:TC2, Section 7.4.1.4.(2) states that “iscntrl() ... tests for any control character”. ISO/IEC 9899:TC2, Section 7.4.(3), Note 169, states that in “the seven-bit US ASCII character set, ... the control characters are those whose values lie from 0 (NUL) through 0x1F (US), and the character 0x7F (DEL)”.

Example Usage

          CPU_CHAR     c;
          CPU_BOOLEAN  ctrl;
           
          c    = ASCII_CHAR_DELETE;
          ctrl = ASCII_IS_CTRL(c);
  • No labels