2006-02-17 17:22:20 +00:00
|
|
|
#include <u.h>
|
|
|
|
|
#include <libc.h>
|
|
|
|
|
#include <bio.h>
|
|
|
|
|
#include <auth.h>
|
|
|
|
|
#include <thread.h>
|
|
|
|
|
#include <fcall.h>
|
|
|
|
|
#include <plumb.h>
|
|
|
|
|
#include <9p.h>
|
|
|
|
|
|
|
|
|
|
enum
|
|
|
|
|
{
|
|
|
|
|
STACK = 8192
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#include "box.h"
|
|
|
|
|
#include "sx.h"
|
|
|
|
|
#include "imap.h"
|
|
|
|
|
#include "fs.h"
|
|
|
|
|
|
|
|
|
|
void mailthreadinit(void);
|
|
|
|
|
void mailthread(void (*fn)(void*), void*);
|
|
|
|
|
|
|
|
|
|
void warn(char*, ...);
|
|
|
|
|
|
|
|
|
|
enum
|
|
|
|
|
{
|
|
|
|
|
NoEncoding,
|
|
|
|
|
QuotedPrintable,
|
2006-02-23 11:51:18 +00:00
|
|
|
QuotedPrintableU,
|
2006-02-17 17:22:20 +00:00
|
|
|
Base64,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
char* decode(int, char*, int*);
|
|
|
|
|
char* tcs(char*, char*);
|
|
|
|
|
char* unrfc2047(char*);
|
|
|
|
|
|
|
|
|
|
extern Imap *imap;
|
2006-02-28 20:12:18 +00:00
|
|
|
|
|
|
|
|
#undef isnumber
|
|
|
|
|
#define isnumber upas_isnumber
|
|
|
|
|
|
|
|
|
|
#define esmprint smprint
|
|
|
|
|
#define emalloc(n) mallocz(n, 1)
|
|
|
|
|
#define erealloc realloc
|
|
|
|
|
#define estrdup strdup
|
|
|
|
|
|