home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
499.lha
/
GamePortDeviceToolKit
/
gameport.lzh
/
src
/
DeviceToolKits
/
GamePort
/
test
/
test1.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-01-03
|
776b
|
44 lines
#include <stdio.h>
#include "DeviceToolKits/GamePort.h"
#ifndef TESTPROTO
#define NO_PRAGMAS 1
#endif
#include "DeviceToolKits/proto/GamePort.h"
#include "DeviceToolKits/GamePortBase.h"
DTGamePort_t Unit1;
main(argc,argv)
int argc;
char *argv[];
{
long status;
#ifdef TESTSHARED
/* Open the GamePort library */
DTGamePortOpen(DTGAMEPORTREV);
#endif
/* Try to initialize unit 1 of the GamePort */
if ((Unit1 = DTGamePortCreate(1L,&status)) == NULL) {
fprintf(stderr,"Error initializing unit 1 = %ld.\n",status);
fflush(stderr);
goto cleanup;
}
fprintf(stderr,"Unit1 = %lX\n",(long) Unit1);
fflush(stderr);
/* Free the stuff */
cleanup:
DTGamePortFree(Unit1);
#ifdef TESTSHARED
DTGamePortClose();
#endif
}