Revision 13635,
1.0 KB
checked in by danw, 25 years ago
(diff) |
NEOS clients, from athena/lib/neos/clients
|
Line | |
---|
1 | /********************************************************************** |
---|
2 | * File Exchange fxdestroy client |
---|
3 | * |
---|
4 | * $Id: fxdestroy.c,v 1.1 1999-09-28 22:10:57 danw Exp $ |
---|
5 | * |
---|
6 | * Copyright 1989, 1990 by the Massachusetts Institute of Technology. |
---|
7 | * |
---|
8 | * For copying and distribution information, please see the file |
---|
9 | * <mit-copyright.h>. |
---|
10 | **********************************************************************/ |
---|
11 | |
---|
12 | #include <mit-copyright.h> |
---|
13 | |
---|
14 | #ifndef lint |
---|
15 | static char rcsid_fxdestroy_c[] = "$Id: fxdestroy.c,v 1.1 1999-09-28 22:10:57 danw Exp $"; |
---|
16 | #endif /* lint */ |
---|
17 | |
---|
18 | #include <stdio.h> |
---|
19 | #include <fx/fxcl.h> |
---|
20 | |
---|
21 | main(argc, argv) |
---|
22 | int argc; |
---|
23 | char *argv[]; |
---|
24 | { |
---|
25 | FX *fxp; |
---|
26 | long code; |
---|
27 | |
---|
28 | if (argc == 2) { |
---|
29 | if ((fxp = fx_open(argv[1], &code)) == NULL) { |
---|
30 | com_err(argv[0], code, "while connecting"); |
---|
31 | exit(1); |
---|
32 | } |
---|
33 | if (code = fx_destroy(fxp, argv[1])) { |
---|
34 | com_err(argv[0], code, "trying to destroy %s", argv[1]); |
---|
35 | exit(1); |
---|
36 | } |
---|
37 | printf("Destroyed %s.\n", argv[1]); |
---|
38 | exit(0); |
---|
39 | } |
---|
40 | fprintf(stderr, "Usage: %s <course name>\n", argv[0]); |
---|
41 | exit(1); |
---|
42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.