include "draw.m"; #for Draw->Pointer include "devpointer.m"; ptr:= load Devpointer Devpointer->PATH; Devpointer: module { PATH: con "/dis/lib/devpointer.dis"; Size: con 1+3*12; # 'm' plus 3 12-byte decimal integers init: fn(file: string, posn: chan of ref Draw->Pointer): int; bytes2ptr: fn(buf: array of byte) : ref Draw->Pointer; ptr2bytes: fn(ptr: ref Draw->Pointer): array of byte; };
bytes2ptr (buf)
The bytes2ptr function converts the array of characters in buf to a Pointer and returns a reference to it. The buf array should consist of exactly Size bytes and be in the format returned by /dev/pointer. ptr2bytes (ptr)
The ptr2bytes function provides an inverse transformation of the bytes2ptr function. Files
/dev/pointer See Also
pointer and draw