Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ctype(3)

chkctype(3J)

jstring(3J)

setlocale(3)

JCTYPE(3J)  —  NEWS-OS Programmer’s Manual

NAME

jiszen, jisl0, jisl1, jisl2, jisalpha, jisupper, jislower, jisdigit, jiskata, jishira, jiskigou, jisspace, jtolower, jtoupper, jtohira, jtokata, zen2han, han2zen, euc2jis, euc2kuten, euc2sjis, jis2euc, jis2kuten, jis2sjis, kuten2euc, kuten2jis, kuten2sjis, sjis2euc, sjis2jis, sjis2kuten − Japanese character predicates and utility functions

SYNOPSIS

#include <jctype.h>

jiszen(c)
.....

DESCRIPTION

These functions are supplements of ctype(3) for Japanese processing.  All arguments must be unsigned short type. 

Return values are int type for the following functions, nonzero for true or zero for false is returned. 
You can use these functions for either Shift-JIS code or EUC after calling setlocale(LC_CTYPE, ""). 
In the following description, zenkaku means JIS X 0208−1983 kanji code.

jiszen c is a zenkaku moji (iskanji(c >> 8) && iskanji2(c & 0xff)). 

jisl0 c is from zenkaku space and just before the first kanji character. 

jisl1 c is a level-1 JIS kanji. 

jisl2 c is a level-2 JIS kanji (JIS X 0208-1983). 

jisalpha c is zenkaku alphabet. 

jisupper c is a zenkaku upper case alphabet. 

jislower c is a zenkaku lower case alphabet. 

jisdigit c is a zenkaku numeric. 

jiskata c is a zenkaku katakana. 

jishira c is a zenkaku hiragana. 

jiskigou c is a zenkaku punctuation character.  Ruled line elements are not included. 

jisspace c is a zenkaku space. 

Return values are  unsigned short type for the following functions. These functions return the argument c itself when the conversion fails. 
You can use these functions for either Shift-JIS code or EUC after calling setlocale(LC_CTYPE, ""). 

jtolower converts zenkaku upper to zenkaku lower case. 

jtoupper converts zenkaku lower to zenkaku upper case. 

jtohira converts zenkaku katakana to zenkaku hiragana. 

jtokata converts zenkaku hiragana to zenkaku katakana. 

zen2han converts zenkaku corresponding to ASCII to normal(hankaku) ASCII. 

han2zen converts normal(hankaku) ASCII to zenkaku corresponding to ASCII. 

The following functions convert the given argument into the equivalant code of another code system.  Kuten code is the value of ((KU << 8) | TEN).  Return values are  unsigned short type.  These functions return zero if the argument is illegal. 

|  JIS kutenShift-JIS  EUC

EUC| euc2jiseuc2kuteneuc2sjis   ∗
Shift-JIS| sjis2jissjis2kuten   ∗sjis2euc
kuten| kuten2jis   ∗kuten2sjiskuten2euc
JIS|    ∗jis2kutenjis2sjisjis2euc

SEE ALSO

ctype(3), chkctype(3J), jstring(3J), setlocale(3)

NEWS-OSRelease 4.1C

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