projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This is the nmh-1.0.1 version from 1999-05-17.
[mmh]
/
uip
/
inc.c
diff --git
a/uip/inc.c
b/uip/inc.c
index
9752b5a
..
0d36423
100644
(file)
--- a/
uip/inc.c
+++ b/
uip/inc.c
@@
-55,6
+55,12
@@
# define APOPminc(a) 0
#endif
# define APOPminc(a) 0
#endif
+#ifndef KPOP
+# define KPOPminc(a) (a)
+#else
+# define KPOPminc(a) 0
+#endif
+
static struct swit switches[] = {
#define AUDSW 0
{ "audit audit-file", 0 },
static struct swit switches[] = {
#define AUDSW 0
{ "audit audit-file", 0 },
@@
-99,9
+105,11
@@
static struct swit switches[] = {
#define VERSIONSW 20
{ "version", 0 },
#define HELPSW 21
#define VERSIONSW 20
{ "version", 0 },
#define HELPSW 21
- { "help", 4 },
+ { "help", 0 },
#define SNOOPSW 22
{ "snoop", -5 },
#define SNOOPSW 22
{ "snoop", -5 },
+#define KPOPSW 23
+ { "kpop", KPOPminc (-4) },
{ NULL, 0 }
};
{ NULL, 0 }
};
@@
-144,7
+152,7
@@
static int return_gid;
char *map_name(char *);
#ifdef POP
char *map_name(char *);
#ifdef POP
-void done(int);
+int done(int);
static int pop_action(char *);
static int pop_pack(char *);
static int map_count(void);
static int pop_action(char *);
static int pop_pack(char *);
static int map_count(void);
@@
-157,6
+165,7
@@
main (int argc, char **argv)
int chgflag = 1, trnflag = 1;
int noisy = 1, width = 0, locked = 0;
int rpop, i, hghnum, msgnum;
int chgflag = 1, trnflag = 1;
int noisy = 1, width = 0, locked = 0;
int rpop, i, hghnum, msgnum;
+ int kpop = 0;
char *cp, *maildir, *folder = NULL;
char *format = NULL, *form = NULL;
char *newmail, *host = NULL, *user = NULL;
char *cp, *maildir, *folder = NULL;
char *format = NULL, *form = NULL;
char *newmail, *host = NULL, *user = NULL;
@@
-218,11
+227,7
@@
main (int argc, char **argv)
snoop++;
#endif /* POP */
snoop++;
#endif /* POP */
-#ifdef KPOP
- rpop = 1;
-#else
rpop = 0;
rpop = 0;
-#endif
while ((cp = *argp++)) {
if (*cp == '-') {
while ((cp = *argp++)) {
if (*cp == '-') {
@@
-346,6
+351,10
@@
main (int argc, char **argv)
rpop = 0;
continue;
rpop = 0;
continue;
+ case KPOPSW:
+ kpop = 1;
+ continue;
+
case SNOOPSW:
snoop++;
continue;
case SNOOPSW:
snoop++;
continue;
@@
-393,7
+402,10
@@
main (int argc, char **argv)
if (inc_type == INC_POP) {
if (user == NULL)
user = getusername ();
if (inc_type == INC_POP) {
if (user == NULL)
user = getusername ();
- if (rpop > 0)
+ if ( strcmp( POPSERVICE, "kpop" ) == 0 ) {
+ kpop = 1;
+ }
+ if (kpop || ( rpop > 0))
pass = getusername ();
else
ruserpass (host, &user, &pass);
pass = getusername ();
else
ruserpass (host, &user, &pass);
@@
-401,7
+413,7
@@
main (int argc, char **argv)
/*
* initialize POP connection
*/
/*
* initialize POP connection
*/
- if (pop_init (host, user, pass, snoop, rpop) == NOTOK)
+ if (pop_init (host, user, pass, snoop, kpop ? 1 : rpop, kpop) == NOTOK)
adios (NULL, "%s", response);
/* Check if there are any messages */
adios (NULL, "%s", response);
/* Check if there are any messages */
@@
-848,7
+860,7
@@
go_to_it:
seq_setunseen (mp, 0); /* set the Unseen-Sequence */
seq_save (mp); /* synchronize sequences */
context_save (); /* save the context file */
seq_setunseen (mp, 0); /* set the Unseen-Sequence */
seq_save (mp); /* synchronize sequences */
context_save (); /* save the context file */
- done (0);
+ return done (0);
}
}
@@
-886,13
+898,14
@@
cpymsg (FILE *in, FILE *out)
#ifdef POP
#ifdef POP
-void
+int
done (int status)
{
if (packfile && pd != NOTOK)
mbx_close (packfile, pd);
exit (status);
done (int status)
{
if (packfile && pd != NOTOK)
mbx_close (packfile, pd);
exit (status);
+ return 1; /* dead code to satisfy the compiler */
}
static int
}
static int
@@
-900,6
+913,7
@@
pop_action (char *s)
{
fprintf (pf, "%s\n", s);
stop += strlen (s) + 1;
{
fprintf (pf, "%s\n", s);
stop += strlen (s) + 1;
+ return 0; /* Is return value used? This was missing before 1999-07-15. */
}
static int
}
static int
@@
-915,6
+929,7
@@
pop_pack (char *s)
continue;
fputs (buffer, pf);
size += strlen (buffer) + 1;
continue;
fputs (buffer, pf);
size += strlen (buffer) + 1;
+ return 0; /* Is return value used? This was missing before 1999-07-15. */
}
static int
}
static int