Article View: comp.sys.acorn.tech
Article #95Re: res_init()
From: TMOTA
Date: Sat, 01 Aug 1992 01:25
Date: Sat, 01 Aug 1992 01:25
29 lines
1804 bytes
1804 bytes
snb90@uk.ac.soton.ecs (Stewart Brodie) writes: >However, what I want to know is, is it safe to call res_init TWICE in >the same program, ie. after doing template_init() and resspr_init() with >the first variable, can I switch it? It seems to work but is it safe, >or might some of the RISC OS library modules start to call the res >functions again during execution? I think that all res_init() does is to set the pathname of the resource directory that RISC OS Lib stores and uses internally,though as Acorn haven't supplied a) a decent manual, or b) any source code, I can't be 100% certain... In this case, it should be safe to call res_init() twice, but the first directory will then be 'lost' (i.e it should be OK to load read-only resources, then swap directories for subsequent use of r/w resources) However, you can't really rely on this, as Acorn probably reserve the right to completely bugger up any programs that make this assumption by changing res_init() to crash or something if it's called twice... Not that they'd do this to spite us, but just that in future releases of ROLib this assumption may not hold true... -- _________________ "I'd like to answer this question in two ways: /____ _ _/_ __ First in my normal voice, and then // / //_//_ /_/ in a silly, high-pitched whine." (Monty Python)
Technical Details
Message-ID:
<1992Aug1.012503.2246@cs.aukuni.ac.nz>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!comp.vuw.ac.nz!waikato.ac.nz!aukuni.ac.nz!cs18.cs.aukuni.ac.nz!jwil1References:
<12394@ecs.soton.ac.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!comp.vuw.ac.nz!waikato.ac.nz!aukuni.ac.nz!cs18.cs.aukuni.ac.nz!jwil1 Newsgroups: comp.sys.acorn.tech Subject: Re: res_init() Message-ID: <1992Aug1.012503.2246@cs.aukuni.ac.nz> From: jwil1@cs.aukuni.ac.nz (TMOTA) Date: Sat, 1 Aug 1992 01:25:03 GMT Sender: jwil1@cs.aukuni.ac.nz (TMOTA) References: <12394@ecs.soton.ac.uk> Organization: Computer Science Dept. University of Auckland Lines: 29