2 #include <libraries/reqtools.h>
3 #include <proto/exec.h>
4 #include <proto/reqtools.h>
10 #include <clib/alib_protos.h>
12 #define PROGNAME "rtezrequest"
14 struct ReqToolsBase
*ReqToolsBase
;
16 static void cleanup(char *msg
)
18 if (msg
) printf(PROGNAME
": %s\n", msg
);
20 if (ReqToolsBase
) CloseLibrary((struct Library
*)ReqToolsBase
);
25 static void openlibs(void)
27 ReqToolsBase
= (struct ReqToolsBase
*)OpenLibrary("reqtools.library", 0);
28 if (!ReqToolsBase
) cleanup("Can't open reqtools.library");
31 static void myEZRequest(struct TagItem
*tags
, struct rtReqInfo
*reqinfo
, char *bodyfmt
, char *gadfmt
, ...)
33 AROS_SLOWSTACKFORMAT_PRE_USING(gadfmt
, bodyfmt
)
34 rtEZRequestA(bodyfmt
, gadfmt
, reqinfo
, AROS_SLOWSTACKFORMAT_ARG(gadfmt
), tags
);
35 AROS_SLOWSTACKFORMAT_POST(gadfmt
)
38 static void action(void)
40 struct TagItem tags
[] =
42 { RT_Underscore
, (IPTR
)'_' },
43 { RTEZ_ReqTitle
, (IPTR
)"I'm a ReqTools Requester" },
47 myEZRequest(tags
, NULL
,
48 "This is a requester\n"
53 myEZRequest(tags
, NULL
,
54 "And another rtEZRequestA\n"
57 "String arg: \"%s\" Integer arg: %ld",
59 "ABCDEF12345678", 12345678);