diff options
author | Karl Berry <karl@freefriends.org> | 2006-11-18 01:37:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-11-18 01:37:52 +0000 |
commit | 5c91b9f8a88e06f057a6a08b0a755a224d08e019 (patch) | |
tree | 57cfafb6bd6c146dcdfc911dbef8db622c6476bd /Master/texmf-dist/tex/context/base/syst-mtx.tex | |
parent | 983736c2ab572e9a860c74f0f781b3decd282f13 (diff) |
context 17nov06 update
git-svn-id: svn://tug.org/texlive/trunk@2449 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/syst-mtx.tex')
-rw-r--r-- | Master/texmf-dist/tex/context/base/syst-mtx.tex | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/syst-mtx.tex b/Master/texmf-dist/tex/context/base/syst-mtx.tex new file mode 100644 index 00000000000..c865560b83f --- /dev/null +++ b/Master/texmf-dist/tex/context/base/syst-mtx.tex @@ -0,0 +1,66 @@ +%D \module +%D [ file=syst-mtx, +%D version=2006.08.11, +%D title=\CONTEXT\ System Macros, +%D subtitle=\METATEX\ specifics, +%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. + +\ifx\directlua\undefined \endinput \fi + +\unprotect + +%D Since the number of chars exceed 256 now, we can use \type +%D {\chardef} instead of the more limited \type {\mathchardef}. + +\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 \chardef \@@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 \chardef \@@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 = 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} + +\protect \endinput |