-
-#ifdef HAVE_ARPA_INET_H
-# include <arpa/inet.h>
-#endif
-
-#ifdef HESIOD
-# include <hesiod.h>
-#endif
-
-#ifdef KPOP
-# include <krb.h>
-# include <ctype.h>
-#endif /* KPOP */
-
-#define TRUE 1
-#define FALSE 0
-
-#define OOPS1 (-2)
-#define OOPS2 (-3)
-
-#define MAXARGS 1000
-#define MAXNETS 5
-#define MAXHOSTS 25
-
-struct addrent {
- int a_addrtype; /* assumes AF_INET for inet_netof () */
- union {
- int un_net;
- char un_addr[14];
- } un;
-};
-
-#define a_net un.un_net
-#define a_addr un.un_addr
-
-static struct addrent *n1, *n2;
-static struct addrent nets[MAXNETS];
-static struct addrent *h1, *h2;
-static struct addrent hosts[MAXHOSTS];
-
-#ifdef KPOP
-static CREDENTIALS cred;
-static MSG_DAT msg_data;
-static KTEXT ticket = (KTEXT) NULL;
-static Key_schedule schedule;
-static char *kservice; /* "pop" if using kpop */
-char krb_realm[REALM_SZ];
-char *PrincipalHostname();
-#endif /* KPOP */
-
-#if !defined(h_addr)
-# define h_addr h_addr_list[0]
-#endif
-
-#define inaddr_copy(hp,sin) \
- memcpy(&((sin)->sin_addr), (hp)->h_addr, (hp)->h_length)
-
-/*
- * static prototypes
- */
-static int rcaux (struct servent *, struct hostent *, int, char *, int);
-static int getport (int, int, char *, int);
-static int inet (struct hostent *, int);
-struct hostent *gethostbystring (char *s);
-
-/* client's own static version of several nmh subroutines */
-static char **client_brkstring (char *, char *, char *);
-static int client_brkany (char, char *);
-static char **client_copyip (char **, char **, int);
-static char *client_getcpy (char *);