blob: 310f210406bc6bd7f7db509fdb2ae3e975b3eaa0 (
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
|
%D \module
%D [ file=syst-mes,
%D version=2010.06.03,
%D title=\CONTEXT\ System Macros,
%D subtitle=Messages,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright=PRAGMA]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\chardef\statuswidth=15
\chardef\statuswrite=16
\newtoks\everywritestring
\def\writedirect {\immediate\write\statuswrite}
\def\writeline {\writedirect{}}
\def\writestring#1{\begingroup\the\everywritestring\writedirect{#1}\endgroup}
\let\writebanner \writestring
\let\message \normalmessage
\ifx\normalwritestatus\undefined \def\normalwritestatus#1#2{\writedirect{#1 : #2}} \fi
% no xml logging in format generation
\everyjob {% we can redefine at the lua end !
\doif {\ctxlua{tex.sprint(logs.get_method())}} {xml} {%
\long\def\writebanner #1{\writestring {<m t='banner'>#1</m>}}%
\long\def\writestatus#1#2{\writestring {<m t='#1'>#2</m>}}%
\long\def\message #1{\normalmessage{<m t='message'>#1</m>}}%
\let\normalwritestatus\writestatus
}%
}
\endinput
|