diff options
author | Karl Berry <karl@freefriends.org> | 2014-01-09 23:59:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-01-09 23:59:41 +0000 |
commit | af91cefd8b0ad8fe98e9ef318d337636b3f54a19 (patch) | |
tree | 6b68c531657de5b211fa117d8b08836300bc5583 /Master/texmf-dist/tex/generic/xint/xinttools.sty | |
parent | 3e2f1017cfd105d03e88036cae3a040a59d1c3b5 (diff) |
xint (9jan14)
git-svn-id: svn://tug.org/texlive/trunk@32618 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xinttools.sty')
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xinttools.sty | 58 |
1 files changed, 33 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xinttools.sty b/Master/texmf-dist/tex/generic/xint/xinttools.sty index 945f73bf1b5..16e3a45750c 100644 --- a/Master/texmf-dist/tex/generic/xint/xinttools.sty +++ b/Master/texmf-dist/tex/generic/xint/xinttools.sty @@ -21,9 +21,9 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %%---------------------------------------------------------------- -%% The xint bundle (version 1.09i of December 18, 2013) +%% The xint bundle (version 1.09j of January 9, 2014) %% xinttools: Expandable and non-expandable utilities -%% Copyright (C) 2013 by Jean-Francois Burnol +%% Copyright (C) 2013-2014 by Jean-Francois Burnol %%---------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% \catcode13=5 % ^^M @@ -150,7 +150,7 @@ \fi \XINT_providespackage \ProvidesPackage {xinttools}% - [2013/12/18 v1.09i Expandable and non-expandable utilities (jfB)]% + [2014/01/09 v1.09j Expandable and non-expandable utilities (jfB)]% \long\def\xint_gobble_ {}% \long\def\xint_gobble_i #1{}% \long\def\xint_gobble_ii #1#2{}% @@ -164,9 +164,9 @@ \xint_firstofone{\let\XINT_sptoken= } %<- space here! \long\def\xint_firstoftwo #1#2{#1}% \long\def\xint_secondoftwo #1#2{#2}% -\long\def\xint_firstoftwo_afterstop #1#2{ #1}% -\long\def\xint_secondoftwo_afterstop #1#2{ #2}% -\def\xint_minus_afterstop { -}% +\long\def\xint_firstoftwo_thenstop #1#2{ #1}% +\long\def\xint_secondoftwo_thenstop #1#2{ #2}% +\def\xint_minus_thenstop { -}% \long\def\xint_gob_til_R #1\R {}% \long\def\xint_gob_til_W #1\W {}% \long\def\xint_gob_til_Z #1\Z {}% @@ -178,18 +178,18 @@ \chardef\xint_c_ 0 \chardef\xint_c_viii 8 \newtoks\XINT_toks -\def\XINT_odef #1{\expandafter\def\expandafter#1\expandafter }% -\ifdefined\odef\else\let\odef\XINT_odef\fi -\def\XINT_godef {\global\XINT_odef }% -\def\XINT_oodef #1{\expandafter\expandafter\expandafter\def +\def\xintodef #1{\expandafter\def\expandafter#1\expandafter }% +\ifdefined\odef\else\let\odef\xintodef\fi +\def\xintgodef {\global\xintodef }% +\def\xintoodef #1{\expandafter\expandafter\expandafter\def \expandafter\expandafter\expandafter#1% \expandafter\expandafter\expandafter }% -\ifdefined\oodef\else\let\oodef\XINT_oodef\fi -\def\XINT_goodef {\global\XINT_oodef }% -\def\XINT_fdef #1#2{\expandafter\def\expandafter#1\expandafter +\ifdefined\oodef\else\let\oodef\xintoodef\fi +\def\xintgoodef {\global\xintoodef }% +\def\xintfdef #1#2{\expandafter\def\expandafter#1\expandafter {\romannumeral-`0#2}}% -\ifdefined\fdef\else\let\fdef\XINT_fdef\fi -\def\XINT_gfdef {\global\XINT_fdef }% +\ifdefined\fdef\else\let\fdef\xintfdef\fi +\def\xintgfdef {\global\xintfdef }% should be \global\fdef if \fdef pre-exists? \def\xintReverseOrder {\romannumeral0\xintreverseorder }% \long\def\xintreverseorder #1% {% @@ -522,7 +522,7 @@ \def\XINT_seq #1#2% {% \ifcase\ifnum #1=#2 0\else\ifnum #2>#1 1\else -1\fi\fi\space - \expandafter\xint_firstoftwo_afterstop + \expandafter\xint_firstoftwo_thenstop \or \expandafter\XINT_seq_p \else @@ -533,20 +533,20 @@ \def\XINT_seq_p #1#2% {% \ifnum #1>#2 - \xint_afterfi{\expandafter\XINT_seq_p}% + \expandafter\expandafter\expandafter\XINT_seq_p \else \expandafter\XINT_seq_e \fi - \expandafter{\the\numexpr #1-1}{#2}{#1}% + \expandafter{\the\numexpr #1-\xint_c_i}{#2}{#1}% }% \def\XINT_seq_n #1#2% {% \ifnum #1<#2 - \xint_afterfi{\expandafter\XINT_seq_n}% + \expandafter\expandafter\expandafter\XINT_seq_n \else \expandafter\XINT_seq_e \fi - \expandafter{\the\numexpr #1+1}{#2}{#1}% + \expandafter{\the\numexpr #1+\xint_c_i}{#2}{#1}% }% \def\XINT_seq_e #1#2#3{ }% \def\XINT_seq_opt [\xint_bye #1]#2#3% @@ -951,14 +951,18 @@ \def\xintAssign{\def\XINT_flet_macro {\XINT_assign_fork}\XINT_flet_zapsp }% \def\XINT_assign_fork {% - \let\XINT_assign_def\edef + \let\XINT_assign_def\def \ifx\XINT_token[\expandafter\XINT_assign_opt \else\expandafter\XINT_assign_a \fi }% \def\XINT_assign_opt [#1]% {% - \expandafter\let\expandafter\XINT_assign_def \csname XINT_#1def\endcsname + \ifcsname #1def\endcsname + \expandafter\let\expandafter\XINT_assign_def \csname #1def\endcsname + \else + \expandafter\let\expandafter\XINT_assign_def \csname xint#1def\endcsname + \fi \XINT_assign_a }% \long\def\XINT_assign_a #1\to @@ -1002,15 +1006,19 @@ \XINT_flet_zapsp }% \def\XINT_assignarray_fork {% - \let\XINT_assignarray_def\edef + \let\XINT_assignarray_def\def \ifx\XINT_token[\expandafter\XINT_assignarray_opt \else\expandafter\XINT_assignarray \fi }% \def\XINT_assignarray_opt [#1]% {% - \expandafter\let\expandafter\XINT_assignarray_def - \csname XINT_#1def\endcsname + \ifcsname #1def\endcsname + \expandafter\let\expandafter\XINT_assignarray_def \csname #1def\endcsname + \else + \expandafter\let\expandafter\XINT_assignarray_def + \csname xint#1def\endcsname + \fi \XINT_assignarray }% \long\def\XINT_assignarray #1\to #2% |