/* * CALC Provides a calculator that opens on the active screen when * you press a specific key sequence. Otherwise, the program * waits quitely in the background. * * Copyright 1989 by Davide P. Cervone. * You may use this code, provided this copyright notice is kept intact. */ #define INTUITION_PREFERENCES_H /* don't need 'em */ #include #include #include #include #include #include "cSetup.h" #define PROGRAM "Screen Calculator" #define COPYRIGHT "Copyright 1989 by Davide P. Cervone" #define LOADVERS 2 #define MINHMAJVERS 3 #define MINHMINVERS 1 #define HANDLERCODE "L:Calc-Handler" /* the handler file */ #define HANDLERTASKNAME "Calc-Handler" /* the task name */ #define INTUITION_REV 0L #define GRAPHICS_REV 0L #define EXIT_OK RETURN_OK #define EXIT_ERROR RETURN_ERROR #define ONE 1L #define NEWPORT(p)\ if ((p = CreatePort(0L,0L)) == NULL) DoExit("Can't Create p Port") #define MEMFLAGS (MEMF_PUBLIC | MEMF_CLEAR) #define NEWSTRUCT(s,p) (p = (struct s *)AllocMem(sizeof(struct s),MEMFLAGS)) #define FREESTRUCT(s,p) FreeMem(p,sizeof(struct s)) #define NEWSTARTUP(s) NEWSTRUCT(StartupMessage,s) #define FREESTARTUP(s) FREESTRUCT(StartupMessage,s) #define GETSTARTUP(p) ((struct StartupMessage *)GetMsg(p)) extern struct IntuitionBase *IntuitionBase; extern struct GfxBase *GfxBase; /* * Offset values used by SetFunction */ extern long LVOCloseScreen; extern struct Process *CreateProc(); extern long SetFunction(); extern struct MsgPort *FindPort(); extern struct MsgPort *CreatePort(); extern struct Process *FindTask();