From e733cbfe3512600688e296c70149a128c63c6399 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 2 Mar 2010 23:59:23 +0000
Subject: oberdiek update (2mar10)

git-svn-id: svn://tug.org/texlive/trunk@17292 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty | 59 +++++++++++++++++++++-
 1 file changed, 58 insertions(+), 1 deletion(-)

(limited to 'Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty')

diff --git a/Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty b/Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
index 95dc3435a35..930a922dfdc 100644
--- a/Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
+++ b/Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
@@ -93,7 +93,7 @@
   \fi
 \expandafter\x\csname ver@ltxcmds.sty\endcsname
 \ProvidesPackage{ltxcmds}%
-  [2010/01/28 v1.2 LaTeX kernel commands for general use (HO)]
+  [2010/03/01 v1.3 LaTeX kernel commands for general use (HO)]
 \begingroup
   \catcode123 1 % {
   \catcode125 2 % }
@@ -130,6 +130,10 @@
 \TMP@EnsureCode{93}{12}% ]
 \TMP@EnsureCode{94}{12}% ^ (superscript) (!)
 \TMP@EnsureCode{124}{12}% |
+\chardef\ltx@zero=0 %
+\chardef\ltx@one=1 %
+\chardef\ltx@two=2 %
+\chardef\ltx@cclv=255 %
 \long\def\ltx@gobble#1{}
 \long\def\ltx@gobbletwo#1#2{}
 \long\def\ltx@gobblethree#1#2#3{}
@@ -153,6 +157,28 @@
 \lowercase{\endgroup
   \def\ltx@backslashchar{0}%
 }
+\def\ltx@newif#1{%
+  \begingroup
+    \escapechar=-1 %
+  \expandafter\endgroup
+  \expandafter\LTXcmds@newif\string#1\@nil
+}
+\begingroup
+  \escapechar=-1 %
+\expandafter\endgroup
+\expandafter\def\expandafter\LTXcmds@newif\string\if#1\@nil{%
+  \expandafter\edef\csname#1true\endcsname{%
+    \let
+    \expandafter\noexpand\csname if#1\endcsname
+    \noexpand\iftrue
+  }%
+  \expandafter\edef\csname#1false\endcsname{%
+    \let
+    \expandafter\noexpand\csname if#1\endcsname
+    \noexpand\iffalse
+  }%
+  \csname#1false\endcsname
+}
 \def\ltx@LocalExpandAfter{%
   \begingroup
     \expandafter\expandafter\expandafter
@@ -302,6 +328,37 @@
   \endgroup
   \let#1\LTXcmds@gtemp
 }
+\long\def\ltx@ifnextchar#1#2#3{%
+  \begingroup
+  \let\LTXcmds@CharToken= #1\relax
+  \toks\ltx@zero{#2}%
+  \toks\ltx@two{#3}%
+  \futurelet\LTXcmds@LetToken\LTXcmds@ifnextchar
+}
+\def\LTXcmds@ifnextchar{%
+  \ifx\LTXcmds@LetToken\LTXcmds@CharToken
+    \expandafter\endgroup\the\toks\expandafter\ltx@zero
+  \else
+    \ifx\LTXcmds@LetToken\LTXcmds@SpaceToken
+      \expandafter\expandafter\expandafter\LTXcmds@@ifnextchar
+    \else
+      \expandafter\endgroup\the\toks
+      \expandafter\expandafter\expandafter\ltx@two
+    \fi
+  \fi
+}
+\begingroup
+  \def\x#1{\endgroup
+    \def\LTXcmds@@ifnextchar#1{%
+      \futurelet\LTXcmds@LetToken\LTXcmds@ifnextchar
+    }%
+  }%
+\x{ }
+\begingroup
+  \def\x#1{\endgroup
+    \let\LTXcmds@SpaceToken= #1%
+  }%
+\x{ }
 \LTXcmds@AtEnd
 \endinput
 %%
-- 
cgit v1.2.3

