; ; choices.choices.sh ; ; Locate user-configurable resource files ; ; © 1995-1998 Straylight ; ;----- Licensing note ------------------------------------------------------- ; ; This file is part of Straylight's Sapphire library. ; ; Sapphire is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 2, or (at your option) ; any later version. ; ; Sapphire is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with Sapphire. If not, write to the Free Software Foundation, ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ;----- Overview ------------------------------------------------------------- ; ; Functions provided: ; ; choices_useChoices ; choices_find [ :LNOT::DEF:choices__dfn GBLL choices__dfn ; --- choices_useChoices --- ; ; On entry: R0 == 0 to disable use of `Choices', >0 to enable, or <0 to ; read ; ; On exit: R0 == previous setting ; ; Use: This call allows an application to determine whether its ; user-configurable resources are looked for in Acorn's ; `Choices' directory, or only in the application's directory. ; ; An application would typically make this call after parsing ; its command-line options, to allow a Network Manager to ; enable the `Choices' support. IMPORT choices_useChoices ; --- choices_find --- ; ; On entry: R0 == pointer to resource filename ; R1 == pointer to buffer to build filename in ; R2 == flags: ; bit 0 == file will be written to (use Choices$Write) ; ; On exit: R0 == pointer to filename ; R1 == pointer to terminating NULL ; CS if the file was found, else CC ; ; Use: Locates a user-configurable resource file. The search order ; depends on (a) whether the file will be written (bit 0 of R2) ; and (b) whether the use of Acorn's `Choices' system is ; enabled. ; ; The search order is as follows: ; ; * Choices:appName.leaf / .appName.leaf ; * res_find(leaf) ; ; (i.e. it looks in the `Choices' structure first, and if that ; fails, it will use res_find). IMPORT choices_find ] ;----- That's all, folks ---------------------------------------------------- END