home *** CD-ROM | disk | FTP | other *** search
- /* ------------------------------------------------------------------------- */
- /* ----- di_fly.c ----- Flying Dials using Let em Fly! --------------------- */
- /* ------------------------------------------------------------------------- */
-
- #include <tos.h>
- #include <aes.h>
- #include "di_fly.h"
-
- /* ------------------------------------------------------------------------- */
-
- #define NULL ((void *) 0l);
-
- LTMFLY *letemfly = NULL;
-
- /* ----- Cookie Jar -------------------------------------------------------- */
-
- typedef struct {
- long id,
- *ptr;
- } COOKJAR;
-
- /* ------------------------------------------------------------------------- */
-
- long *_get_cookie(long cookie)
- {
- long sav;
- COOKJAR *cookiejar;
- int i = 0;
-
- sav = Super(0l);
- cookiejar = *((COOKJAR **)0x05a0l);
- Super((void *)sav);
- if(cookiejar)
- {
- do
- {
- if(cookiejar[i].id == cookie)
- return(cookiejar[i].ptr);
- else
- i++;
- }
- while(cookiejar[i].id);
- }
- return(0);
- }
-
- /* ------------------------------------------------------------------------- */
-
- void di_fly(OBJECT *tree)
- {
- if(!letemfly)
- letemfly = (LTMFLY *)_get_cookie('LTMF');
- if(letemfly)
- letemfly->di_fly(tree);
- }
-