ChrisOS Research ProjectOperating systems · language systems · graphics · machine emulation
DOCUMENTATION ARCHIVEMAIN BRANCH
ChrisOS/Source reference: LIB/CTYPE.CC

Source reference: LIB/CTYPE.CC

Deterministic source record. The complete textual file is reproduced below; this page does not replace architectural interpretation in the authored chapters.

File identity

Field Value
Path LIB/CTYPE.CC
Lines 17
Bytes 473
SHA-256 5e7835ffce32e7a3ac73815f2dfc3ef62126cce44fc6f7d39990190399f3c292
ChrisOS revision da3df29cb397932c43d32373871fb9380e688ade

Detected syntactic dependencies

Line Include
1 LIB/CTYPE.H

Detected symbols

Line Symbol
3 isdigit
4 isalpha
7 isspace
8 isalnum
9 toupper
13 tolower

Complete source

The following block is the complete textual file at the recorded revision. No lines are elided, abbreviated or paraphrased.

#include "LIB/CTYPE.H"

int isdigit(int c) { return c >= '0' && c <= '9'; }
int isalpha(int c) {
    return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
}
int isspace(int c) { return c == ' ' || c == '\t' || c == '\n' || c == '\r'; }
int isalnum(int c) { return isalpha(c) || isdigit(c); }
int toupper(int c) {
    if (c >= 'a' && c <= 'z') return c - 'a' + 'A';
    return c;
}
int tolower(int c) {
    if (c >= 'A' && c <= 'Z') return c - 'A' + 'a';
    return c;
}

Role of this record

The atlas guarantees file-by-file traceability. Responsibility, invariants, ownership, concurrency, security, performance and subsystem interactions belong in authored chapters and must cite this file when applicable.

Document record ID: source-5e7835ffce32e7a3 Reviewed source: da3df29cb397 Class: generated-source-reference