blob: 361c1a9798a6e304f5d418464a8a1d007868fe3d (
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
|
%D \module
%D [ file=core-obj,
%D version=1998.01.15,
%D title=\CONTEXT\ Core Macros,
%D subtitle=Object Handling,
%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
\def\mkcheckobjectreferences
{\startnointerference
\protectlabels
\doutilities{objectreferences}\jobname\empty\relax\relax
\global\let\checkobjectreferences\relax
\stopnointerference}
\def\setobjectreferences
{\def\objectreference##1##2##3##4%
{\ifundefined{\r!driver##1::##2}%
\setxvalue{\r!driver##1::##2}{{##3}{##4}}%
\else
\showmessage\m!references{31}{[##1 ##2=>##3/##4]}%
\fi}}
\def\resetobjectreferences
{\let\objectreference\gobblefourarguments}
\resetobjectreferences
\def\mkregisterobjectreference#1#2#3%
{\checkobjectreferences
\blabelgroup
\expanded{\writeutilitycommand{\noexpand\objectreference{#1}{#2}{#3}{\noexpand\realfolio}}}%
\setxvalue{\r!driver#1::#2}{{#3}{\noexpand\realfolio}}%
\elabelgroup}
\def\mkoverloadobjectreference#1#2#3%
{\checkobjectreferences
\blabelgroup
\setxvalue{\r!driver#1::#2}{{#3}{\noexpand\realfolio}}%
\elabelgroup}
\def\dodogetobjectreference#1#2#3#4#5%
{\checkobjectreferences
\blabelgroup
\ifundefined{\r!driver#3::#4}%
\showmessage\m!references{30}{[#3 #4=>#3/#4]}%
\xdef#5{#2{#3}{#4}}%
\else
\xdef#5{\@EAEAEA#1\csname\r!driver#3::#4\endcsname}%
\fi
\elabelgroup}
\def\mkgetobjectreference
{\dodogetobjectreference\firstoftwoarguments\defaultobjectreference}
\def\mkgetobjectreferencepage
{\dodogetobjectreference\secondoftwoarguments\defaultobjectpage}
\def\mkifobjectreferencefoundelse#1#2%
{\checkobjectreferences
\blabelgroup \ifcsname\r!driver#1::#2\endcsname
\elabelgroup \expandafter\firstoftwoarguments
\else
\elabelgroup \expandafter\secondoftwoarguments
\fi}
\protect \endinput
|