2 #include <libraries/reqtools.h>
3 #include <proto/exec.h>
4 #include <proto/reqtools.h>
10 #define PROGNAME "rtfile"
12 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 action(void)
33 struct rtFileRequester
*req
;
35 struct TagItem tags
[] =
37 { RTFI_Flags
, FREQF_PATGAD
},
41 if ((req
= rtAllocRequestA(RT_FILEREQ
, tags
)))
43 rtFileRequestA(req
, s
, "Title", tags
);