Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ nthctype(3J) — NEWS-os 3.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ctype(3)

jctype(3J)

jstring(3J)

set_syscode(3J)

CHKCTYPE(3J)  —  UNIX Programmer’s Manual

NAME

chkctype, nthctype − character classification in string

SYNOPSIS

#include <jctype.h>

int chkctype(c, prev_ctype)
char c; int prev_ctype;

int nthctype(string, nbyte)
char ∗string; int nbyte;

DESCRIPTION

Chkctype retruns a character type of c according to prev_ctype indicating a type of character just before c.  Character types for prev_ctype and the return value may be one of the following constants:

#define CT_ASC  0/∗ ASCII character and the other 1-byte-code ∗/
#define CT_KJ1  1/∗ the first byte of 2-byte-code ∗/
#define CT_KJ2  2/∗ the second byte of 2-byte-code ∗/
#define CT_ILGL −1/∗ illegal character code ∗/

Nthctype returns a character type of string[nbyte].
If nbyte exceeds the length of string, this function returns
CT_ILGL; if nbyte is negative, it also returns CT_ILGL.

SEE ALSO

ctype(3), jctype(3J), jstring(3J), set_syscode(3J)

NEWS-OSRelease 3.3

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026