home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $Id: SmallMain.c,v 1.2 92/08/15 20:13:22 olsen Sta Locker: olsen $
- ** $Revision: 1.2 $
- ** $Date: 92/08/15 20:13:22 $
- **
- ** Small main program frontend.
- **
- ** Copyright ⌐ 1990-1992 by Olaf `Olsen' Barthel & MXM
- ** All Rights Reserved
- */
-
- #include <intuition/intuitionbase.h>
- #include <workbench/workbench.h>
- #include <exec/execbase.h>
- #include <dos/dosextens.h>
-
- #include <pragmas/intuition.h>
- #include <pragmas/exec.h>
- #include <pragmas/dos.h>
-
- extern struct TextAttr DefaultFont;
-
- LONG __saveds
- SmallMain()
- {
- SysBase = *(struct ExecBase **)4;
-
- if(SysBase -> AttnFlags & AFF_68020)
- main();
- else
- {
- register struct Process *ThisProcess;
-
- ThisProcess = (struct Process *)SysBase -> ThisTask;
-
- if(ThisProcess -> pr_CLI)
- {
- register struct DosLibrary *DOSBase;
-
- if(DOSBase = (struct DosLibrary *)OpenLibrary("dos.library",0))
- {
- Write(ThisProcess -> pr_COS,"MC68020 or higher required.\a\n",29);
-
- CloseLibrary(DOSBase);
- }
-
- return(RETURN_FAIL);
- }
- else
- {
- register struct IntuitionBase *IntuitionBase;
- register struct WBStartup *WBenchMsg;
-
- WaitPort(&ThisProcess -> pr_MsgPort);
-
- WBenchMsg = (struct WBStartup *)GetMsg(&ThisProcess -> pr_MsgPort);
-
- if(IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library",0))
- {
- STATIC struct IntuiText BodyText = {0,1,JAM1,5,3,&DefaultFont,(UBYTE *)"MC68020 or higher required.",NULL};
- STATIC struct IntuiText SorryText = {0,1,JAM1,6,3,&DefaultFont,(UBYTE *)"Sorry",NULL};
-
- AutoRequest(NULL,&BodyText,NULL,&SorryText,NULL,NULL,253,46);
-
- CloseLibrary(IntuitionBase);
- }
-
- Forbid();
-
- ReplyMsg((struct Message *)WBenchMsg);
- }
- }
- }
-