4 ; Message file handling
6 ; © 1994-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 -------------------------------------------------------------
37 [ :LNOT::DEF:msgs__dfn
42 ; On entry: R0 == pointer to filename
44 ; On exit: May return an error
46 ; Use: Reads in the given messages file.
52 ; On entry: R0 == pointer to a message string
53 ; R1 == pointer to output buffer
55 ; On exit: R0 == pointer to buffer (R1 on entry)
56 ; R1 == pointer to terminating null
58 ; Use: Builds a message string, by substituting message references
59 ; by their values. Each reference of the form `$tag' (or
60 ; optionally `$(tag)', to avoid having to have a trailing)
61 ; space is replaced by the actual message. A literal `$' sign
62 ; may be represented as `$$'.
68 ; On entry: R0 == pointer to an error skeleton string:
69 ; R0+0 == error number
70 ; R0+4 == message tag-and-default (null-terminated)
71 ; R2-R11 == filler strings (not message tags)
73 ; On exit: R0 == pointer to translated error message (in error buffer)
74 ; R1 == pointer to null terminator of message
76 ; Use: Performs string sustitution on an error message (as done by
77 ; str_subst), but translating the error string.
83 ; On entry: R0 == message tag (and default message)
85 ; On exit: R0 == pointer to located message
87 ; Use: Returns the real message from its tag. If the tag does not
88 ; exist, then the default message is used. If that is not
89 ; supplied, then the tag name itself is returned (ie. R0
100 ; Use: Initialises the message system.
106 ;----- That's all, folks ----------------------------------------------------