home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 499.lha / InputDeviceToolKit / input.lzh / src / DeviceToolKits / Input / test_shared / test1.c < prev    next >
C/C++ Source or Header  |  1991-01-05  |  740b  |  44 lines

  1. #include <stdio.h>
  2.  
  3. #include "DeviceToolKits/Input.h"
  4. #ifndef  TESTPROTO
  5. #define  NO_PRAGMAS  1
  6. #endif
  7. #include "DeviceToolKits/proto/Input.h"
  8. #include "DeviceToolKits/InputBase.h"
  9.  
  10. DTInput_t   Unit0;
  11.  
  12. main(argc,argv)
  13. int   argc;
  14. char  *argv[];
  15. {
  16.    long  status;
  17.  
  18. #ifdef   TESTSHARED
  19. /*  Open the Input library  */
  20.  
  21.    DTInputOpen(DTINPUTREV);
  22. #endif
  23.  
  24. /*  Try to initialize unit 0 of the Input  */
  25.  
  26.    if ((Unit0 = DTInputCreate(&status)) == NULL) {
  27.       fprintf(stderr,"Error initializing unit 0 = %ld.\n",status);
  28.       fflush(stderr);
  29.       goto cleanup;
  30.    }
  31.  
  32.    fprintf(stderr,"Unit0 = %lX\n",(long) Unit0);
  33.    fflush(stderr);
  34.  
  35. /*  Free the stuff  */
  36.  
  37. cleanup:
  38.    DTInputFree(Unit0);
  39. #ifdef   TESTSHARED
  40.    DTInputClose();
  41. #endif
  42. }
  43.  
  44.