diff options
author | Karl Berry <karl@freefriends.org> | 2021-02-25 19:22:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-02-25 19:22:25 +0000 |
commit | ad547a6b5986815fda458221149728d9d9ab1d87 (patch) | |
tree | 16296910eb3eca724371474ea9aea3994dc69614 /Build/source/texk/web2c/luatexdir/tex/scanning.h | |
parent | 947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff) |
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/tex/scanning.h')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/scanning.h | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/luatexdir/tex/scanning.h b/Build/source/texk/web2c/luatexdir/tex/scanning.h new file mode 100644 index 00000000000..e4189a0f67a --- /dev/null +++ b/Build/source/texk/web2c/luatexdir/tex/scanning.h @@ -0,0 +1,109 @@ +/* scanning.h + + Copyright 2009 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/>. + +*/ + +#ifndef SCANNING_H +# define SCANNING_H + +typedef enum { + int_val_level = 0, /* integer values */ + attr_val_level, /* integer values */ + dimen_val_level, /* dimension values */ + glue_val_level, /* glue specifications */ + mu_val_level, /* math glue specifications */ + dir_val_level, /* directions */ + ident_val_level, /* font identifier */ + tok_val_level, /* token lists */ +} value_level_code; + +extern void scan_left_brace(void); +extern void scan_optional_equals(void); + +extern int cur_val; /* value returned by numeric scanners */ +extern int cur_val1; /* delcodes are sometimes 51 digits */ +extern int cur_val_level; /* the ``level'' of this value */ + +extern void scan_something_simple(halfword cmd, halfword subitem); +extern void scan_something_internal(int level, boolean negative); + +extern void scan_limited_int(int max, const char *name); + +extern void negate_cur_val(boolean delete_glue); + +# define scan_register_num() scan_limited_int(65535,"register code") +# define scan_mark_num() scan_limited_int(65535,"marks code") +# define scan_char_num() scan_limited_int(biggest_char,"character code") +# define scan_four_bit_int() scan_limited_int(15,NULL) +# define scan_math_family_int() scan_limited_int(255,"math family") +# define scan_real_fifteen_bit_int() scan_limited_int(32767,"mathchar") +# define scan_big_fifteen_bit_int() scan_limited_int(0x7FFFFFF,"extended mathchar") +# define scan_twenty_seven_bit_int() scan_limited_int(0777777777,"delimiter code") + +extern void scan_fifteen_bit_int(void); +extern void scan_fifty_one_bit_int(void); + +# define octal_token (other_token+'\'') /* apostrophe, indicates an octal constant */ +# define hex_token (other_token+'"') /* double quote, indicates a hex constant */ +# define alpha_token (other_token+'`') /* reverse apostrophe, precedes alpha constants */ +# define point_token (other_token+'.') /* decimal point */ +# define comma_token (other_token+',') /* decimal comma */ +# define plus_token (other_token + '+') +# define minus_token (other_token + '-') +# define continental_point_token (other_token+',') /* decimal point, Eurostyle */ +# define infinity 017777777777 /* the largest positive value that \TeX\ knows */ +# define zero_token (other_token+'0') /* zero, the smallest digit */ +# define nine_token (other_token+'9') /* zero, the smallest digit */ +# define A_token (letter_token+'A') /* the smallest special hex digit */ +# define other_A_token (other_token+'A') /* special hex digit of type |other_char| */ +extern int radix; + +extern void scan_int(void); + +extern int cur_order; + +# define scan_normal_dimen() scan_dimen(false,false,false) + +extern void scan_dimen(boolean mu, boolean inf, boolean shortcut); +extern void scan_glue(int level); + +extern halfword the_toks(void); +extern str_number the_scanned_result(void); +extern void set_font_dimen(void); +extern void get_font_dimen(void); + +# define default_rule 26214 /* 0.4\thinspace pt */ + +extern halfword scan_rule_spec(void); + +extern void scan_font_ident(void); +extern void scan_general_text(void); +extern void get_x_or_protected(void); +extern halfword scan_toks(boolean macrodef, boolean xpand); + +extern void scan_normal_glue(void); +extern void scan_mu_glue(void); + +/* extern int add_or_sub(int x, int y, int max_answer, boolean negative); */ +/* extern int quotient(int n, int d); */ +extern int fract(int x, int n, int d, int max_answer); + +/* extern void scan_expr(void); */ + +#endif |