home *** CD-ROM | disk | FTP | other *** search
- /*
- * UUPOLL.c -- call a UUCP connect site
- *
- * Usage: UUPOLL <system-name>
- *
- * Copyright 1988 by William Loftus. All rights reserved.
- * Copyright 1990 by Matthew Dillon. All rights reserved.
- * Copyright 1993 by Michael B. Smith. All rights reserved.
- */
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include "version.h"
- #include "protos.h"
-
- IDENT (".05");
-
- int
- main (int argc, char **argv)
- {
- char
- buf [256];
-
- if (argc != 2) {
- fprintf (stderr, "Usage: %s <system-name>\n", argv [0]);
- exit (30);
- }
-
- if (is_in_L_sys_file (argv [1])) {
- sprintf (buf, "run >nil: <nil: UUCICO -s%s\n", argv [1]);
-
- if (system (buf) == -1) {
- fprintf (stderr, "Error while trying to call system \"%s\"\n", argv [1]);
- exit (30);
- }
- }
- else {
- fprintf (stderr, "System \"%s\" not in L.sys file.\n", argv [1]);
- exit (30);
- }
-
- exit (0);
- }
-