List the names of known remote UUCP sites.
Copyright (C) 1991, 1992 Ian Lance Taylor
This file is part of the Taylor UUCP package.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
The author of the program may be contacted at ian@airs.com or
c/o AIRS, P.O. Box 520, Waltham, MA 02254.
Revision 1.5 1992/03/28 04:42:32 ian
Franc,ois Pinard: output aliases, added -a switch
Revision 1.4 1992/03/12 19:54:43 ian
Debugging based on types rather than number
Revision 1.3 1992/02/27 05:40:54 ian
T. William Wells: detach from controlling terminal, handle signals safely
Revision 1.2 1992/02/23 03:26:51 ian
Overhaul to use automatic configure shell script
Revision 1.1 1992/02/14 20:25:55 ian
char uuname_rcsid
[] = "$Id: uuname.c,v 1.5 1992/03/28 04:42:32 ian Rel $";
char abProgram
[] = "uuname";
static void unusage
P((void));
/* Long getopt options. */
static const struct option asLongopts
[] = { { NULL
, 0, NULL
, 0 } };
const struct option
*_getopt_long_options
= asLongopts
;
/* -a: don't display aliases. */
boolean fnoalias
= FALSE
;
/* -l: if true, output local node name. */
/* -I: configuration file name. */
const char *zconfig
= NULL
;
while ((iopt
= getopt (argc
, argv
, "alI:x:")) != EOF
)
/* Don't display aliases. */
/* Output local node name. */
/* Configuration file name. */
/* Set debugging level. */
iDebug
|= idebug_parse (optarg
);
/* Long option found and flag set. */
usysdep_initialize (FALSE
, FALSE
);
printf ("%s\n", zLocalname
);
uread_all_system_info (&c
, &pas
);
printf ("%s\n", pas
[i
].zname
);
if (! fnoalias
&& pas
[i
].zalias
!= NULL
)
zcopy
= (char *) alloca (strlen (pas
[i
].zalias
) + 1);
strcpy (zcopy
, pas
[i
].zalias
);
for (ztok
= strtok (zcopy
, " ");
ztok
= strtok ((char *) NULL
, " "))
/* Avoid errors about not returning a value. */
/* Print a usage message and die. */
"Taylor UUCP version %s, copyright (C) 1991, 1992 Ian Lance Taylor\n",
"Usage: uuname [-a] [-l] [-I file] [-x debug]\n");
" -a: don't display aliases\n");
" -l: print local name\n");
" -x debug: Set debugging level (0 for none, 9 is max)\n");
" -I file: Set configuration file to use (default %s%s)\n",
NEWCONFIGLIB
, CONFIGFILE
);
#endif /* HAVE_TAYLOR_CONFIG */