force CC/CXX to the passed in compiler to use.
[AROS.git] / workbench / demos / rtfile.c
blob6aa7787b0254cddab6f1f46e6ec7589f473462f0
2 #include <libraries/reqtools.h>
3 #include <proto/exec.h>
4 #include <proto/reqtools.h>
6 #include <stdio.h>
7 #include <string.h>
8 #include <stdlib.h>
10 #define PROGNAME "rtfile"
12 struct ReqToolsBase *ReqToolsBase;
14 static char s[300];
16 static void cleanup(char *msg)
18 if (msg) printf(PROGNAME ": %s\n", msg);
20 if (ReqToolsBase) CloseLibrary((struct Library *)ReqToolsBase);
22 exit(0);
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 },
38 { TAG_DONE }
41 if ((req = rtAllocRequestA(RT_FILEREQ, tags)))
43 rtFileRequestA(req, s, "Title", tags);
44 rtFreeRequest(req);
49 int main(void)
51 openlibs();
52 action();
53 cleanup(0);
55 return 0;