texmainbody.h /size: 1190 b    last modification: 2024-01-16 10:22
1/*
2    See license.txt in the root of this project.
3*/
4
5# ifndef LMT_MAINBODY_H
6# define LMT_MAINBODY_H
7
8/* Global variables */
9
10typedef enum run_states {
11    initializing_state,
12    updating_state,
13    production_state,
14} run_states;
15
16typedef enum ready_states {
17    output_disabled_state,
18    output_enabled_state,
19} ready_states;
20
21typedef struct main_state_info {
22    int    run_state;       /*tex Are we |INITEX|? */
23    int    ready_already;   /*tex A typical \TEX\ variable name. */
24    double start_time;
25} main_state_info ;
26
27extern main_state_info lmt_main_state ;
28
29/*tex
30
31    The following procedure, which is called just before \TEX\ initializes its input and output,
32    establishes the initial values of the date and time. It calls a macro-defined |dateandtime|
33    routine. |dateandtime| in turn is also a |CCODE\ macro, which calls |get_date_and_time|,
34    passing it the addresses of the day, month, etc., so they can be set by the routine.
35    |get_date_and_time| also sets up interrupt catching if that is conditionally compiled in the
36    \CCODE\ code.
37
38*/
39
40extern void tex_main_body                 (void);
41extern void tex_close_files_and_terminate (int error);
42
43# endif
44