source: trunk/athena/bin/neos/fxls.c @ 13635

Revision 13635, 1009 bytes checked in by danw, 25 years ago (diff)
NEOS clients, from athena/lib/neos/clients
Line 
1/**********************************************************************
2 * File Exchange fxls client
3 *
4 * $Id: fxls.c,v 1.1 1999-09-28 22:10:58 danw Exp $
5 *
6 * Copyright 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
15static char rcsid_fxcreate_c[] = "$Id: fxls.c,v 1.1 1999-09-28 22:10:58 danw Exp $";
16#endif /* lint */
17
18#include <stdio.h>
19#include <fx/fxcl.h>
20
21main(argc, argv)
22  int argc;
23  char *argv[];
24{
25  FX *fxp;
26  stringlist_res *sr;
27  stringlist l;
28  long code;
29
30  if ((fxp = fx_open("", &code)) == NULL) {
31    com_err(argv[0], code, "while connecting.");
32    exit(1);
33  }
34
35  code = fx_directory(fxp, &sr);
36  fx_close(fxp);
37  if (code) {
38    com_err(argv[0], code, "");
39    exit(1);
40  }
41
42  for(l = sr->stringlist_res_u.list; l != NULL; l = l->next)
43    printf("%s\n", l->s);
44
45  exit(0);
46}
Note: See TracBrowser for help on using the repository browser.