Thread View: comp.sys.acorn.tech
2 messages
2 total messages
Started by Stewart Brodie
Thu, 30 Jul 1992 19:15
res_init()
Author: Stewart Brodie
Date: Thu, 30 Jul 1992 19:15
Date: Thu, 30 Jul 1992 19:15
16 lines
1020 bytes
1020 bytes
Small query about res_init(). I have written a C program which uses the RISC OS library, and I want to comply with the guidelines for software by using a different OS variable to point to the R/W stuff from the Read Only stuff. So I have set up: Program$Dir and ProgramData$Dir. 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? -- Stewart Brodie snb90@uk.ac.soton.ecs
Re: res_init()
Author: 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)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads