summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/tex/directions.h
diff options
context:
space:
mode:
authorLuigi Scarso <luigi.scarso@gmail.com>2018-09-05 21:30:41 +0000
committerLuigi Scarso <luigi.scarso@gmail.com>2018-09-05 21:30:41 +0000
commit1b8b254a766350291f8e7e19feaf6326ebabe633 (patch)
tree8a20823763635906b94a68b72541a10dc6f91377 /Build/source/texk/web2c/luatexdir/tex/directions.h
parentef7aedbc1cabb3eebb59082e349f9792c9c4d3c1 (diff)
sync with luatex revision 6924.
git-svn-id: svn://tug.org/texlive/trunk@48591 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/tex/directions.h')
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/directions.h49
1 files changed, 14 insertions, 35 deletions
diff --git a/Build/source/texk/web2c/luatexdir/tex/directions.h b/Build/source/texk/web2c/luatexdir/tex/directions.h
index 7ab524a1e79..92d6cc18f12 100644
--- a/Build/source/texk/web2c/luatexdir/tex/directions.h
+++ b/Build/source/texk/web2c/luatexdir/tex/directions.h
@@ -22,43 +22,19 @@
# define DIRECTIONS_H
/*
- # define dir_TLT 0
- # define dir_TRT 4
- # define dir_LTL 9
- # define dir_RTT 24
-
- extern const char *dir_strings[128];
+#define dir_swap 4
*/
-extern const char *dir_strings[8];
-
-extern int dir_swap;
-
-/*
-# define RETURN_DIR_VALUES(a) \
- if (s==luaS_##a##_ptr) { \
- return (dir_##a); \
- } else if (!absolute_only) { \
- if (s==luaS_p##a##_ptr) \
- return (dir_##a); \
- else if (s==luaS_m##a##_ptr) \
- return ((dir_##a)-4); \
- }
-*/
+#define dir_min_value 0
+#define dir_max_value 3
-# define RETURN_DIR_VALUES(a) \
- if (s==lua_key(a)) { \
- return (dir_##a); \
- } else if (!absolute_only) { \
- if (s==lua_key_plus(a)) \
- return (dir_##a); \
- else if (s==lua_key_minus(a)) \
- return ((dir_##a)-4); \
- }
+#define check_dir_value(d) \
+ if ((d < dir_min_value) || (d > dir_max_value)) \
+ d = dir_min_value;
-# define is_mirrored(a) 0
+#define is_mirrored(a) 0
-# define is_rotated(a) (a == dir_RTT)
+#define is_rotated(a) (a == dir_RTT)
/*
@@ -90,10 +66,12 @@ extern int dir_swap;
(a == dir_RTT && b == dir_TRT) \
)
+ # define dir_TLT_or_TRT(a) (a == dir_TLT || a == dir_TRT)
+ # define dir_LTL_or_RTT(a) (a == dir_LTL || a == dir_RTT)
+
*/
-/* # define dir_TLT_or_TRT(a) (a == dir_TLT || a == dir_TRT) */
-/* # define dir_LTL_or_RTT(a) (a == dir_LTL || a == dir_RTT) */
+/* TLT TRT LTL RTT */
# define dir_TLT_or_TRT(a) (a < 2)
# define dir_LTL_or_RTT(a) (a > 1)
@@ -174,7 +152,8 @@ extern void initialize_directions(void);
extern halfword new_dir(int s);
extern const char *string_dir(int d);
-extern void print_dir(int d);
+extern void print_dir_par(int d);
+extern void print_dir_text(halfword d);
extern void scan_direction(void);