#include <fcntl.h>
#include <sys/file.h>
#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#ifdef HESIOD
#include <hesiod.h>
#endif
#ifdef HESIOD
struct hes_postoffice *p;
#endif /* HESIOD */
- char *index();
while ((c = getopt(argc, argv, "dve:")) != EOF) {
switch (c) {
if (argc > 0) {
user = argv[0];
- if ((mhost = index(argv[0], '@')) != NULL) {
+ if ((mhost = strchr(argv[0], '@')) != NULL) {
*mhost = '\0';
mhost++;
}
return nbytes;
}
-usage()
+void usage()
{
fprintf(stderr, "usage: mailquery [-d] [-v] [-e cmd] [user[@host]]\n");
}
#endif
if (sfi && sfo) {
- return;
+ return OK; /* guessing at this -- eichin -- XXX */
}
hp = gethostbyname(host);
}
sin.sin_family = hp->h_addrtype;
- bcopy(hp->h_addr, (char *)&sin.sin_addr, hp->h_length);
+ memcpy((char *)&sin.sin_addr, hp->h_addr, hp->h_length);
sin.sin_port = sp->s_port;
#ifdef KPOP
s = socket(AF_INET, SOCK_STREAM, 0);
pop_command(fmt, a, b, c, d)
char *fmt;
+char *a, *b, *c, *d;
{
char buf[1024];
- char errmsg[64];
sprintf(buf, fmt, a, b, c, d);
}
pop_retr(msgno, action, arg)
+int msgno;
int (*action)();
+char *arg; /* is this always FILE*??? -- XXX */
{
char buf[1024];
int nbytes = 0;