home *** CD-ROM | disk | FTP | other *** search
-
- Listing 1.
-
- /* Test.C */
-
- #include "stddef.h" #include "sky.h"
-
- #define CATALOG "kenji" #define WIN "menu"
-
- static void abort(); static int fruits();
-
- void main(argc,argv) int argc; char *argv[]; { int i;
-
- windows(START); /* initialization */ windows(FROM, CATALOG); /*
- select catalog */ windows(LOADED,WIN); /* load window */ windows(OPENED,WIN); /*
- open window */ demons(START); /* initialize demon */ demon("fruits",
- fruits); /* declare demon */ demons(WATCH); /* watch out demon */
- abort(""); }
-
- static void abort(message) char *message; { demons(END); windows(END);
- puts(message); exit(); }
-
- static fruits(arg) int arg; { switch (arg) { case 0 : abort ("Orange");
- case 1 : abort ("Banana"); case 2 : abort ("Grape"); default
- : abort ("End"); } return(OK); }
-
- /* The end of the program */