~ubuntu-branches/ubuntu/natty/luatex/natty

« back to all changes in this revision

Viewing changes to source/texk/web2c/luatexdir/tex/conditional.h

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2009-12-25 09:47:05 UTC
  • mfrom: (1.1.9 upstream) (4.2.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091225094705-y33rpflo8t4u9nag
Tags: 0.50.0-1
* new upstream release
* disable fix-hurd-ftbfs patch, included upstream
* disable upstram-fixes, included upstream
* disable ubuntu_libpoppler-0.11, not needed anymore

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* conditional.h
 
2
   
 
3
   Copyright 2009 Taco Hoekwater <taco@luatex.org>
 
4
 
 
5
   This file is part of LuaTeX.
 
6
 
 
7
   LuaTeX is free software; you can redistribute it and/or modify it under
 
8
   the terms of the GNU General Public License as published by the Free
 
9
   Software Foundation; either version 2 of the License, or (at your
 
10
   option) any later version.
 
11
 
 
12
   LuaTeX is distributed in the hope that it will be useful, but WITHOUT
 
13
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
14
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 
15
   License for more details.
 
16
 
 
17
   You should have received a copy of the GNU General Public License along
 
18
   with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
 
19
 
 
20
/* $Id: conditional.h 3261 2009-12-18 11:38:21Z taco $ */
 
21
 
 
22
#ifndef CONDITIONAL_H
 
23
#  define CONDITIONAL_H
 
24
 
 
25
 
 
26
#  define unless_code 32        /* amount added for `\.{\\unless}' prefix */
 
27
 
 
28
typedef enum {
 
29
    if_char_code = 0,           /*  `\.{\\if}' */
 
30
    if_cat_code = 1,            /*  `\.{\\ifcat}' */
 
31
    if_int_code = 2,            /*  `\.{\\ifnum}' */
 
32
    if_dim_code = 3,            /*  `\.{\\ifdim}' */
 
33
    if_odd_code = 4,            /*  `\.{\\ifodd}' */
 
34
    if_vmode_code = 5,          /*  `\.{\\ifvmode}' */
 
35
    if_hmode_code = 6,          /*  `\.{\\ifhmode}' */
 
36
    if_mmode_code = 7,          /*  `\.{\\ifmmode}' */
 
37
    if_inner_code = 8,          /*  `\.{\\ifinner}' */
 
38
    if_void_code = 9,           /*  `\.{\\ifvoid}' */
 
39
    if_hbox_code = 10,          /*  `\.{\\ifhbox}' */
 
40
    if_vbox_code = 11,          /*  `\.{\\ifvbox}' */
 
41
    ifx_code = 12,              /*  `\.{\\ifx}' */
 
42
    if_eof_code = 13,           /*  `\.{\\ifeof}' */
 
43
    if_true_code = 14,          /*  `\.{\\iftrue}' */
 
44
    if_false_code = 15,         /*  `\.{\\iffalse}' */
 
45
    if_case_code = 16,          /*  `\.{\\ifcase}' */
 
46
    if_def_code = 17,           /* `\.{\\ifdefined}' */
 
47
    if_cs_code = 18,            /* `\.{\\ifcsname}'  */
 
48
    if_font_char_code = 19,     /* `\.{\\iffontchar}' */
 
49
    if_in_csname_code = 20,     /* `\.{\\ifincsname}' */
 
50
    if_primitive_code = 21,     /*  `\.{\\ifprimitive}' */
 
51
    if_abs_num_code = 22,       /* `\.{\\ifabsnum}' */
 
52
    if_abs_dim_code = 23,       /* `\.{\\ifabsdim}' */
 
53
} if_type_codes;
 
54
 
 
55
 
 
56
 
 
57
 
 
58
#  define if_limit_subtype(A) subtype((A)+1)
 
59
#  define if_limit_type(A) type((A)+1)
 
60
#  define if_line_field(A) vlink((A)+1)
 
61
 
 
62
typedef enum {
 
63
    if_code = 1,                /* code for \.{\\if...} being evaluated */
 
64
    fi_code = 2,                /* code for \.{\\fi} */
 
65
    else_code = 3,              /* code for \.{\\else} */
 
66
    or_code = 4,                /* code for \.{\\or} */
 
67
} else_type_codes;
 
68
 
 
69
extern halfword cond_ptr;       /* top of the condition stack */
 
70
extern int if_limit;            /* upper bound on |fi_or_else| codes */
 
71
extern int cur_if;              /* type of conditional being worked on */
 
72
extern int if_line;             /* line where that conditional began */
 
73
extern int skip_line;           /* skipping began here */
 
74
 
 
75
extern void pass_text(void);
 
76
extern void push_condition_stack(void);
 
77
extern void pop_condition_stack(void);
 
78
extern void change_if_limit(int l, halfword p);
 
79
 
 
80
extern void conditional(void);
 
81
 
 
82
#endif