updating oE poke_wstring
poke_wstring
include machine.e namespace machine public function poke_wstring(atom buffaddr, integer buffsize, sequence s)
stores a C-style null-terminated Double-Byte string in memory.
Parameters:
- buffaddr: an atom, the RAM address to to the string at.
- buffsize: an integer, the number of bytes available, starting from buffaddr.
- s : a sequence, the string to store at address buffaddr.
Comments:
- This does not allocate an RAM. You must supply the preallocated area.
- This uses two bytes per string character. Note that buffsize is the number of bytes available in the buffer and not the number of characters available.
- If s is not a double-byte string, nothing is stored and a zero is returned.
Returns:
An atom. If this is zero, then nothing was stored, otherwise it is the address of the first byte after the stored string.
Example 1:
atom title title = allocate(1000) if poke_wstring(title, 1000, "The Wizard of Oz") then -- successful else -- failed end if
See Also:
Not Categorized, Please Help
|