home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 341b.lha / uucp1_v1.03d / src / uucico / uupoll.c < prev    next >
C/C++ Source or Header  |  1990-01-28  |  939b  |  57 lines

  1. /*
  2.    UUPOLL  -- call a UUCP connect site
  3.  
  4.    Usage: UUPOLL <system-name>
  5.  
  6.    Copyright 1988 by William Loftus.  All rights reserved.
  7.  
  8.    ARPA: wpl@prc.unisys.com
  9.    UUCP: wpl@burdvax.UUCP
  10.    USMAIL: Unisys/Paoli Research Center;PO BOX 517;Paoli, PA 19301-0517
  11.  
  12. */
  13.  
  14. #include <stdio.h>
  15. #include "/version.h"
  16.  
  17. #define LOCK_FILE "t:UUCP.LCK"
  18.  
  19. #define TRUE 1
  20. #define FALSE 0
  21.  
  22. IDENT(".02");
  23.  
  24. CXBRK()
  25. {
  26.     return(0);
  27. }
  28.  
  29. void
  30. main (argc, argv)
  31. int argc;
  32. char ** argv;
  33. {
  34.   static  char buf[256];
  35.  
  36.   if (argc != 2) {
  37.      printf("Usage: UUPOLL <system-name>\n");
  38.      exit(1);
  39.   }
  40.  
  41.   if (access(LOCK_FILE,0) != -1) {
  42.      printf("UUCP is locked.\n");
  43.      exit(0);
  44.   }
  45.  
  46.     if (is_in_L_sys_file(argv[1])) {
  47.     sprintf(buf, "run >nil: <nil: UUCICO -s%s\n", argv[1]);
  48.     if (system(buf) == -1) {
  49.         printf("Error spawning task to call system \"%s\"\n", argv[1]);
  50.     }
  51.     } else {
  52.     printf("System \"%s\" not in UULIB:L.sys file.\n", argv[1]);
  53.     }
  54. }
  55.  
  56.  
  57.