summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/oberdiek/listingsutf8.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/listingsutf8.sty')
-rw-r--r--Master/texmf-dist/tex/latex/oberdiek/listingsutf8.sty52
1 files changed, 31 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/listingsutf8.sty b/Master/texmf-dist/tex/latex/oberdiek/listingsutf8.sty
index 894346ee89d..f7f733264a7 100644
--- a/Master/texmf-dist/tex/latex/oberdiek/listingsutf8.sty
+++ b/Master/texmf-dist/tex/latex/oberdiek/listingsutf8.sty
@@ -32,28 +32,37 @@
%% listingsutf8-test3.tex, listingsutf8-test4.tex,
%% listingsutf8-test5.tex.
%%
-\begingroup
- \catcode123 1 % {
- \catcode125 2 % }
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5 % ^^M
+ \endlinechar=13 %
+ \catcode123=1 % {
+ \catcode125=2 % }
+ \catcode64=11 % @
\def\x{\endgroup
\expandafter\edef\csname lstU@AtEnd\endcsname{%
- \catcode35 \the\catcode35\relax
- \catcode64 \the\catcode64\relax
- \catcode123 \the\catcode123\relax
- \catcode125 \the\catcode125\relax
+ \endlinechar=\the\endlinechar\relax
+ \catcode13=\the\catcode13\relax
+ \catcode32=\the\catcode32\relax
+ \catcode35=\the\catcode35\relax
+ \catcode61=\the\catcode61\relax
+ \catcode64=\the\catcode64\relax
+ \catcode123=\the\catcode123\relax
+ \catcode125=\the\catcode125\relax
}%
}%
-\x
-\catcode35 6 % #
-\catcode64 11 % @
-\catcode123 1 % {
-\catcode125 2 % }
+\x\catcode61\catcode48\catcode32=10\relax%
+\catcode13=5 % ^^M
+\endlinechar=13 %
+\catcode35=6 % #
+\catcode64=11 % @
+\catcode123=1 % {
+\catcode125=2 % }
\def\TMP@EnsureCode#1#2{%
\edef\lstU@AtEnd{%
\lstU@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{10}{12}% ^^J
\TMP@EnsureCode{33}{12}% !
@@ -70,14 +79,15 @@
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{12}% :
\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{94}{7}% ^ (superscript)
\TMP@EnsureCode{95}{8}% _ (subscript)
\TMP@EnsureCode{96}{12}% `
\TMP@EnsureCode{124}{12}% |
\TMP@EnsureCode{126}{13}% ~ (active)
-\g@addto@macro\lstU@AtEnd{\endinput}
+\edef\lstU@AtEnd{\lstU@AtEnd\noexpand\endinput}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{listingsutf8}%
[2007/11/11 v1.1 Adding support for UTF-8 to listings (HO)]
@@ -103,10 +113,10 @@
\expandafter\lstU@AtEnd
\fi
}
-\lstU@temp{scantokens}{It is provided by e-TeX}
-\lstU@temp{pdf@unescapehex}{It is provided by pdfTeX >= 1.30}
-\lstU@temp{pdf@filedump}{It is provided by pdfTeX >= 1.30}
-\lstU@temp{pdf@filesize}{It is provided by pdfTeX >= 1.30}
+\lstU@temp{scantokens}{It is provided by e-TeX}%
+\lstU@temp{pdf@unescapehex}{It is provided by pdfTeX >= 1.30}%
+\lstU@temp{pdf@filedump}{It is provided by pdfTeX >= 1.30}%
+\lstU@temp{pdf@filesize}{It is provided by pdfTeX >= 1.30}%
\RequirePackage{stringenc}[2007/10/22]
\newif\iflstU@utfviii
\def\lstU@inputenc#1{%
@@ -150,7 +160,7 @@
}%
}
\expandafter\lstU@temp\lst@InputListing{#1}\@nil
-\lstU@AtEnd
+\lstU@AtEnd%
\endinput
%%
%% End of file `listingsutf8.sty'.