revert commit 56204.
[AROS.git] / workbench / demos / rtstring.c
blob949a9f76902e98af6370897505766cac87af8e2f
1 #include <libraries/reqtools.h>
2 #include <proto/exec.h>
3 #include <proto/reqtools.h>
5 #include <stdio.h>
6 #include <string.h>
7 #include <stdlib.h>
9 #define PROGNAME "rtstring"
11 struct ReqToolsBase *ReqToolsBase;
13 static char s[300];
15 static void cleanup(char *msg)
17 if (msg) printf(PROGNAME ": %s\n", msg);
19 if (ReqToolsBase) CloseLibrary((struct Library *)ReqToolsBase);
21 exit(0);
24 static void openlibs(void)
26 ReqToolsBase = (struct ReqToolsBase *)OpenLibrary("reqtools.library", 0);
27 if (!ReqToolsBase) cleanup("Can't open reqtools.library");
30 static void action(void)
32 struct TagItem tags[] =
34 {RT_Underscore , (IPTR)'_' },
35 {RTGS_TextFmt , (IPTR)"AROS - The AROS Research OS\n\nLine2\nLine3" },
36 {RTGS_GadFmt , (IPTR)"O_k|Hel_lo|_Something" },
37 {TAG_DONE }
40 rtGetStringA(s, 100, "Title", NULL, tags);
43 int main(void)
45 openlibs();
46 action();
47 cleanup(0);
48 return 0;