summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:58:15 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:58:15 +0000
commitc762345e3d7f088cd8783a4af1bd90c907962522 (patch)
treea0dfb780a7ece4227d3b359494c1003b43edbfd9 /Master/texmf-dist
parent665b4c241d89f8871da6b3c9999f1c96f325e9aa (diff)
localloc
git-svn-id: svn://tug.org/texlive/trunk@1050 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/tex/latex/localloc/localloc.sty153
1 files changed, 153 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/localloc/localloc.sty b/Master/texmf-dist/tex/latex/localloc/localloc.sty
new file mode 100644
index 00000000000..dddebed491a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/localloc/localloc.sty
@@ -0,0 +1,153 @@
+%%
+%% This is file `localloc.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% localloc.dtx (with options: `package')
+%%
+%% This is a file of the `localloc' package reimplementing
+%% plain-TeX's and LaTeX's basic allocation macros to allow
+%% local allocation of registers.
+%%
+%% -- Copyright (C) 1991-1995 Bernd Raichle. All rights reserved --
+%%
+%% This package is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+%%
+%%
+%% IMPORTANT NOTICE:
+%%
+%% Copying of this file is authorized only if either
+%% (1) you make absolutely no changes to your copy, including name, or
+%% (2) if you do make changes, you name it something other than
+%% localloc.dtx, localloc.doc, localloc.tex, or localloc.sty.
+%%
+%% For error reports see original source file `localloc.dtx'.
+%%
+\expandafter\ifx\csname lnewcount\endcsname\relax
+\else \expandafter\endinput \fi
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname ProvidesPackage\endcsname\relax
+\else
+ \NeedsTeXFormat{LaTeX2e}
+ \ProvidesPackage{localloc}%
+ [1995/09/24 v1.1b %
+ Additional LaTeX Kernel Macros (local allocation)]
+\fi
+\expandafter\chardef\csname lcllc@at\endcsname=\catcode`\@
+\catcode`\@=11 % \makeatletter
+\def\lcllc@cnvmutocnt#1{\expandafter\lcllc@delmukey\the#1}
+\begingroup \catcode`\M=12 \catcode`\U=12 \catcode`\.=12
+ \lowercase{\endgroup
+\def\lcllc@delmukey#1.#2MU{#1}}
+\countdef\count@ptr = 10
+\countdef\dimen@ptr = 11
+\countdef\skip@ptr = 12
+\countdef\muskip@ptr = 13
+\countdef\box@ptr = 14
+\countdef\toks@ptr = 15
+\countdef\read@ptr = 16
+\countdef\write@ptr = 17
+\countdef\mathfam@ptr = 18
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname newlanguage\endcsname\relax
+ \csname newcount\endcsname\language@ptr
+\else
+ \countdef\language@ptr = 19
+\fi
+\newmuskip\count@limit \count@limit = \the\insc@unt mu
+\newmuskip\dimen@limit \dimen@limit = \the\insc@unt mu
+\newmuskip\skip@limit \skip@limit = \the\insc@unt mu
+\newmuskip\box@limit \box@limit = \the\insc@unt mu
+\newmuskip\muskip@limit \muskip@limit = 256mu
+\newmuskip\toks@limit \toks@limit = 256mu
+\newmuskip\cclvi@mu \cclvi@mu = 256mu
+\newmuskip\xvi@mu \xvi@mu = 16mu
+\def\newcount {\alloc@\count@ptr \count@limit \count 1\countdef }
+\def\newdimen {\alloc@\dimen@ptr \dimen@limit \dimen 1\dimendef }
+\def\newskip {\alloc@\skip@ptr \skip@limit \skip 1\skipdef }
+\def\newmuskip {\alloc@\muskip@ptr \muskip@limit\muskip 0\muskipdef}
+\def\newbox {\alloc@\box@ptr \box@limit \box 1\chardef }
+\def\newtoks {\alloc@\toks@ptr \toks@limit \toks 0\toksdef }
+\def\newread {\alloc@\read@ptr \xvi@mu \read 0\chardef }
+\def\newwrite {\alloc@\write@ptr \xvi@mu \write 0\chardef }
+\def\newfam {\alloc@\mathfam@ptr\xvi@mu \fam 0\chardef }
+\def\newlanguage{\alloc@\lang@ptr \cclvi@mu \language0\chardef }
+\def\lnewcount {\lalloc@\count@ptr \count@limit \count 1\countdef }
+\def\lnewdimen {\lalloc@\dimen@ptr \dimen@limit \dimen 1\dimendef }
+\def\lnewskip {\lalloc@\skip@ptr \skip@limit \skip 1\skipdef }
+\def\lnewmuskip{\lalloc@\muskip@ptr\muskip@limit\muskip 0\muskipdef}
+\def\lnewbox {\lalloc@\box@ptr \box@limit \box 1\chardef }
+\def\lnewtoks {\lalloc@\toks@ptr \toks@limit \toks 0\toksdef }
+\def\lcllc@insnums{}
+\def\lcllc@checkins#1{%
+ \begingroup
+ \def\do##1.{%
+ \ifnum##1=\allocationnumber
+ \advance\allocationnumber#1\relax
+ \noexpand\lcllc@checkins{#1}%
+ \fi}%
+ \edef\x{\endgroup \lcllc@insnums}%
+ \x}
+\def\alloc@#1#2#3#4{%
+ \allocationnumber#1%
+ \advance\allocationnumber\@ne
+ \ifnum#4=\@ne \lcllc@checkins\@ne \fi
+ \global#1\allocationnumber
+ \ch@ck#1#2#3%
+ \lcllc@def\global{}#3}
+\def\lalloc@#1#2#3#4{%
+ \allocationnumber\lcllc@cnvmutocnt#2%
+ \advance\allocationnumber\m@ne
+ \ifnum#4=\@ne \lcllc@checkins\m@ne \fi
+ #2\the\allocationnumber mu %
+ \ch@ck#1#2#3%
+ \lcllc@def\relax{(local)}#3}
+\def\ch@ck#1#2#3{%
+ \ifnum#1<\lcllc@cnvmutocnt#2\relax \else
+ \errmessage{No room for a new #3}%
+ % \allocationnumber\m@ne
+ \fi}
+\def\lcllc@def#1#2#3#4#5{%
+ #1#4#5=\allocationnumber
+ \wlog{\string#5#2=\string#3\the\allocationnumber}}
+\def\lcllc@getmax#1{%
+ \ifnum#1<\allocationnumber \else
+ \allocationnumber#1\advance\allocationnumber\@ne
+ \fi}
+\outer\def\newinsert{%
+ \allocationnumber\m@ne
+ \lcllc@getmax\count@ptr \lcllc@getmax\dimen@ptr
+ \lcllc@getmax\skip@ptr \lcllc@getmax\box@ptr
+ \lcllc@checkins\@ne
+ \ch@ck\allocationnumber\count@limit\count
+ \ch@ck\allocationnumber\dimen@limit\dimen
+ \ch@ck\allocationnumber\skip@limit\skip
+ \ch@ck\allocationnumber\box@limit\box
+ \begingroup
+ \let\do\relax
+ \xdef\lcllc@insnums{\do\the\allocationnumber.\lcllc@insnums}%
+ \endgroup
+ \lcllc@def\global{}\insert\chardef}
+\catcode`\@=\lcllc@at
+%% \CharacterTable
+%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+%%
+\endinput
+%%
+%% End of file `localloc.sty'.