Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ set_syscode(3J) — NEWS-os 4.1C

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(3J)

ctype(3)

jctype(3J)

jstring(3J)

chkctype(3J)

isttype(3J)

regex(3)

setlocale(3)

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

NAME

set_syscode − set character code of library

SYNOPSIS

#include <ctype.h>
extern int _sys_code;
k = set_syscode(s)
int k; char ∗s;

DESCRIPTION

Set_syscode sets the character code of library to Shift-JIS code, EUC, ISO 8859-1, or TCA(Taiwan code).  The system default is Shift-JIS. 

When s = 0, it will call setlocale(LC_CTYPE, "").
When s = "euc", it will call setlocale(LC_CTYPE, "ja_JP.EUC").
When s = "ascii", it will call setlocale(LC_CTYPE, "en_US.88591").
When s = "tca", it will call setlocale(LC_CTYPE, "zh_TW.TCA").
Otherwise, it will call setlocale(LC_CTYPE, "ja_JP.SJIS").

setlocale(3) will set library variable _sys_code and the value is defined in the <ctype.h> as the following. 

#define SYS_SJIS0
#define SYS_EUC1
#define SYS_ASCII2
#define SYS_TCA3

The value of k, return value of set_syscode, will be the value of _sys_code.

The macros and functions whose operations change depending on set_syscode are given below:

isalpha, isupper, islower, ispunct, isalnum, isprint, isgraph, iscntrl, iskana, iskanji, iskanji2, is1byte, is2byte, is3byte, toupper, tolower 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:"

isdigit, isxdigit, isspace, isascii, toascii, iskana2, iskpun, iskmoji, issjis1, issjis2, isjis, iseuc, iseuckana, istca1, istca2 euc2sjis, euc2jis, euc2kuten, sjis2euc, sjis2jis, sjis2kuten, jis2euc, jis2sjis, jis2kuten, kuten2euc, kuten2sjis, kuten2jis, tca2iso, iso2tca, isttype

NOTICE

This function is remained for the compatibility with NEWS-OS 3.x.  You had better use setlocale(3) directly. 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’.

SEE ALSO

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

FILES

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

NEWS-OSRelease 4.1C

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