home *** CD-ROM | disk | FTP | other *** search
- /* nostartup.c -- Example of how to use ARP without using the supplied
- * startup code.
- *
- * Note the way we pick up IntuitionBase and GfxBase for free.
- *
- * Copyright (c) 1987, Scott Ballantyne
- * use and abuse as you please.
- *
- * Manx:
- * cc nostartup.c
- * ln nostartup.o -la -lc ; to link with a.lib
- *
- * Lattice:
- * lc nostartup.c
- * blink lib:c.o nostartup.o to nostartup lib lib:a.lib lib:lc.lib lib:amiga.lib
- *
- * -+=SDB+=-
- */
-
- #include <exec/types.h>
- #include <libraries/arpbase.h>
- #include <arpfunctions.h>
-
- struct ArpBase *OpenLibrary();
- struct ArpBase *ArpBase; /* Declare our library base variable */
-
- /* We can get intuition and graphics almost for free */
- /* You don't need to do this, of course. */
-
- struct Library *IntuitionBase, *GfxBase;
-
- /* Example of how to open ARP */
-
- VOID main()
- {
- char buffer[MaxInputBuf];
-
- if (!(ArpBase = OpenLibrary(ArpName, ArpVersion)) )
- exit(20);
- /* Opened arp!, now get intuitionbase and graphics */
- GfxBase = ArpBase->GfxBase;
- IntuitionBase = ArpBase->IntuiBase;
-
- Printf("Type something: ");
- ReadLine(buffer);
- Printf("You typed \"%s\"\n", buffer);
-
- /* This is the recommended sequence for exiting when using arp
- * from 'C'. It is better not to use ArpExit().
- */
- CloseLibrary(ArpBase);
- exit(0); /* Or fall off end of world */
- }
-
-