summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructureext.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructureext.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructureext.code.tex83
1 files changed, 76 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructureext.code.tex b/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructureext.code.tex
index a10e67c82f3..bea65490068 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructureext.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructureext.code.tex
@@ -85,7 +85,7 @@
% Time: O(1), number of macros per list: about N
% #1: the item to append
% #2: the list as macro name
-\def\pgfplotsapplistpushback#1\to#2{%
+\long\def\pgfplotsapplistpushback#1\to#2{%
\expandafter\let\expandafter\pgfplots@loc@TMPa\csname\string#2@endno\endcsname
\begingroup
\c@pgf@counta=\pgfplots@loc@TMPa\relax
@@ -168,7 +168,7 @@
% #1: the item to append
% #2: the list as macro name
-\def\pgfplotsapplistXpushback#1\to#2{%
+\long\def\pgfplotsapplistXpushback#1\to#2{%
\begingroup
\c@pgf@counta=\csname\string#2@smallbuf@c\endcsname\relax
\advance\c@pgf@counta by1
@@ -182,7 +182,7 @@
\pgfplotsapplistXpushback@smallbufoverfl{#1}{#2}%
\fi
}%
-\def\pgfplotsapplistXpushback@smallbufoverfl#1#2{%
+\long\def\pgfplotsapplistXpushback@smallbufoverfl#1#2{%
\begingroup
\c@pgf@counta=\csname\string#2@bigbuf@c\endcsname\relax
\advance\c@pgf@counta by1
@@ -237,8 +237,77 @@
#1}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% A variant of applist which has the same runtime requirements, but
+% does PUSH FRONT only.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+% Usage:
+% \pgfplotsprependlistXnewempty{liste}
+\def\pgfplotsprependlistXnewempty#1{%
+ \expandafter\let\csname pgfpPRP@#1\endcsname=\pgfutil@empty
+ \expandafter\let\csname pgfpPRP@#1@smallbuf\endcsname=\pgfutil@empty
+ \expandafter\let\csname pgfpPRP@#1@bigbuf\endcsname=\pgfutil@empty
+ \expandafter\def\csname pgfpPRP@#1@smallbuf@c\endcsname{0}%
+ \expandafter\def\csname pgfpPRP@#1@bigbuf@c\endcsname{0}%
+}%
+% #1: the item to append
+% #2: the list as macro name
+\long\def\pgfplotsprependlistXpushfront#1\to#2{%
+ \begingroup
+ \c@pgf@counta=\csname pgfpPRP@#2@smallbuf@c\endcsname\relax
+ \advance\c@pgf@counta by1
+ \xdef\pgfplots@glob@TMPa{\the\c@pgf@counta}%
+ \endgroup
+ \expandafter\let\csname pgfpPRP@#2@smallbuf@c\endcsname=\pgfplots@glob@TMPa
+ \ifnum\csname pgfpPRP@#2@smallbuf@c\endcsname<40
+ \t@pgfplots@toka=\expandafter\expandafter\expandafter{\csname pgfpPRP@#2@smallbuf\endcsname}%
+ \t@pgfplots@tokb={#1}%
+ \expandafter\edef\csname pgfpPRP@#2@smallbuf\endcsname{\the\t@pgfplots@tokb\the\t@pgfplots@toka}%
+ \else
+ \pgfplotsprependlistXpushfront@smallbufoverfl{#1}{#2}%
+ \fi
+}%
+\long\def\pgfplotsprependlistXpushfront@smallbufoverfl#1#2{%
+ \begingroup
+ \c@pgf@counta=\csname pgfpPRP@#2@bigbuf@c\endcsname\relax
+ \advance\c@pgf@counta by1
+ \xdef\pgfplots@glob@TMPa{\the\c@pgf@counta}%
+ \endgroup
+ \expandafter\let\csname pgfpPRP@#2@bigbuf@c\endcsname=\pgfplots@glob@TMPa
+ %
+ \ifnum\csname pgfpPRP@#2@bigbuf@c\endcsname<30
+ \t@pgfplots@toka=\expandafter\expandafter\expandafter{\csname pgfpPRP@#2@bigbuf\endcsname}%
+ \t@pgfplots@tokb=\expandafter\expandafter\expandafter{\csname pgfpPRP@#2@smallbuf\endcsname}%
+ \t@pgfplots@tokc={#1}%
+ \expandafter\edef\csname pgfpPRP@#2@bigbuf\endcsname{\the\t@pgfplots@tokc\the\t@pgfplots@tokb\the\t@pgfplots@toka}%
+ \expandafter\let\csname pgfpPRP@#2@smallbuf\endcsname=\pgfutil@empty
+ \expandafter\def\csname pgfpPRP@#2@smallbuf@c\endcsname{0}%
+ \else%
+ \pgfplotsprependlistXflushbuffers{#2}%
+ \t@pgfplots@toka=\expandafter\expandafter\expandafter{\csname pgfpPRP@#2\endcsname}%
+ \t@pgfplots@tokb={#1}%
+ \expandafter\edef\csname pgfpPRP@#2\endcsname{\the\t@pgfplots@tokb\the\t@pgfplots@toka}%
+ \fi%
+}%
+\def\pgfplotsprependlistXflushbuffers#1{%
+ \t@pgfplots@toka=\expandafter\expandafter\expandafter{\csname pgfpPRP@#1\endcsname}%
+ \t@pgfplots@tokb=\expandafter\expandafter\expandafter{\csname pgfpPRP@#1@bigbuf\endcsname}%
+ \t@pgfplots@tokc=\expandafter\expandafter\expandafter{\csname pgfpPRP@#1@smallbuf\endcsname}%
+ \expandafter\edef\csname pgfpPRP@#1\endcsname{\the\t@pgfplots@tokc\the\t@pgfplots@tokb\the\t@pgfplots@toka}%
+ \expandafter\let\csname pgfpPRP@#1@smallbuf\endcsname=\pgfutil@empty
+ \expandafter\def\csname pgfpPRP@#1@smallbuf@c\endcsname{0}%
+ \expandafter\let\csname pgfpPRP@#1@bigbuf\endcsname=\pgfutil@empty
+ \expandafter\def\csname pgfpPRP@#1@bigbuf@c\endcsname{0}%
+}%
+\def\pgfplotsprependlistXlet#1=#2{%
+ \pgfplotsprependlistXflushbuffers{#2}%
+ \expandafter\let\expandafter#1\csname pgfpPRP@#2\endcsname}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
@@ -284,7 +353,7 @@
% #1: the item to append
% #2: the list as macro name
-\def\pgfplotsapplistXXpushback#1{%
+\long\def\pgfplotsapplistXXpushback#1{%
\begingroup
\c@pgf@counta=\pgfplotsapplistXX@smallbuf@c\relax
\advance\c@pgf@counta by1
@@ -298,7 +367,7 @@
\pgfplotsapplistXXpushback@smallbufoverfl{#1}%
\fi
}%
-\def\pgfplotsapplistXXpushback@smallbufoverfl#1{%
+\long\def\pgfplotsapplistXXpushback@smallbufoverfl#1{%
\begingroup
\c@pgf@counta=\pgfplotsapplistXX@bigbuf@c\relax
\advance\c@pgf@counta by1
@@ -385,7 +454,7 @@
% #1: the item to append
% #2: the list as macro name
-\def\pgfplotsapplistXXglobalpushback#1{%
+\long\def\pgfplotsapplistXXglobalpushback#1{%
\begingroup
\c@pgf@counta=\pgfplotsapplistXXglobal@smallbuf@c\relax
\advance\c@pgf@counta by1
@@ -399,7 +468,7 @@
\pgfplotsapplistXXglobalpushback@smallbufoverfl{#1}%
\fi
}%
-\def\pgfplotsapplistXXglobalpushback@smallbufoverfl#1{%
+\long\def\pgfplotsapplistXXglobalpushback@smallbufoverfl#1{%
\begingroup
\c@pgf@counta=\pgfplotsapplistXXglobal@bigbuf@c\relax
\advance\c@pgf@counta by1