home *** CD-ROM | disk | FTP | other *** search
-
- /*
- * QUITDNET.C
- *
- * DNET (c)Copyright 1988, Matthew Dillon, All Rights Reserved.
- *
- * QUITDNET [-Nnet]
- *
- */
-
- #include "defs.h"
-
-
- #ifndef __GNUC__
- int
- brk()
- {
- return(0);
- }
- #endif
-
- void
- main(ac,av)
- char *av[];
- {
- int ok;
- char *host = NULL;
-
- #ifndef __GNUC__
- onbreak(brk);
- #endif
-
- printf("QuitDNet V%s%s\n", VERSION, QUITDNET_VERSION);
- {
- short i;
- for (i = 1; i < ac; ++i) {
- if (strncmp(av[i], "-N", 2) == 0) {
- if(strlen(av[i]) > 2){
- host = av[i] + 2;
- }else{
- fprintf(stderr, "%s: need hostname!\n", av[i]);
- }
- continue;
- }
- }
- }
- ok = DQuit(host); /* NULL ok */
- printf("DQuit(%s) result %d\n", host, ok);
- if (ok) {
- Delay(50 * 5); /* Uh, 5 seconds? */
- DBreak(host);
- printf("DBreak(%s) done\n", host);
- } else{
- printf("DNET master port for network not found");
- }
- }
-