chiark / gitweb /
Initial revision
[ssr] / StraySrc / Libraries / Sapphire / csapph / h / res
1 /*
2  * res.h
3  *
4  * [Generated from res, 25 September 1996]
5  */
6
7 #if !defined(__CC_NORCROFT) || !defined(__arm)
8   #error You must use the Norcroft ARM Compiler for Sapphire programs
9 #endif
10
11 #pragma include_only_once
12 #pragma force_top_level
13
14 #ifndef __res_h
15 #define __res_h
16
17 #ifndef __sapphire_h
18   #include "sapphire.h"
19 #endif
20
21 /*----- Overview ----------------------------------------------------------*
22  *
23  * Functions provided:
24  *
25  *  res_exists
26  *  res_country
27  *  res_find
28  *  res_init
29  */
30
31 /* --- res_exists --- *
32  *
33  * On entry:    R0 == pointer to pathname
34  *
35  * On exit:     CS if the file exists, CC otherwise
36  *
37  * Use:         Tries to find the named file.  The file is deemed to exist
38  *              if OS_File can return a valid object type for it (i.e. not
39  *              `non-existant object' or actually raising errors).
40  */
41
42 extern routine res_exists;
43
44 /* --- res_country --- *
45  *
46  * On entry:    R0 == pointer to a buffer to use
47  *
48  * On exit:     R0 == pointer to country name (may not be in the buffer)
49  *
50  * Use:         Reads the name of the current country.  If no name can be
51  *              found, it returns a pointer to the string `UK' which should
52  *              do as a suitable default
53  */
54
55 extern routine res_country;
56
57 /* --- res_find --- *
58  *
59  * On entry:    R0 == pointer to resource filename
60  *              R1 == pointer to buffer to build filename in
61  *
62  * On exit:     R0 == pointer to start of full pathname (R1 on entry)
63  *              R1 == pointer to terminating null character
64  *              CS if the file could actually be found, CC otherwise
65  *
66  * Use:         Locates a resource file.  It searches, in order:
67  *
68  *              * resPrefix.Resources.leaf[suffix]
69  *              * resPrefix.Resources.country.leaf[suffix]
70  *              * resPrefix.leaf[suffix]
71  *
72  *              returning the last if none of them could be found.  Note
73  *              that `country' here is the currently configured country
74  *              setting, and `suffix' is the WIMP mode aspect ratio suffix
75  *              for the current mode (RISC OS 3 only).
76  */
77
78 extern routine res_find;
79
80 /* --- res_init --- *
81  *
82  * On entry:    R0 == pointer to application name
83  *
84  * On exit:     --
85  *
86  * Use:         Initialises the resource prefix to <appname$Dir>
87  */
88
89 extern routine res_init;
90
91 /*----- That's all, folks -------------------------------------------------*/
92
93 #endif