4 ; Locate user-configurable resource files
6 ; © 1995-1998 Straylight
9 ;----- Licensing note -------------------------------------------------------
11 ; This file is part of Straylight's Sapphire library.
13 ; Sapphire is free software; you can redistribute it and/or modify
14 ; it under the terms of the GNU General Public License as published by
15 ; the Free Software Foundation; either version 2, or (at your option)
18 ; Sapphire is distributed in the hope that it will be useful,
19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ; GNU General Public License for more details.
23 ; You should have received a copy of the GNU General Public License
24 ; along with Sapphire. If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 ;----- Overview -------------------------------------------------------------
34 [ :LNOT::DEF:choices__dfn
37 ; --- choices_useChoices ---
39 ; On entry: R0 == 0 to disable use of `Choices', >0 to enable, or <0 to
42 ; On exit: R0 == previous setting
44 ; Use: This call allows an application to determine whether its
45 ; user-configurable resources are looked for in Acorn's
46 ; `Choices' directory, or only in the application's directory.
48 ; An application would typically make this call after parsing
49 ; its command-line options, to allow a Network Manager to
50 ; enable the `Choices' support.
52 IMPORT choices_useChoices
54 ; --- choices_find ---
56 ; On entry: R0 == pointer to resource filename
57 ; R1 == pointer to buffer to build filename in
59 ; bit 0 == file will be written to (use Choices$Write)
61 ; On exit: R0 == pointer to filename
62 ; R1 == pointer to terminating NULL
63 ; CS if the file was found, else CC
65 ; Use: Locates a user-configurable resource file. The search order
66 ; depends on (a) whether the file will be written (bit 0 of R2)
67 ; and (b) whether the use of Acorn's `Choices' system is
70 ; The search order is as follows:
72 ; * Choices:appName.leaf / <Choices$Write>.appName.leaf
75 ; (i.e. it looks in the `Choices' structure first, and if that
76 ; fails, it will use res_find).
82 ;----- That's all, folks ----------------------------------------------------