summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-05-15 20:36:08 +0000
committerKarl Berry <karl@freefriends.org>2021-05-15 20:36:08 +0000
commit544b3afa0b563118bfa9a64d8ab468ee47c1fbd2 (patch)
tree5daa86acec73defb207aefe148404f0131e08e45 /Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
parentbf129e8b52e880fb8fdf9d68afd6995df3f225ed (diff)
pgf (15may21)
git-svn-id: svn://tug.org/texlive/trunk@59210 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex25
1 files changed, 24 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
index 000eef098c2..fd87b091816 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
@@ -1715,7 +1715,30 @@
% inserted into the resulting .pdf/.ps/.xxx file.
-
+% String comparison
+\ifdefined\pdfstrcmp
+ \let\pgfsys@strcmp\pdfstrcmp
+\else\ifdefined\strcmp
+ \let\pgfsys@strcmp\strcmp
+\else\ifdefined\directlua
+ \directlua{
+ local lft = lua.get_functions_table()
+ lft[\string#lft+1] = function()
+ local lhs = token.scan_string()
+ local rhs = token.scan_string()
+ if lhs < rhs then
+ tex.sprint(-2, "-1")
+ elseif lhs == rhs then
+ tex.sprint(-2, "0")
+ else
+ tex.sprint(-2, "1")
+ end
+ end
+ token.set_lua("pgfsys@strcmp", \string#lft, "global")
+ }
+\else
+ \def\pgfsys@strcmp#1#2{\pgf@sys@fail{string comparison}}%
+\fi\fi\fi
% Discern the driver: