[Oberon] How do I set initial window size in Unix/Linux Oberon?

B. Smith-Mannschott benpsm at gmail.com
Fri May 19 10:29:32 CEST 2006


> If you want a smaller Oberon desktop, you have to modify the following
> lines in procedure OpenDisp in module Displays.Mod and recompile
> it:
>
>                (* adjust to physical window size *)
>                 X11.GetGeometry( d.display, d.primary, gRoot,
>                                                 gX, gY, gW, gH, gBW, gD );
>                 IF gW MOD 8 # 0 THEN  DEC( gW, gW MOD 8 )  END;
>                 X11.ResizeWindow( d.display, d.primary, gW, gH );
>

When I try to compile Unix/Displays.Mod from the Unix Oberon sources,
I get the following TRAP from the compiler:


Trap   5.2  (CASE invalid)
sp =  BFFFE964, bp =  BFFFE974, pc =  082563B3

OPT.OutStruct  @ 21355
	mod	=  00000000H	: OPT.ModDesc
	tag	= -17
	tobj	=  B7CAF040H	: OPT.ObjDesc
	typ	=  B718E940H	: OPT.StrDesc

OPT.OutObj  @ 21541
	obj	=  B718E400H	: OPT.ObjDesc

OPT.OutScope  @ 21978
	first	= FALSE
	i	= 8
	obj	=  B718E400H	: OPT.ObjDesc
	public	= TRUE
	scope	=  B7DA17E0H	: OPT.ObjDesc

OPT.Export  @ 22789
	aliasName	= "@self"
	extsf	= FALSE
	modName	= "Displays"
	mods	= 8
	newsf	= FALSE

Compiler.Module  @ 3343
	breakpc	= 2147483647  (= 7FFFFFFFH)
	codeOpt	= {0, 3, 5 .. 6, 20}
	error	= FALSE
	extSF	= FALSE
	log	=  B7CE1A60H	: Texts.TextDesc
	modName	= "Displays"
	name	= ""
	newSF	= FALSE
	options	= ""
	p	=  B7C85DC0H	: OPT.NodeDesc
	parserOpt	= {}
	source	= 	: Texts.Reader

Somehow the value of tag computed in OutStruct is coming to -17, which
isn't any one of the listed constants. No idea why. Am I using the
wrong compiler, or something?

PROCEDURE OutStruct(typ: Struct);
	VAR tag: SHORTINT; mod: Module; tobj: Object;
BEGIN
	IF	typ=NIL	THEN
		...
	ELSE	...
		tag:=strucFormSF[typ.form]+strucCompSF[typ.comp];
		...
		OPM.SymW(CHR(tag));
		...
		CASE	tag	OF
		| SFtypDynArr, SFtypOpenArr:
		| SFtypArray: OPM.SymWNum (typ.n);
		| SFtypPointer:
		| SFtypRecord:	OutRecord(typ)
		| SFtypProcTyp:	OutParList(typ.link)
		END
	END
END OutStruct;


// ben

p.s. I"ve found a crude work-around for the gigantic size by using
XNest, but *boy* is it slow.


More information about the Oberon mailing list