Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!unido!laura!exunido!haacke From: haacke@exunido.uucp (Ralf Haacke) Newsgroups: comp.sys.atari.st.tech Subject: Re: two RSC files? Message-ID: <2905@laura.UUCP> Date: 4 Jan 91 10:01:32 GMT Sender: news@laura.UUCP Reply-To: haacke@exunido.UUCP (Ralf Haacke) Organization: University of Dortmund, W-Germany Lines: 77 From fiebelko@maria.informatik.uni-dortmund.de Fri Jan 4 10:58:23 1991 Received: by exunido.irb.informatik.uni-dortmund.de id AA04108 (0); Fri, 4 Jan 91 10:58:18 +0100 From: Dieter Fiebelkorn Date: Fri, 4 Jan 91 10:58:34 +0100 Message-Id: <9101040958.AA17860@maria.informatik.uni-dortmund.de> To: haacke@exunido.informatik.uni-dortmund.de Subject: Re: two RSC files? 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! :^{ | --------------------------------------------------------------------------------