projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stringdex(): Clarified what it does
[mmh]
/
uip
/
rcvstore.c
diff --git
a/uip/rcvstore.c
b/uip/rcvstore.c
index
06b8b69
..
bb14ed9
100644
(file)
--- a/
uip/rcvstore.c
+++ b/
uip/rcvstore.c
@@
-11,29
+11,28
@@
#include <h/signals.h>
#include <errno.h>
#include <signal.h>
#include <h/signals.h>
#include <errno.h>
#include <signal.h>
-#include <h/mts.h>
static struct swit switches[] = {
#define CRETSW 0
{ "create", 0 },
#define NCRETSW 1
static struct swit switches[] = {
#define CRETSW 0
{ "create", 0 },
#define NCRETSW 1
- { "nocreate", 0 },
+ { "nocreate", 2 },
#define UNSEENSW 2
{ "unseen", 0 },
#define NUNSEENSW 3
#define UNSEENSW 2
{ "unseen", 0 },
#define NUNSEENSW 3
- { "nounseen", 0 },
+ { "nounseen", 2 },
#define PUBSW 4
{ "public", 0 },
#define NPUBSW 5
#define PUBSW 4
{ "public", 0 },
#define NPUBSW 5
- { "nopublic", 0 },
+ { "nopublic", 2 },
#define ZEROSW 6
{ "zero", 0 },
#define NZEROSW 7
#define ZEROSW 6
{ "zero", 0 },
#define NZEROSW 7
- { "nozero", 0 },
+ { "nozero", 2 },
#define SEQSW 8
{ "sequence name", 0 },
#define VERSIONSW 9
#define SEQSW 8
{ "sequence name", 0 },
#define VERSIONSW 9
- { "version", 0 },
+ { "Version", 0 },
#define HELPSW 10
{ "help", 0 },
{ NULL, 0 }
#define HELPSW 10
{ "help", 0 },
{ NULL, 0 }
@@
-52,7
+51,8
@@
main(int argc, char **argv)
{
int publicsw = -1, zerosw = 0;
int create = 1, unseensw = 1;
{
int publicsw = -1, zerosw = 0;
int create = 1, unseensw = 1;
- int fd, msgnum, seqp = 0;
+ int fd, msgnum;
+ size_t seqp = 0;
char *cp, *maildir, *folder = NULL, buf[BUFSIZ];
char **argp, **arguments, *seqs[NUMATTRS+1];
struct msgs *mp;
char *cp, *maildir, *folder = NULL, buf[BUFSIZ];
char **argp, **arguments, *seqs[NUMATTRS+1];
struct msgs *mp;
@@
-60,15
+60,12
@@
main(int argc, char **argv)
done=unlink_done;
done=unlink_done;
-#ifdef LOCALE
setlocale(LC_ALL, "");
setlocale(LC_ALL, "");
-#endif
invo_name = mhbasename(argv[0]);
/* read user profile/context */
context_read();
invo_name = mhbasename(argv[0]);
/* read user profile/context */
context_read();
- mts_init(invo_name);
arguments = getarguments(invo_name, argc, argv, 1);
argp = arguments;
arguments = getarguments(invo_name, argc, argv, 1);
argp = arguments;
@@
-135,7
+132,7
@@
main(int argc, char **argv)
if (folder)
adios(NULL, "only one folder at a time!");
else
if (folder)
adios(NULL, "only one folder at a time!");
else
- folder = pluspath(cp);
+ folder = getcpy(expandfol(cp));
} else {
adios(NULL, "usage: %s [+folder] [switches]",
invo_name);
} else {
adios(NULL, "usage: %s [+folder] [switches]",
invo_name);
@@
-144,13
+141,10
@@
main(int argc, char **argv)
seqs[seqp] = NULL; /* NULL terminate list of sequences */
seqs[seqp] = NULL; /* NULL terminate list of sequences */
- if (!context_find("path"))
- free(path("./", TFOLDER));
-
/* if no folder is given, use default folder */
if (!folder)
/* if no folder is given, use default folder */
if (!folder)
- folder = getfolder(0);
- maildir = m_maildir(folder);
+ folder = getdeffol();
+ maildir = toabsdir(folder);
/* check if folder exists */
if (stat(maildir, &st) == NOTOK) {
/* check if folder exists */
if (stat(maildir, &st) == NOTOK) {
@@
-205,8
+199,8
@@
main(int argc, char **argv)
** Link message into folder, and possibly add
** to the Unseen-Sequence's.
*/
** Link message into folder, and possibly add
** to the Unseen-Sequence's.
*/
- if ((msgnum = folder_addmsg(&mp, tmpfilenam, 0, unseensw, 0, 0,
- (char *)0)) == -1)
+ if ((msgnum = folder_addmsg(&mp, tmpfilenam, 0, unseensw, 0, 0, NULL))
+ == -1)
done(1);
/*
done(1);
/*
@@
-218,7
+212,7
@@
main(int argc, char **argv)
done(1);
}
done(1);
}
- seq_setunseen(mp, 0); /* synchronize any Unseen-Sequence's */
+ seq_setunseen(mp, 1); /* add new msgs to unseen sequences */
seq_save(mp); /* synchronize and save message sequences */
folder_free(mp); /* free folder/message structure */
seq_save(mp); /* synchronize and save message sequences */
folder_free(mp); /* free folder/message structure */