summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/oberdiek/iflang.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/oberdiek/iflang.sty')
-rw-r--r--Master/texmf-dist/tex/generic/oberdiek/iflang.sty96
1 files changed, 29 insertions, 67 deletions
diff --git a/Master/texmf-dist/tex/generic/oberdiek/iflang.sty b/Master/texmf-dist/tex/generic/oberdiek/iflang.sty
index 223267a1532..176640737d5 100644
--- a/Master/texmf-dist/tex/generic/oberdiek/iflang.sty
+++ b/Master/texmf-dist/tex/generic/oberdiek/iflang.sty
@@ -28,6 +28,11 @@
%% iflang-test1.tex, iflang-test2.tex, iflang-test3.tex.
%%
\begingroup
+ \catcode44 12 % ,
+ \catcode45 12 % -
+ \catcode46 12 % .
+ \catcode58 12 % :
+ \catcode64 11 % @
\expandafter\let\expandafter\x\csname ver@iflang.sty\endcsname
\ifcase 0%
\ifx\x\relax % plain
@@ -51,6 +56,11 @@
\fi
\endgroup
\begingroup
+ \catcode44 12 % ,
+ \catcode45 12 % -
+ \catcode46 12 % .
+ \catcode58 12 % :
+ \catcode64 11 % @
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
\def\x#1#2#3[#4]{\endgroup
\immediate\write-1{Package: #3 #4}%
@@ -66,7 +76,7 @@
\fi
\expandafter\x\csname ver@iflang.sty\endcsname
\ProvidesPackage{iflang}%
- [2007/04/12 v1.2 Language checks (HO)]
+ [2007/04/26 v1.3 Language checks (HO)]
\expandafter\edef\csname IfLang@endinput\endcsname{%
\catcode39 \the\catcode39\relax % '
\catcode40 \the\catcode40\relax % (
@@ -118,74 +128,22 @@
\fi
}%
}
-\begingroup
-\ifnum\expandafter\ifx\csname PackageInfo\endcsname\relax
- 1%
- \fi
- \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax
- 1%
- \fi
- 0=0 %
- \endgroup
- \expandafter\@secondoftwo
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input infwarerr.sty\relax
\else
- \endgroup
- \expandafter\@firstoftwo
+ \RequirePackage{infwarerr}%
\fi
-{%
- \def\IfLang@GenericMessage#1#2#3{%
- \begingroup
- \newlinechar=10 %
- \def\@spaces{\space\space\space\space}%
- \ifcase#1 %
- \def\MessageBreak{%
- ^^J(iflang) \@spaces\@spaces\@spaces\@spaces
- }%
- \or
- \def\MessageBreak{%
- ^^J(iflang)\@spaces\@spaces\@spaces\@spaces
- }%
- \or
- \def\MessageBreak{%
- ^^J(iflang) \space\@spaces\@spaces\@spaces
- }%
- \fi
- \expandafter\ifx\csname if#3\expandafter\endcsname
- \csname iftrue\endcsname
- \def\on@line{ on input line \the\inputlineno}%
- \else
- \def\on@line{}%
- \fi
- \immediate\write\ifcase#1 -1\or 16\fi{%
- ^^JPackage iflang %
- \ifcase#1 Info\or Warning\or Error\fi
- : #2\on@line.^^J%
- }%
- \endgroup
- }%
- \def\IfLang@Info#1{%
- \IfLang@GenericMessage{0}{#1}{false}%
- }%
- \def\IfLang@Warning#1{%
- \IfLang@GenericMessage{1}{#1}{false}%
- }%
-}{%
- \def\IfLang@Info#1{%
- \begingroup
- \def\on@line{}%
- \PackageInfo{iflang}{#1}%
- \endgroup
- }%
- \def\IfLang@Warning#1{%
- \PackageWarningNoLine{iflang}{#1}%
- }%
-}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname uselanguage\endcsname\relax
- \IfLang@Info{Naming convention for patterns: babel}%
+ \@PackageInfoNoLine{iflang}{%
+ Naming convention for patterns: babel%
+ }%
\def\IfLang@prefix{l@}%
\else
- \IfLang@Info{Naming convention for patterns: etex.src}%
+ \@PackageInfoNoLine{iflang}{%
+ Naming convention for patterns: etex.src%
+ }%
\def\IfLang@prefix{lang@}%
\let\IfLang@OrgUseLanguage\uselanguage
\def\uselanguage#1{%
@@ -196,12 +154,14 @@
\expandafter\ifx\csname languagename\endcsname\relax
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname lang@USenglish\endcsname\relax
- \IfLang@Warning{\string\lang@USenglish\space is missing}%
+ \@PackageWarningNoLine{iflang}{%
+ \string\lang@USenglish\space is missing%
+ }%
\else
\ifnum\lang@USenglish=\language
\def\languagename{USenglish}%
\else
- \IfLang@Warning{%
+ \@PackageWarningNoLine{iflang}{%
\string\languagename\space is not set,\MessageBreak
current language is unknown%
}%
@@ -211,7 +171,9 @@
\fi
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname languagename\endcsname\relax
- \IfLang@Info{\string\languagename\space is not set}%
+ \@PackageInfoNoLine{iflang}{%
+ \string\languagename\space is not set%
+ }%
\fi
\def\IfLanguagePatterns#1{%
\ifnum\IfLang@IfDefined{\IfLang@prefix#1}{%
@@ -289,7 +251,7 @@
\expandafter\ifx\csname languagename\endcsname\relax
\else
\IfLanguagePatterns{\languagename}{}{%
- \IfLang@Warning{%
+ \@PackageWarningNoLine{iflang}{%
Mismatch between \string\language\space
(patterns)\MessageBreak
and setting of \string\languagename