home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d3xx / d346 / packetsupport.lha / PacketSupport / packettest.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-15  |  439 b   |  28 lines

  1. /*
  2.  
  3.     test for packetsupport.lib
  4.  
  5.     usage:
  6.  
  7.     packettest devproc true/false
  8.  
  9.     sends inhibit to devproc
  10.  
  11. */
  12.  
  13. #include <stdio.h>
  14. #include <string.h>
  15. #include "packetsupport.h"
  16.  
  17. int main(char **argv,int argc)
  18. {
  19.     if(argc!=3) {
  20.     printf("Usage: packettest devname true/false\n");
  21.     return(20);
  22.     }
  23.     if(!dosinhibit(argv[1],!strcmp(argv[2],"true")?-1:0))
  24.     printf("ACTION_INHIBIT failed\n");
  25.     else printf("ok.\n");
  26.     return(0);
  27. }
  28.