Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ set_syscode(3J) — NEWS-os 3.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(3J)

ctype(3)

jctype(3J)

jstring(3J)

chkctype(3J)

isttype(3J)

regex(3)

SET_SYSCODE(3J)  —  UNIX Programmer’s Manual

NAME

set_syscode − set character code of library

SYNOPSIS

extern int _sys_code;
k = set_syscode(s)
int k; char ∗s;

extern int _sys_kanji;
k = set_syskanji(s);
int k; char ∗s;

DESCRIPTION

Set_syscode sets the character code of library to shift JIS code, EUC or ISO 8859-1.  The system default is ISO 8859-1. 

When s == "sjis", set_syscode will set the code to shift JIS code.  When s == "euc", set_syscode will set the code to EUC.  When s == "ascii", it will be set to ISO 8859-1. 
When s == 0 and the value of environment variable TTYPE is ascii, the code will be set to ISO 8859-1.
When s == 0 and the value of environment variable TTYPE is jis, euc or sjis, set_syscode will be set to EUC if the value of environment variable SYS_CODE is euc, and will be set to shift JIS code unless the value of environment variable SYS_CODE is euc.
When the mode is set to ISO 8859-1: _sys_code == 2.
When the mode is set to EUC: _sys_code == 1.
When the mode is set to shift JIS code: _sys_code == 0.
The return value ,k , will be the value of _sys_code.

The macros and functions whose operations change depending on set_syscode() are given below:
iskana(), iskanji(), iskanji2(), is2byte(), jiszen(), jisl0(), jisl1(), jisl2(), jisalpha(), jisupper(), jislower(), jisdigit(), jiskata(), jishira(), jiskigou(), jisspace(), jtolower(), jtoupper(), jtohira(), jtokata(), zen2han(), han2zen() jstrncat(), jstrrcmp(), jstrncmp(), jstrncpy(), jstrlen(), jindex(), jrindex(), jstrtok(), jstradv(), jstrmatch(), jstrskip(), chkctytpe(), nthctype(), btom(), mtob() re_comp(), re_exec()

The macros and functions that are not affected by set_syscode() are given below:
iskana2(), iskpun(), iskmoji(), issjis1(), issjis2(), isjis(), iseuc(), iseuckana() euc2sjis(), euc2jis(), euc2kuten(), sjis2euc(), sjis2jis(), sjis2kuten(), jis2euc(), jis2sjis(), jis2kuten(), kuten2euc(), kuten2sjis(), kuten2jis(), isttype()

For the compatibility with the OS version before NEWS-OS 3.3, _set_syskanji()’ and ‘_sys_kanji’ are still used.  Each is equal to ‘set_syscode()’ and ‘_sys_code’. 

NOTICE

set_syskanji() and _sys_kanji are remained for the compativility from the NEWS-OS 3.2 and before.  Each is the same as set_syscode() and _sys_code. 
If the environment variable SYS_CODE does not exist, the value of SYS_KANJI will be taken.

SEE ALSO

intro(3J), ctype(3), jctype(3J), jstring(3J),
chkctype(3J), isttype(3J), regex(3)

FILES

/usr/include/ctype.h
/usr/include/jctype.h
/usr/include/jstrings.h
/usr/include/ttype.h

NEWS-OSRelease 3.3

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