Initial revision
[ssr] / StraySrc / Libraries / Sapphire / csapph / h / msgs
CommitLineData
2ee739cc 1/*
2 * msgs.h
3 *
4 * [Generated from msgs, 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 __msgs_h
15#define __msgs_h
16
17#ifndef __sapphire_h
18 #include "sapphire.h"
19#endif
20
21/*----- Overview ----------------------------------------------------------*
22 *
23 * Functions provided:
24 *
25 * msgs_load
26 * msgs_build
27 * msgs_error
28 * msgs_lookup
29 * msgs_init
30 */
31
32/* --- msgs_load --- *
33 *
34 * On entry: R0 == pointer to filename
35 *
36 * On exit: May return an error
37 *
38 * Use: Reads in the given messages file.
39 */
40
41extern routine msgs_load;
42
43/* --- msgs_build --- *
44 *
45 * On entry: R0 == pointer to a message string
46 * R1 == pointer to output buffer
47 *
48 * On exit: R0 == pointer to buffer (R1 on entry)
49 * R1 == pointer to terminating null
50 *
51 * Use: Builds a message string, by substituting message references
52 * by their values. Each reference of the form `$tag' (or
53 * optionally `$(tag)', to avoid having to have a trailing)
54 * space is replaced by the actual message. A literal `$' sign
55 * may be represented as `$$'.
56 */
57
58extern routine msgs_build;
59
60/* --- msgs_error --- *
61 *
62 * On entry: R0 == pointer to an error skeleton string:
63 * R0+0 == error number
64 * R0+4 == message tag-and-default (null-terminated)
65 * R2-R11 == filler strings (not message tags)
66 *
67 * On exit: R0 == pointer to translated error message (in error buffer)
68 * R1 == pointer to null terminator of message
69 *
70 * Use: Performs string sustitution on an error message (as done by
71 * str_subst), but translating the error string.
72 */
73
74extern routine msgs_error;
75
76/* --- msgs_lookup --- *
77 *
78 * On entry: R0 == message tag (and default message)
79 *
80 * On exit: R0 == pointer to located message
81 *
82 * Use: Returns the real message from its tag. If the tag does not
83 * exist, then the default message is used. If that is not
84 * supplied, then the tag name itself is returned (ie. R0
85 * is preserved).
86 */
87
88extern routine msgs_lookup;
89
90/* --- msgs_init --- *
91 *
92 * On entry: --
93 *
94 * On exit: --
95 *
96 * Use: Initialises the message system.
97 */
98
99extern routine msgs_init;
100
101/*----- That's all, folks -------------------------------------------------*/
102
103#endif