|
|
1.1 ! root 1: /* ! 2: * uuname.c ! 3: * ! 4: * Display the machines which are known to the UUCP system. ! 5: */ ! 6: ! 7: #include <stdio.h> ! 8: #include "dcp.h" ! 9: #include "lsys.h" ! 10: ! 11: main(argc, argv) ! 12: int argc; ! 13: char *argv[]; ! 14: { ! 15: int localflg = 0; ! 16: ! 17: while ( --argc ) { ! 18: if ( **++argv != '-' ) ! 19: usage(); ! 20: switch (argv[0][1]) { ! 21: case 'l': ! 22: localflg = 1; ! 23: break; ! 24: case 'v': ! 25: case 'V': ! 26: fatal("uuname: Version %s", VERSION); ! 27: break; ! 28: default: ! 29: usage(); ! 30: } ! 31: } ! 32: ! 33: if ( localflg ) ! 34: puts(uucpname()); ! 35: else { ! 36: lsys_open(); ! 37: while ( lsys_next() > 0 ) ! 38: puts( lsys_value(sys_e) ); ! 39: lsys_close(); ! 40: } ! 41: exit(0); ! 42: } ! 43: ! 44: usage() ! 45: { ! 46: fatal("\n\ ! 47: Usage: uuname display uucp names of known systems\n\ ! 48: uuname -l display local uucp name\n\ ! 49: "); ! 50: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.