summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/syst-omg.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:45:13 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:45:13 +0000
commit92a15e15b276458e10aa05016bf472e8c6dd3eb0 (patch)
treeaf0343097e5f497167cefa16ed45c03475b98c37 /Master/texmf-dist/tex/context/base/syst-omg.tex
parentdf014cf02a62504f6b3e7a4398fb1e093b84f114 (diff)
context
git-svn-id: svn://tug.org/texlive/trunk@608 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/syst-omg.tex')
-rw-r--r--Master/texmf-dist/tex/context/base/syst-omg.tex113
1 files changed, 113 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/syst-omg.tex b/Master/texmf-dist/tex/context/base/syst-omg.tex
new file mode 100644
index 00000000000..da620fa7e7d
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/syst-omg.tex
@@ -0,0 +1,113 @@
+%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
+
+% \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 }
+%
+% \count18=1
+%
+% \mathchardef\@@minallocation= 16
+% \mathchardef\@@medallocation= 256
+% \mathchardef\@@maxallocation=32767
+% \chardef \@@insallocation= 8
+%
+% \def\myalloc@#1#2#3#4#5%
+% {\global\advance\count1#1by\@ne
+% \ifnum\count1#1>\@@medallocation \else
+% \global\advance\insc@unt by -\@@insallocation
+% \ifnum\count1#1<\insc@unt \else
+% \global\count1#1=\@@medallocation % \wait
+% \fi
+% \global\advance\insc@unt by +\@@insallocation
+% \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}}
+
+\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 }
+
+\count18=1
+
+\mathchardef\@@minallocation = 16
+\mathchardef\@@medallocation = 256
+\mathchardef\@@maxallocation = 32767
+
+\chardef\@@insallocation=24
+
+\def\myalloc@#1#2#3#4#5%
+ {\global\advance\count1#1by\@ne
+ \ifnum\count1#1>\@@medallocation \else
+ \global\advance\insc@unt by -\@@insallocation
+ \ifnum\count1#1<\insc@unt \else
+ \global\count1#1=\@@medallocation % \wait
+ \fi
+ \global\advance\insc@unt by +\@@insallocation
+ \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}}
+
+%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
+
+ \let\normalSGMLFontEntity\SGMLFontEntity
+
+ \def\SGMLFontEntity#1#2#3#4#5%
+ {\convertargument#3\to\ascii
+ \ExpandBothAfter\doifinstringelse{\letterbackslash}{\ascii}
+ {\normalSGMLFontEntity{#1}{#2}{#3}{#4}{#5}}
+ {\normalSGMLFontEntity{#1}{#2}{\string#3}{#4}{#5}}}
+
+\fi
+
+\protect \endinput