1 #include <exec/alerts.h>
2 #include <proto/intuition.h>
8 * An EXTREMELY ugly test quickly made of alert.hook source.
9 * I just didn't have any other text data with proper layout.
10 * Please rewrite this into something better.
13 static UBYTE
*const recov
= "\x38\x0f" "Recoverable Alert! ";
14 static UBYTE
*const mouse
= "\x01\x50\x0f" "Press mouse button to continue.";
15 static UBYTE
*const fmtstring
= "\xa8\x2a" "Task: 12345678 - ";
16 static UBYTE
*tname
= "--task not found--";
18 static STRPTR
mystrcpy(STRPTR dest
, STRPTR src
, LONG len
)
29 int main(int argc
, char **argv
)
31 UBYTE buffer
[256], *buf
;
35 if ((argc
> 1) && (!stricmp(argv
[1], "deadend")))
43 buf
= mystrcpy(buf
, recov
, -1);
46 buf
= mystrcpy(buf
, mouse
, -1);
50 buf
= mystrcpy(buf
, fmtstring
, -1);
52 buf
= mystrcpy(buf
- 1, tname
, 30);
56 ret
= DisplayAlert(code
, buffer
, 0x38);
58 printf("Result is: %d\n", ret
);