summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/tex/directions.w
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/tex/directions.w')
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/directions.w55
1 files changed, 34 insertions, 21 deletions
diff --git a/Build/source/texk/web2c/luatexdir/tex/directions.w b/Build/source/texk/web2c/luatexdir/tex/directions.w
index 15f03049bf4..d25ff168433 100644
--- a/Build/source/texk/web2c/luatexdir/tex/directions.w
+++ b/Build/source/texk/web2c/luatexdir/tex/directions.w
@@ -1,28 +1,28 @@
% directions.w
-
+%
% Copyright 2009-2010 Taco Hoekwater <taco@@luatex.org>
-
+%
% This file is part of LuaTeX.
-
+%
% LuaTeX is free software; you can redistribute it and/or modify it under
% the terms of the GNU General Public License as published by the Free
% Software Foundation; either version 2 of the License, or (at your
% option) any later version.
-
+%
% LuaTeX is distributed in the hope that it will be useful, but WITHOUT
% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
% FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
% License for more details.
-
+%
% You should have received a copy of the GNU General Public License along
% with LuaTeX; if not, see <http://www.gnu.org/licenses/>.
@ @c
-#include "ptexlib.h"
-
static const char _svn_version[] =
- "$Id: directions.w 3587 2010-04-03 14:32:25Z taco $"
- "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/directions.w $";
+ "$Id: directions.w 4569 2013-01-30 10:08:33Z taco $"
+ "$URL: http://foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/tex/directions.w $";
+
+#include "ptexlib.h"
@ @c
void scan_direction(void)
@@ -96,20 +96,33 @@ halfword new_dir(int s)
return p;
}
-@ @c
+@ The global static array variable |dir_strings| is also used
+by the lua nodelib interface, so it cannot be static. Putting
+it here instead of there avoid the nodelib having to know
+about the actual values of |dir_TRT| etc.
+
+@c
+const char *dir_strings[128] = {
+ "-TLT","???", "???", "???", "-TRT","???", "???", "???",
+ "???", "-LTL","???", "???", "???", "???", "???", "???",
+ "???", "???", "???", "???", "???", "???", "???", "???",
+ "-RTT","???", "???", "???", "???", "???", "???", "???",
+ "???", "???", "???", "???", "???", "???", "???", "???",
+ "???", "???", "???", "???", "???", "???", "???", "???",
+ "???", "???", "???", "???", "???", "???", "???", "???",
+ "???", "???", "???", "???", "???", "???", "???", "???",
+ "+TLT","???", "???", "???", "+TRT","???", "???", "???",
+ "???", "+LTL","???", "???", "???", "???", "???", "???",
+ "???", "???", "???", "???", "???", "???", "???", "???",
+ "+RTT","???", "???", "???", "???", "???", "???", "???",
+ "???", "???", "???", "???", "???", "???", "???", "???",
+ "???", "???", "???", "???", "???", "???", "???", "???",
+ "???", "???", "???", "???", "???", "???", "???", "???",
+ "???", "???", "???", "???", "???", "???", "???", "???" };
+
const char *string_dir(int d)
{
- if (d == dir_TLT) {
- return "TLT";
- } else if (d == dir_TRT) {
- return "TRT";
- } else if (d == dir_LTL) {
- return "LTL";
- } else if (d == dir_RTT) {
- return "RTT";
- } else {
- return "???";
- }
+ return (dir_strings[d+64]+1);
}