#ifdef HAVE_PROTOTYPES
/* prototypes for internal functions */
-int showoptions (struct optrec *options);
-int parseMDAargs (struct optrec *options);
+int showoptions (struct hostrec *options);
+int parseMDAargs (struct hostrec *options);
int showversioninfo (void);
-int dump_options (struct optrec *options);
-int query_host(struct optrec *options);
+int dump_options (struct hostrec *options);
+int query_host(struct hostrec *options);
#endif
/* controls the detail level of status/progress messages written to stderr */
char **argv;
{
int mboxfd;
- struct optrec cmd_opts, def_opts;
+ struct hostrec cmd_opts, def_opts;
int parsestatus;
char *servername;
- struct optrec *hostp, *hostlist = (struct optrec *)NULL;
+ struct hostrec *hostp, *hostlist = (struct hostrec *)NULL;
FILE *tmpfp;
pid_t pid;
if (strcmp(servername, "defaults") == 0)
continue;
- hostp = (struct optrec *)xmalloc(sizeof(struct optrec));
+ hostp = (struct hostrec *)xmalloc(sizeof(struct hostrec));
prc_mergeoptions(servername, &cmd_opts, &def_opts, hostp);
strcpy(hostp->servername, servername);
int query_host(options)
/* perform fetch transaction with single host */
-struct optrec *options;
+struct hostrec *options;
{
if (outlevel != O_SILENT)
fprintf(stderr, "popclient: querying %s\n", options->servername);
*********************************************************************/
int dump_options (options)
-struct optrec *options;
+struct hostrec *options;
{
printf(" Username = '%s'\n", options->remotename);
printf(" Password = '%s'\n", options->password);
*********************************************************************/
int openuserfolder (options)
-struct optrec *options;
+struct hostrec *options;
{
int fd;
*********************************************************************/
int openmailpipe (options)
-struct optrec *options;
+struct hostrec *options;
{
int pipefd [2];
int childpid;
*********************************************************************/
int parseMDAargs (options)
-struct optrec *options;
+struct hostrec *options;
{
int argi;
char *argp;
#define TO_STDOUT 2 /* use stdout */
#define TO_MDA 3 /* use agent */
-struct optrec {
+struct hostrec {
char servername [HOSTLEN];
char localname [USERNAMELEN];
char remotename [USERNAMELEN];
/* dependent on the above members */
int output;
- struct optrec *next;
+ struct hostrec *next;
#if defined(HAVE_APOP_SUPPORT)
/* internal use only */
#ifdef HAVE_PROTOTYPES
/* prototypes for globally callable functions */
-int doPOP2 (struct optrec *options);
-int doPOP3 (struct optrec *options);
+int doPOP2 (struct hostrec *options);
+int doPOP3 (struct hostrec *options);
-int parsecmdline (int argc, char **argv, struct optrec *options);
-int setdefaults (struct optrec *options);
+int parsecmdline (int argc, char **argv, struct hostrec *options);
+int setdefaults (struct hostrec *options);
char *getnextserver (int argc, char **argv, int *optind);
-int openuserfolder (struct optrec *options);
+int openuserfolder (struct hostrec *options);
int closeuserfolder (int fd);
-int openmailpipe (struct optrec *options);
+int openmailpipe (struct hostrec *options);
int closemailpipe (int fd);
char *MD5Digest (char *);
void reply_hack(char *buf, const char *host);
arguments:
argc argument count.
argv argument strings.
- options pointer to a struct optrec to receive the parsed
+ options pointer to a struct hostrec to receive the parsed
options.
return value: if positive, argv index of last parsed option + 1
int parsecmdline (argc,argv,options)
int argc;
char **argv;
-struct optrec *options;
+struct hostrec *options;
{
int c,i;
int fflag = 0; /* TRUE when -o or -c has been specified */
extern int optind, opterr; /* defined in getopt(2) */
extern char *optarg; /* defined in getopt(2) */
- bzero(options,sizeof(struct optrec)); /* start clean */
+ bzero(options,sizeof(struct hostrec)); /* start clean */
while (!errflag &&
(c = getopt_long(argc,argv,shortoptions,
*********************************************************************/
int setdefaults (options)
-struct optrec *options;
+struct hostrec *options;
{
int uid;
struct passwd *pw;
*********************************************************************/
int doPOP2 (options)
-struct optrec *options;
+struct hostrec *options;
{
int mboxfd;
int socket;
#ifdef HAVE_PROTOTYPES
/* prototypes for internal functions */
int POP3_OK (char *buf, int socket);
-int POP3_auth (struct optrec *options, int socket);
+int POP3_auth (struct hostrec *options, int socket);
int POP3_sendQUIT (int socket);
int POP3_sendSTAT (int *msgcount, int socket);
int POP3_sendRETR (int msgnum, int socket);
int POP3_sendDELE (int msgnum, int socket);
int POP3_sendLAST (int *last, int socket);
int POP3_readmsg (int socket, int mboxfd, char *host, int topipe);
-int POP3_BuildDigest (char *buf, struct optrec *options);
+int POP3_BuildDigest (char *buf, struct hostrec *options);
#endif
*********************************************************************/
int doPOP3 (options)
-struct optrec *options;
+struct hostrec *options;
{
int ok;
int mboxfd;
*********************************************************************/
int POP3_auth (options,socket)
-struct optrec *options;
+struct hostrec *options;
int socket;
{
char buf [POPBUFSIZE];
#if defined(HAVE_APOP_SUPPORT)
POP3_BuildDigest (buf,options)
char *buf;
-struct optrec *options;
+struct hostrec *options;
{
char *start,*end;
char *msg;