| 1234567891011121314151617181920 |
- DEFINITION MODULE SDLUtils ;
- (*
- m2SDL - small pure-Modula-2 helpers over the FOR "C" bindings.
- Copies NUL-terminated C strings (ADDRESS) into Modula-2 CHAR
- arrays (NUL-terminated, truncated to the destination length).
- DrainEvents pumps the queue and reports whether a quit event
- was seen; event type is the leading Uint32 of SDL_Event, read
- little-endian (matches x86/x86-64/ARM hosts).
- *)
- FROM SYSTEM IMPORT ADDRESS;
- EXPORT UNQUALIFIED CStrToM2, GetErrorString, DrainEvents;
- PROCEDURE CStrToM2 (src: ADDRESS; VAR dst: ARRAY OF CHAR);
- PROCEDURE GetErrorString (VAR buf: ARRAY OF CHAR);
- PROCEDURE DrainEvents (VAR quit: BOOLEAN);
- END SDLUtils.
|