dmc

dynamic mail client
git clone git://git.suckless.org/dmc
Log | Files | Refs | README | LICENSE

commit c35cfeda26c485e56be9fda8cf578944d1c479e1
parent 319c99b3d1305c69ce8e0bb09815a068877d38da
Author: pancake <nopcode.org>
Date:   Tue,  4 May 2010 02:07:32 +0200

* Increase number of maximum accounts
* Remove dirty code and remove out mail if
  sent was success
Diffstat:
config.def.h | 1+
dmc.c | 9++++-----
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -2,3 +2,4 @@ #define DMCDIR "/home/pancake/.dmc" #define DIRPERM 0750 #define EDITOR "vim" +#define MAXACC 16 /* maximum number of accounts */ diff --git a/dmc.c b/dmc.c @@ -208,10 +208,10 @@ static void dmcpush(const char *name) { if (*de->d_name != '.') { snprintf (file, sizeof (file), "%s/%s", path, de->d_name); printf ("--> %s\n", file); - dmcsend (file); - snprintf (file, sizeof (file), "rm -rf %s*", file); - printf ("--> (%s)\n", file); - //system (file); + if (dmcsend (file)) { + // TODO: remove .d + unlink (file); + } } closedir (dir); } @@ -235,7 +235,6 @@ static int fsize(const char *path) { return len; } -#define MAXACC 4 static char **dmcaccounts() { struct dirent *de; static char *accounts[MAXACC];