better spam (Lou Kamenov)

This commit is contained in:
rsc 2006-05-21 18:40:33 +00:00
parent 82f56ecee2
commit 25c823399b
3 changed files with 10 additions and 3 deletions

View file

@ -3,6 +3,8 @@
#include <bio.h> #include <bio.h>
#include "hash.h" #include "hash.h"
#define mergesort bayesmergesort
/*** /***
* String hash tables. * String hash tables.
*/ */

View file

@ -5,6 +5,7 @@
#include <thread.h> #include <thread.h>
#define system nedsystem #define system nedsystem
#define rcmd nedrcmd
typedef struct Message Message; typedef struct Message Message;
typedef struct Ctype Ctype; typedef struct Ctype Ctype;

View file

@ -22,16 +22,17 @@ Imap *imap;
void void
usage(void) usage(void)
{ {
fprint(2, "usage: mailfs [-t] server\n"); fprint(2, "usage: mailfs [-DVtx] [-s srvname] server\n");
threadexitsall("usage"); threadexitsall("usage");
} }
void void
threadmain(int argc, char **argv) threadmain(int argc, char **argv)
{ {
char *server; char *server, *srvname;
int mode; int mode;
srvname = "mail";
mode = Unencrypted; mode = Unencrypted;
ARGBEGIN{ ARGBEGIN{
default: default:
@ -42,6 +43,9 @@ threadmain(int argc, char **argv)
case 'V': case 'V':
chattyimap++; chattyimap++;
break; break;
case 's':
srvname = EARGF(usage());
break;
case 't': case 't':
mode = Tls; mode = Tls;
break; break;
@ -63,6 +67,6 @@ threadmain(int argc, char **argv)
if((imap = imapconnect(server, mode)) == nil) if((imap = imapconnect(server, mode)) == nil)
sysfatal("imapconnect: %r"); sysfatal("imapconnect: %r");
threadpostmountsrv(&fs, "mail", nil, 0); threadpostmountsrv(&fs, srvname, nil, 0);
} }