From 596857319aaf8bc485a00b8f3c98d1395b3e4c1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= <mpg@elzevir.fr>
Date: Sat, 21 May 2011 18:55:57 +0200
Subject: cctb: warning instead of error for empty numstack

---
 luatexbase-cctb.dtx | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

(limited to 'luatexbase-cctb.dtx')

diff --git a/luatexbase-cctb.dtx b/luatexbase-cctb.dtx
index b39e7f2..8d1f3f5 100644
--- a/luatexbase-cctb.dtx
+++ b/luatexbase-cctb.dtx
@@ -351,7 +351,7 @@ See source file '\inFileName' for details.
       \let\x\PackageError
     \fi
   \expandafter\endgroup
-  \x{luatexbase-attr}{LuaTeX is required for this package. Aborting.}{%
+  \x{luatexbase-cctb}{LuaTeX is required for this package. Aborting.}{%
     This package can only be used with the LuaTeX engine^^J%
     (command `lualatex' or `luatex').^^J%
     Package loading has been stopped to prevent additional errors.}
@@ -609,7 +609,17 @@ See source file '\inFileName' for details.
   \expandafter\lltxb@cctb@numstack@pop\lltxb@cctb@numstack\@nil}
 \def\lltxb@cctb@numstack@pop#1#2\@nil{%
   \ifx\empty#2\empty
-    \errormessage{Popping from and empty CatcoteTableNumStack}%
+    \begingroup
+    \ifdefined\PackageWarning
+      \let\x\PackageWarning
+    \else
+      \def\x####1####2{%
+        \begingroup \endlinechar10
+        \message{Package ####1 warning: ####2}%
+        \endgroup}%
+    \fi
+    \expandafter\endgroup
+    \x{luatexbase-cctb}{Popping from an empty CatcodeTableNumStack}%
     \luatexcatcodetable\z@
   \else
     \gdef\lltxb@cctb@numstack{#2}%
-- 
cgit v1.2.3

