summaryrefslogtreecommitdiff
path: root/tex/context/base/syst-prm.tex
blob: bb34cb4d8148b1ef75d554ccdf8453e7dec339c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
%D \module
%D   [       file=syst-prm,
%D        version=1999.03.17,
%D          title=\CONTEXT\ System Macros,
%D       subtitle=Primitive Behavior, 
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for 
%C details. 

\unprotect 

%D Saved primitives are preceded by \type {\normal}, as in: 

\let\normalfmtversion\fmtversion

%D When applicable, we also load the \ETEX\ source and 
%D definition files. 

\bgroup \obeylines 

\ifx\eTeXversion\undefined 

  \long\gdef\beginETEX#1\endETEX%
    {}

  \gdef\beginTEX%
    {\bgroup\obeylines\dobeginTEX}

  \gdef\dobeginTEX#1 
    {\egroup}

  \global\let\endTEX\relax

\else

  \long\gdef\beginTEX#1\endTEX%
    {}

  \gdef\beginETEX% 
    {\bgroup\obeylines\dobeginETEX}

  \gdef\dobeginETEX#1 
    {\egroup\immediate\write16%
       {system (E-TEX) : [line \the\inputlineno] \detokenize{#1}}}

  \global\let\endETEX\relax

\fi 

\ifx\OmegaVersion\undefined 

  \long\gdef\beginOMEGA#1\endOMEGA%
    {}

\else

  \gdef\beginOMEGA% 
    {\bgroup\obeylines\dobeginOMEGA}

  \gdef\dobeginOMEGA#1 
    {\egroup\immediate\write16%
       {system (OMEGA) : [line \the\inputlineno] \string#1}}

  \global\let\endOMEGA\relax

\fi

\egroup

%D Let's get rid of this one: 

\def\wlog#1{} 

%D Just for tracing purposes we set:

\tracingstats=1

%D We don't like outer commands, and we always want access 
%D to the original \type {\input} primitive. 

\let\normalouter = \outer  \let\outer\relax
\let\normalinput = \input  

%D We need to make sure that we start up in \DVI\ mode, so, 
%D after testing for running \PDFTEX, we default to \DVI.  

\ifx\pdftexversion\undefined \newcount\pdfoutput \fi \pdfoutput=0

%D To circumvent dependencies, we can postpone certain 
%D initializations to dumping time, by appending them to the 
%D \type {\everydump} token register. 

\newtoks \everydump 

\let\normaldump \dump 

\def\dump{\the\everydump\normaldump}

\protect \endinput