summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-07-27 21:26:25 +0000
committerKarl Berry <karl@freefriends.org>2017-07-27 21:26:25 +0000
commitfe6cc7d43e9608cb5bb2533480000837d7cf4827 (patch)
tree3098f2a8b1933b247a3aa7f6b58bb4e7dcca58f0 /Master/texmf-dist/tex/generic/xint/xintbinhex.sty
parent654d2d2ad9ef4fc4de9cfd3b3d6038ef14ad4161 (diff)
xint (27jul17)
git-svn-id: svn://tug.org/texlive/trunk@44900 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xintbinhex.sty')
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintbinhex.sty64
1 files changed, 36 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
index f3eeb9a387f..bdbc76c5089 100644
--- a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2k 2017/01/06
+%% The xint bundle 1.2l 2017/07/26
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintbinhex: Expandable binary and hexadecimal conversions
%% ---------------------------------------------------------------
@@ -70,7 +70,12 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintbinhex}%
- [2017/01/06 1.2k Expandable binary and hexadecimal conversions (JFB)]%
+ [2017/07/26 1.2l Expandable binary and hexadecimal conversions (JFB)]%
+\def\xint_cleanupzeros_andstop#1{%
+\def\xint_cleanupzeros_andstop ##1##2##3##4%
+{%
+ \expandafter#1\the\numexpr ##1##2##3##4\relax
+}}\xint_cleanupzeros_andstop{ }%
\newcount\xint_c_ii^xv \xint_c_ii^xv 32768
\newcount\xint_c_ii^xvi \xint_c_ii^xvi 65536
\newcount\xint_c_x^v \xint_c_x^v 100000
@@ -340,10 +345,11 @@
{%
\expandafter\XINT_dtb_end_d\the\numexpr #1#2#3#4#5#6#7#8\relax
}%
-\edef\XINT_dtb_end_d #1#2#3#4#5#6#7#8#9%
+\def\XINT_dtb_end_d#1{%
+\def\XINT_dtb_end_d ##1##2##3##4##5##6##7##8##9%
{%
- \noexpand\expandafter\space\noexpand\the\numexpr #1#2#3#4#5#6#7#8#9\relax
-}%
+ \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8##9\relax
+}}\XINT_dtb_end_d{ }%
\def\xintHexToDec {\romannumeral0\xinthextodec }%
\def\xinthextodec #1%
{\expandafter\XINT_htd_checkin\romannumeral`&&@#1\W\W\W\W \T }%
@@ -375,10 +381,10 @@
{%
\expandafter\xint_cleanupzeros_andstop
\romannumeral0\XINT_rord_main {}#1%
- \xint_relax
+ \xint:
\xint_bye\xint_bye\xint_bye\xint_bye
\xint_bye\xint_bye\xint_bye\xint_bye
- \xint_relax
+ \xint:
}%
\def\XINT_htd_II_ci #1\XINT_htd_II_ciii
#2\W\W\W {\XINT_htd_II_d {}{"#2}{\xint_c_xvi}}%
@@ -423,10 +429,11 @@
{%
\XINT_htd_II_end_b #1#3%
}%
-\edef\XINT_htd_II_end_b #1#2#3#4#5#6#7#8%
+\def\XINT_htd_II_end_b#1{%
+\def\XINT_htd_II_end_b ##1##2##3##4##5##6##7##8%
{%
- \noexpand\expandafter\space\noexpand\the\numexpr #1#2#3#4#5#6#7#8\relax
-}%
+ \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8\relax
+}}\XINT_htd_II_end_b{ }%
\def\xintBinToDec {\romannumeral0\xintbintodec }%
\def\xintbintodec #1{\expandafter\XINT_btd_checkin
\romannumeral`&&@#1\W\W\W\W\W\W\W\W \T }%
@@ -462,15 +469,16 @@
{%
\expandafter\XINT_btd_II_c_end
\romannumeral0\XINT_rord_main {}#2%
- \xint_relax
+ \xint:
\xint_bye\xint_bye\xint_bye\xint_bye
\xint_bye\xint_bye\xint_bye\xint_bye
- \xint_relax
+ \xint:
}%
-\edef\XINT_btd_II_c_end #1#2#3#4#5#6%
+\def\XINT_btd_II_c_end#1{%
+\def\XINT_btd_II_c_end ##1##2##3##4##5##6%
{%
- \noexpand\expandafter\space\noexpand\the\numexpr #1#2#3#4#5#6\relax
-}%
+ \expandafter#1\the\numexpr ##1##2##3##4##5##6\relax
+}}\XINT_btd_II_c_end{ }%
\def\XINT_btd_II_ci #1\XINT_btd_II_cvii #2\W\W\W\W\W\W\W
{\XINT_btd_II_d {}{#2}{\xint_c_ii }}%
\def\XINT_btd_II_cii #1\XINT_btd_II_cvii #2\W\W\W\W\W\W
@@ -507,10 +515,11 @@
{%
\XINT_btd_II_end_b #1#3%
}%
-\edef\XINT_btd_II_end_b #1#2#3#4#5#6#7#8#9%
+\def\XINT_btd_II_end_b#1{%
+\def\XINT_btd_II_end_b ##1##2##3##4##5##6##7##8##9%
{%
- \noexpand\expandafter\space\noexpand\the\numexpr #1#2#3#4#5#6#7#8#9\relax
-}%
+ \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8##9\relax
+}}\XINT_btd_II_end_b{ }%
\def\XINT_btd_I_a #1#2#3#4#5#6#7#8%
{%
\xint_gob_til_Z #3\XINT_btd_I_end_a\Z
@@ -535,10 +544,9 @@
\def\xintbintohex #1%
{%
\expandafter\XINT_bth_checkin
- \romannumeral0\expandafter\XINT_num_loop
- \romannumeral`&&@#1\xint_relax\xint_relax
- \xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\Z
+ \romannumeral0\expandafter\XINT_num_cleanup
+ \the\numexpr\expandafter\XINT_num_loop
+ \romannumeral`&&@#1\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z
\R\R\R\R\R\R\R\R\Z \W\W\W\W\W\W\W\W
}%
\def\XINT_bth_checkin #1%
@@ -606,9 +614,9 @@
}%
\def\XINT_htb_II_b #1#2#3\T
{%
- \XINT_num_loop #2#1%
- \xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\Z
+ \expandafter\XINT_num_cleanup
+ \the\numexpr\expandafter\XINT_num_loop #2#1%
+ \xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z
}%
\def\xintCHexToBin {\romannumeral0\xintchextobin }%
\def\xintchextobin #1%
@@ -646,12 +654,12 @@
\XINT_chtb_I\expandafter\expandafter\expandafter #1%
{%
\XINT_chtb_end_b #1%
- \xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\Z
+ \xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z
}%
\def\XINT_chtb_end_b #1\W#2\W#3\W#4\W#5\W#6\W#7\W#8\W\endcsname
{%
- \XINT_num_loop
+ \expandafter\XINT_num_cleanup
+ \the\numexpr\expandafter\XINT_num_loop
}%
\XINT_restorecatcodes_endinput%
\endinput