summaryrefslogtreecommitdiff
path: root/sysutils/showbeastie/files/patch-testmain.c
blob: 1a9b24a062b1d5380d113f88231a03c91c3755d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
--- testmain.c.orig	2016-03-02 15:04:22 UTC
+++ testmain.c
@@ -316,17 +316,38 @@ int main(int argc, char **argv)
     buildTestInterface(pSys);
     pVM = ficlNewVM(pSys);
 
-    ficlEvaluate(pVM, ".ver .( " __DATE__ " ) cr quit");
+    ficlEvaluate(pVM, ": loader_color? ( -- ) TRUE ;");
+    ficlEvaluate(pVM, "vocabulary support-functions");
+    ficlEvaluate(pVM, ": contains? ( -- ) FALSE ;");
+    ficlEvaluate(pVM, ": any_conf_read? ( -- ) FALSE ;");
+    ficlEvaluate(pVM, ": load_kernel ( -- ) ;");
+    ficlEvaluate(pVM, ": load_modules ( -- ) ;");
+    ficlEvaluate(pVM, ": delay_execute ( -- ) ;");
+    ficlEvaluate(pVM, "variable logoX");
+    ficlEvaluate(pVM, "variable logoY");
+
+    sprintf(in, "load %s", "/boot/screen.4th");
+    ficlEvaluate(pVM, in);
+    sprintf(in, "load %s", "/boot/beastie.4th");
+    ficlEvaluate(pVM, in);
 
     /*
     ** load file from cmd line...
     */
     if (argc  > 1)
     {
-        sprintf(in, ".( loading %s ) cr load %s\n cr", argv[1], argv[1]);
+        sprintf(in, "load %s", argv[1], argv[1]);
         ficlEvaluate(pVM, in);
+    } else {
+        fprintf(stderr, "usage: %s <logo.4th>\n", argv[0]);
+        return 1;
     }
 
+    system("clear");
+    ficlEvaluate(pVM, "draw-beastie");
+    printf("\n\n");
+    return 0;
+
     for (;;)
     {
         int ret;