Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucselx!bionet!ames!aplvax!ames!rex!wuarchive!uunet!mcsun!unido!laura!exunido!haacke From: fiebelko@maria.informatik.uni-dortmund.de (Dieter Fiebelkorn) Newsgroups: comp.sys.atari.st.tech Subject: Re: two RSC files? Message-ID: <9101040958.AA17860@maria.informatik.uni-dortmund.de> Date: 4 Jan 91 09:58:34 GMT Sender: news@laura.UUCP Reply-To: haacke@exunido.UUCP (Ralf Haacke) Organization: University of Dortmund, W-Germany Lines: 68 To: haacke@exunido.informatik.uni-dortmund.de Status: R Dear Jeroen, > I am writing a program that uses a lot of dialogues. > The size of the RSC-file is approaching the 32000 byte-limit. You have a 64kB-limit (supported by Kuma-RCS 2.x & Digital RCS 2.x) > Can I split up the RSC-file in two parts? Yes, you can! > I would write the following program: > rsrc_load(file1); > rsrc_gaddr(...forms from file1...); > rsrc_load(file2); > rsrc_gaddr(...forms from file2...); > ...main program... > rsrc_free(); > rsrc_free(); NEARLY right. Atari don't keep free the memory of the first resource-file. You must save the address for the full resource tree from global[5,6]. This address points to the __first__ OBJECT of the loading resource file. In most cases it's the IBOX for the menu-tree. Two little routines, which will help you: ------------ void *rsrc_get (void) { extern int *global /* = _GemParBlk.global (for Turbo C) */ ; OBJECT **rsc; rsc = (OBJECT **) &(global[5]); return (*rsc); } void rsrc_put (void *addr) { extern int *global /* = _GemParBlk.global (for Turbo C) */ ; OBJECT **rsc; rsc = (OBJECT **) &(global[5]); *rsc = addr; } main() { void *save_resorce; rsrc_load(file1); rsrc_gaddr(...forms from file1...); save_resorce = rsrc_get(); rsrc_load(file2); rsrc_gaddr(...forms from file2...); ...main program... rsrc_free(); rsrc_put(save_resorce); rsrc_free(); } ------------ I hope it's right !!!! and would help you. Ciao --- Dieter -------------------------------------------------------------------------------- | Dieter Fiebelkorn | With a rubber duck :-) | | fiebelko@petra.informatik.uni-dortmund.de | one's never alone! :^{ | --------------------------------------------------------------------------------