home *** CD-ROM | disk | FTP | other *** search
- /*
- * address - run opath to see what a translated RFC822 address will come
- * out as.
- *
- * By E. Roskos 1/16/85
- * $Log: address.c,v $
- * Revision 1.3 85/11/24 14:50:01 sob
- * Added corrections provided by regina!mark
- *
- * Revision 1.2 85/09/16 18:31:53 sob
- * Added DEBUG flag
- *
- * Revision 1.1 85/09/16 17:50:24 sob
- * Initial revision
- *
- */
- #define _DEFINE
- #include "uuconf.h"
-
- static char rcsid[] = "$Header: address.c,v 1.3 85/11/24 14:50:01 sob Exp $";
-
- EXTERN char *paths;
- char *opath();
- int Debug;
-
- main(argc,argv)
- int argc;
- char **argv;
- {
- char *p;
- int uswitch;
-
- paths = DATABASE;
- ConfFile=CONFIGFILE;
-
- if (argc < 2)
- {
- fprintf(stderr,"usage: %s rfcaddress [...]\n",
- argv[0]);
- exit(1);
- }
-
- while (--argc)
- {
- p = *++argv;
- if (*p=='-')
- {
- switch(*++p)
- {
- case 'u': uswitch++;
- continue;
- case 'd': Debug++;
- continue;
- default: printf("unknown switch: %c\n",*p);
- continue;
- }
- continue;
- }
- printf("%s: %s\n",p,uswitch?oupath(p):opath(p));
- }
-
- exit(0);
- }
-