summaryrefslogtreecommitdiff
path: root/source/luametatex/source/tex/texmainbody.h
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2022-09-16 15:53:42 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2022-09-16 15:53:42 +0200
commitc161b7d6fe142231346cc1844e6e27c0ab7718c1 (patch)
tree3fd877b8986137703e987e4651a2db8e946a0f72 /source/luametatex/source/tex/texmainbody.h
parente94fa4dc30ec28a6727aa85e17aaac18b76aeadb (diff)
downloadcontext-c161b7d6fe142231346cc1844e6e27c0ab7718c1.tar.gz
2022-09-16 14:41:00
Diffstat (limited to 'source/luametatex/source/tex/texmainbody.h')
-rw-r--r--source/luametatex/source/tex/texmainbody.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/source/luametatex/source/tex/texmainbody.h b/source/luametatex/source/tex/texmainbody.h
new file mode 100644
index 000000000..d0d329e8a
--- /dev/null
+++ b/source/luametatex/source/tex/texmainbody.h
@@ -0,0 +1,43 @@
+/*
+ See license.txt in the root of this project.
+*/
+
+# ifndef LMT_MAINBODY_H
+# define LMT_MAINBODY_H
+
+/* Global variables */
+
+typedef enum run_states {
+ initializing_state,
+ updating_state,
+ production_state,
+} run_states;
+
+typedef enum ready_states {
+ output_disabled_state,
+ output_enabled_state,
+} ready_states;
+
+typedef struct main_state_info {
+ int run_state; /*tex Are we |INITEX|? */
+ int ready_already; /*tex A typical \TEX\ variable name. */
+ double start_time;
+} main_state_info ;
+
+extern main_state_info lmt_main_state ;
+
+/*tex
+
+ The following procedure, which is called just before \TEX\ initializes its input and output,
+ establishes the initial values of the date and time. It calls a macro-defined |dateandtime|
+ routine. |dateandtime| in turn is also a |CCODE\ macro, which calls |get_date_and_time|,
+ passing it the addresses of the day, month, etc., so they can be set by the routine.
+ |get_date_and_time| also sets up interrupt catching if that is conditionally compiled in the
+ \CCODE\ code.
+
+*/
+
+extern void tex_main_body (void);
+extern void tex_close_files_and_terminate (int error);
+
+# endif