/* * uuname: show all the uucp systems connected to this one. */ #include #include #include char program[] = "uuname"; main(argc, argv) char **argv; { FILE *sys; char line[400]; char system[9]; if (getcfg() == 0) exit(0); if (argc > 1 && strcmp(argv[1], "-l") == 0) puts(SITE); else { if (sys=fopen(makepath(line, NETDIR, SYSTEMS), "r")) { while (rdline(sys, line, sizeof line)) if (sscanf(line, "%7s", system) == 1) puts(system); fclose(sys); } } }