blob: 01f140dac9f45e581b1fff2b1b668d7fc46aec88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
%D \module
%D [ file=syst-omg,
%D version=2000.09.09,
%D title=\CONTEXT\ System Macros,
%D subtitle=A couple of Omega goodies,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This module will become obsolete as soon as Omega
%D supports \ETEX\ functionality.
\ifx\OmegaVersion\undefined \endinput \fi
\unprotect
\def\newcount {\myalloc@0\count \countdef \@@maxallocation}
\def\newdimen {\myalloc@1\dimen \dimendef \@@maxallocation}
\def\newskip {\myalloc@2\skip \skipdef \@@maxallocation}
\def\newmuskip {\myalloc@3\muskip \muskipdef \@@maxallocation}
\def\newbox {\myalloc@4\box \mathchardef\@@maxallocation}
\def\newtoks {\myalloc@5\toks \toksdef \@@maxallocation}
\def\newread {\myalloc@6\read \chardef \@@minallocation}
\def\newwrite {\myalloc@7\write \chardef \@@minallocation}
\def\newmarks {\myalloc@8\marks \mathchardef\@@maxallocation}
\def\newlanguage{\myalloc@9\language\chardef \@@minallocation}
\def\newfam#1{\chardef#1=15 }
\def\topofboxstack{\number\count24 }
\count18=1
\mathchardef\@@minallocation = 16
\mathchardef\@@medallocation = 256
\mathchardef\@@maxallocation = 32767
\chardef \@@insallocation = 32
\def\myalloc@#1#2#3#4#5%
{\global\advance\count1#1by\@ne
\ifnum\count1#1>\@@medallocation \else
\ifnum\count1#1<\numexpr\@@medallocation-\@@insallocation\relax\else
\global\count1#1=\numexpr\@@medallocation+\@ne\relax % \wait
\fi
\fi
\ifnum\count1#1>#4%
\global\count1#1=#4%
\errmessage{No room for (\string#2) \string#5}%
\fi
\allocationnumber=\count1#1%
\global#3#5=\allocationnumber
\wlog{\string#5=\string#2\the\allocationnumber}}
\def\newinsert#1%
{\ifnum\insc@unt>\numexpr\@@medallocation-\@@insallocation\relax
\global\advance\insc@unt by\m@ne
\allocationnumber=\insc@unt
\global\chardef#1=\allocationnumber
\wlog{\string#1=\string\insert\the\allocationnumber}%
\else
\errmessage{No room for a new insert \string#1 (\number\insc@unt)}%
\fi}
%D We need to catch a (rather crappy) automatic OMEGA
%D mechanism. Unfortunately loading of the SGML vectors
%D happens automatically without control over the regime
%D under which it takes place.
\ifx\SGMLFontEntity\undefined \else
\errmessage{This version of Omega is way to buggy (+ \string\SGMLFontEntity\space mess)!}
\fi
\protect \endinput
|