XMesaCmplr6:
PROGRAM
IMPORTS
Cmplr6Defs1, Cmplr6Defs2, <<D1: Cmplr6Defs3, D2: Cmplr6Defs3,>>
Cmplr6Defs4, Cmplr6Defs5, Cmplr6Defs6, RunRegressions, XMesaProcs
EXPORTS PhonyDef =
BEGIN
This is a workaround for a bug in XDE:
Modules which appear at the beginning of a config and which
do not export any values can cause address faults when starting other
modules.
someVar: PUBLIC CARDINAL ¬ 3;
filename: LONG STRING ¬ "XMesaCmplr6"L;
XMesaCall6: PROCEDURE = {
XMesaProcs.PrintCR;
XMesaProcs.PrintS[filename];
XMesaProcs.PrintCR;
XMesa6a[]; --Importing constants and types
XMesa6b[]; --READONlY variables and pointers to READONlY var's
XMesa6c[]; --Defaults inside an interface
XMesa6d[]; --Imporing two instances of the same defs file
XMesa6e[]; --INLINE procedures
XMesa6g[]; --Calling an interface which is imported by another interface
XMesaProcs.PrintS["Done"L];
XMesaProcs.PrintCR;
}; --end of XMesaCall6
XMesa6a:
PROCEDURE = {
--importing constants and types
XMesa6aPair: TYPE = Cmplr6Defs0.Pair;
XMesa6aPairPtr: LONG POINTER TO XMesa6aPair ¬ NIL;
pair: XMesa6aPair ¬ [-86, 86];
XMesa6aPairPtr ¬ @pair;
XMesaProcs.Ischarequal[Cmplr6Defs0.charA, 'A, 3300, filename];
XMesaProcs.Isequal[Cmplr6Defs0.limit, 87, 3310, filename];
XMesaProcs.Isequal[XMesa6aPairPtr.first, -86, 3320, filename];
XMesaProcs.Isequal[XMesa6aPairPtr.second, 86, 3330, filename];
};
XMesa6b: PROCEDURE = { --READONlY variables and pointers to READONlY var's
p: LONG POINTER TO READONLY INTEGER ¬ @Cmplr6Defs1.var2;
IF Cmplr6Defs1.var2 # 15 THEN XMesaProcs.PutFailMessage[3350, filename];
Cmplr6Defs1.var1 ¬ 20;
IF Cmplr6Defs1.var1 # 20 THEN XMesaProcs.PutFailMessage[3370, filename];
IF p # 15 THEN XMesaProcs.PutFailMessage[3390, filename];
};
XMesa6c: PROCEDURE = { --Defaults inside an interface
int: INTEGER;
Cmplr6Defs2.var1 ¬ -100;
int ¬ Cmplr6Defs2.AddToVar[50];
XMesaProcs.Isequal[int, -50, 3410, filename];
int ¬ Cmplr6Defs2.Defs2Proc1[];
XMesaProcs.Isequal[int, -198, 3420, filename];
int ¬ Cmplr6Defs2.Defs2Proc2[];
XMesaProcs.Isequal[int, -198, 3430, filename];
};
XMesa6d:
PROCEDURE = {
--Imporing two instances of the same defs file
<< AR 1046
int1, int2: INTEGER;
D1.var1 ¬ -100;
D2.var1 ¬ -200;
This is a princops Binder bug too:
IF D1.var1 <= D2.var1 THEN XMesaProcs.PutFailMessage[3450, filename];
int1 ¬ D1.Defs3Proc1[D1.var1];
int2 ¬ D2.Defs3Proc1[D2.var1];
This is a princops Binder bug too:
IF D1.var1 = D2.var1 THEN XMesaProcs.PutFailMessage[3460, filename];
IF D1.var1 # -200 THEN XMesaProcs.PutFailMessage[3470, filename];>>
};
XMesa6e:
PROCEDURE = {
--INLINE procedures
int: INTEGER;
FOR begin: CARDINAL IN [1..59] DO Cmplr6Defs4.Defs4Proc2[begin]; ENDLOOP;
int ¬ Cmplr6Defs4.Defs4Proc3[23];
XMesaProcs.Isequal[int, -23, 3480, filename];
int ¬ Cmplr6Defs4.Defs4Proc3[59];
XMesaProcs.Isequal[int, -59, 3490, filename];
};