home *** CD-ROM | disk | FTP | other *** search
- #include <exec/types.h>
- #include <intuition/intuition.h>
- #include <proto/exec.h>
- #include <proto/intuition.h>
-
- static struct IntuiText Text2 = {-1,-1, /* pen numbers */
- 0, /* draw mode */
- 14,14, /* starting offsets */
- NULL, /* text attribute pointer */
- "***> Trap Abort !!!! <***",
- NULL };
-
- static struct IntuiText BodyText = {-1,-1, /* pen numbers */
- 0, /* draw mode */
- 4,4, /* starting offsets */
- NULL, /* text attribute pointer */
- NULL,
- &Text2 };
-
- static struct IntuiText AbortText = {-1,-1, /* pen numbers */
- 0, /* draw mode */
- 4,4, /* starting offsets */
- NULL, /* text attribute pointer */
- "ABORT",
- NULL };
-
- extern char *_ProgramName;
-
- /**
- *
- * name CXTRAP - trap exception handler
- *
- * synopsis CXTRAP();
- *
- * description This function is the default function trap handler
- * WARNING: Does not clean up. A user function must be defined
- * for releasing memory and system resources.
- **/
- CXTRAP()
- {
- char temp[80];
-
- if (IntuitionBase == NULL)
- IntuitionBase = (struct IntuitionBase *)
- OpenLibrary("intuition.library",0);
- memcpy(temp, _ProgramName, (long) _ProgramName[-1]);
- temp[(int) _ProgramName[-1]] = '\0';
- BodyText.IText = temp;
- if (AutoRequest(NULL,&BodyText,NULL,&AbortText,0,0,250,60) != TRUE) return(-1);
- return(0);
- }
-