home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / auucp+-1.02 / fuucp_plus_src.lzh / uucico / uuname.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-11-21  |  904 b   |  45 lines

  1.  
  2. /*
  3.  *  UUNAME.C
  4.  *
  5.  *  $Header: Beta:src/uucp/src/uucico/RCS/uuname.c,v 1.1 90/02/02 11:56:07 dillon Exp Locker: dillon $
  6.  *
  7.  *  UUHOSTS  -- List all UUCP sites connected to our system
  8.  *
  9.  *  Usage: UUHOSTS
  10.  *
  11.  *  Copyright 1988 by William Loftus.  All rights reserved.
  12.  *
  13.  *  ARPA: wpl@prc.unisys.com
  14.  *  UUCP: wpl@burdvax.UUCP
  15.  *  USMAIL: Unisys/Paoli Research Center;PO BOX 517;Paoli, PA 19301-0517
  16.  */
  17.  
  18. #include <stdio.h>
  19. #include <stdlib.h>
  20. #include <string.h>
  21. #include "version.h"
  22.  
  23. static char *version20 = "$VER: uuname 1.00 (5 Aug 90)\n\r";
  24.  
  25. void
  26. main()
  27. {
  28.     char buf[256];
  29.     FILE *fd;
  30.  
  31.     if (!(fd = fopen(MakeConfigPath(UULIB, "L.sys"), "r"))) {
  32.     printf("Couldn't open L.sys file\n");
  33.     exit(1);
  34.     }
  35.  
  36.     while (fgets(buf, sizeof buf, fd)) {
  37.     if (buf[0] == '#' || buf[0] == '\n')
  38.         continue;
  39.     buf[(int)strchr(buf,' ') - (int)buf] = '\0';
  40.     printf("%s\n", buf);
  41.     }
  42.  
  43.     fclose(fd);
  44. }
  45.