diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/tex/directions.h')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/directions.h | 49 |
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); |