Debian Codegraph @

COSMIC/EXE/srmsrvr.c

raw
1 /* srmsrvr.c: this program is dangerous, but it does allow one to forcibly
2 * remove servers from the PortMaster's desmesne.
3 */
4 #include <stdio.h>
5 #include "xtdio.h"
6 #include "sockets.h"
7
8 /* ---------------------------------------------------------------------- */
9
10 /* main: */
11 #ifdef __PROTOTYPE__
12 int main(
13 int argc,
14 char **argv)
15 #else /* __PROTOTYPE__ */
16 int main(argc,argv)
17 int argc;
18 char **argv;
19 #endif /* __PROTOTYPE__ */
20 {
21 rdcolor();
22 Sinit();
23
24 for(--argc, ++argv; argc > 0; --argc, ++argv) {
25 if(Srmsrvr(*argv) != PM_OK)
26 error(XTDIO_WARNING,"failed to remove <%s%s%s>\n",MAGENTA,*argv,GREEN);
27 }
28
29 #ifdef vms
30 return 1;
31 #else
32 return 0;
33 #endif
34 }
35
36 /* ---------------------------------------------------------------------- */
37