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.sty29
1 files changed, 24 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/listingsutf8.sty b/Master/texmf-dist/tex/latex/oberdiek/listingsutf8.sty
index 989e838ca91..4360b730972 100644
--- a/Master/texmf-dist/tex/latex/oberdiek/listingsutf8.sty
+++ b/Master/texmf-dist/tex/latex/oberdiek/listingsutf8.sty
@@ -9,9 +9,9 @@
%% This is a generated file.
%%
%% Project: listingsutf8
-%% Version: 2007/11/11 v1.1
+%% Version: 2011/11/10 v1.2
%%
-%% Copyright (C) 2007 by
+%% Copyright (C) 2007, 2011 by
%% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%%
%% This work may be distributed and/or modified under the
@@ -93,7 +93,7 @@
\edef\lstU@AtEnd{\lstU@AtEnd\noexpand\endinput}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{listingsutf8}%
- [2007/11/11 v1.1 Adding support for UTF-8 to listings (HO)]
+ [2011/11/10 v1.2 Allow UTF-8 in listings input (HO)]
\DeclareOption*{%
\PassOptionsToPackage\CurrentOption{listings}%
}
@@ -104,7 +104,7 @@
\RequirePackage{inputenc}%
}{}%
}
-\RequirePackage{pdftexcmds}[2007/11/11]
+\RequirePackage{pdftexcmds}[2011/04/22]
\def\lstU@temp#1#2{%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname #1\endcsname\relax
@@ -120,7 +120,7 @@
\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]
+\RequirePackage{stringenc}[2010/03/01]
\newif\iflstU@utfviii
\def\lstU@inputenc#1{%
\expandafter\lstU@@inputenc#1utf8/utf8/\@nil
@@ -144,6 +144,7 @@
\pdf@filedump{0}{\pdf@filesize{#1}}{#1}%
}%
}%
+ \lstU@CRLFtoLF\lstU@text
\StringEncodingConvert\lstU@text\lstU@text{utf8}\lst@inputenc
\def\lstU@temp{%
\scantokens\expandafter{\lstU@text}%
@@ -155,6 +156,24 @@
\fi
\lstU@temp
}
+\begingroup
+ \endlinechar=-1 %
+ \@makeother\^^J %
+ \@makeother\^^M %
+ \gdef\lstU@CRLFtoLF#1{%
+ \edef#1{%
+ \expandafter\lstU@CRLFtoLF@aux#1^^M^^J\@nil
+ }%
+ }%
+ \gdef\lstU@CRLFtoLF@aux#1^^M^^J#2\@nil{%
+ #1%
+ \ifx\relax#2\relax
+ \@car
+ \fi
+ ^^J%
+ \lstU@CRLFtoLF@aux#2\@nil
+ }%
+\endgroup %
\def\lstU@temp#1\def\lst@next#2#3\@nil{%
\def\lst@InputListing##1{%
#1%