home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / duucp-1.17 / AU-117b4-src.lha / src / uucico / uupoll.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-24  |  861 b   |  45 lines

  1. /*
  2.  *  UUPOLL.c -- call a UUCP connect site
  3.  *
  4.  *  Usage: UUPOLL <system-name>
  5.  *
  6.  *  Copyright 1988 by William Loftus.    All rights reserved.
  7.  *  Copyright 1990 by Matthew Dillon.    All rights reserved.
  8.  *  Copyright 1993 by Michael B. Smith. All rights reserved.
  9.  */
  10.  
  11. #include <stdio.h>
  12. #include <stdlib.h>
  13. #include <string.h>
  14. #include "version.h"
  15. #include "protos.h"
  16.  
  17. IDENT (".05");
  18.  
  19. int
  20. main (int argc, char **argv)
  21. {
  22.     char
  23.         buf [256];
  24.  
  25.     if (argc != 2) {
  26.         fprintf (stderr, "Usage: %s <system-name>\n", argv [0]);
  27.         exit (30);
  28.     }
  29.  
  30.     if (is_in_L_sys_file (argv [1])) {
  31.         sprintf (buf, "run >nil: <nil: UUCICO -s%s\n", argv [1]);
  32.  
  33.         if (system (buf) == -1) {
  34.             fprintf (stderr, "Error while trying to call system \"%s\"\n", argv [1]);
  35.             exit (30);
  36.         }
  37.     }
  38.     else {
  39.         fprintf (stderr, "System \"%s\" not in L.sys file.\n", argv [1]);
  40.         exit (30);
  41.     }
  42.  
  43.     exit (0);
  44. }
  45.