Showing changes from revision #0 to #1:
Added | Removed | Changed
Entry | |
---|---|
R0 | 257 (reason code) |
R1 | Pointer to buffer containing file name |
Exit | |
---|---|
R0 | R1 on entry |
R1 | 0 |
This call with a reason code of 257, adds a sprite file suffix onto a pathname.
Icons are searched for using the same algorithm as Wimp_Extend (sprite suffix). If a suitable sprite file is found then the filename in the buffer will be updated, otherwise the buffer will be left untouched.
It is the caller’s responsibility to make sure that the buffer is large enough to contain the updated filename – it’s recommended that there’s enough spare space for at least 8 extra characters to be inserted.
Compared to Wimp_Extend (sprite suffix), this call has the advantage that it is available in both the RISC OS Open and RISC OS Select versions of the Wimp, easing the task of writing software which is compatible with both OS versions. However unlike the RISC OS Open version of the call, no buffer size is specified, and so buffer overruns are possible.
Because Wimp_Extend does not return an error when an unknown reason code is given, you can check if this call is implemented on a given Wimp version by examining R1 on exit. If the call is implemented then R1 will have been set to zero.