/* Contains information about a uuencoded attachment.
 */
const int UUENCODEDATA_FILENAME_LEN = 299;
const int UUENCODEDATA_EXT_LEN = 63;
struct uuEncodeData {
	char filename[UUENCODEDATA_FILENAME_LEN+1];
	char ext[UUENCODEDATA_EXT_LEN+1]; // extension, not MIME Type!
};

void Readln(BPTR file,char *buffer);
int decode_qprint(char *in,char *out,int length,BOOL nl);
void parse_html(char *in,char *out,int length,BOOL reset);
int decode_base64(char *in,char *out,int length);
int encode_base64(char *in,char *out,int length);
int ydecode(BOOL *corrupt,char *in,char *out,int length,uuEncodeData *uudata);
int uudecode(char *in,char *out,int length,uuEncodeData *uudata);
void getMIMEType(char *type,char *ext);
BOOL translateCharset(unsigned char *text,char *charset);

void tests(int major,int minor);

/* A #define so we only call the logging function if logging is enabled.
 * Defining with an 'if' would make more sense, but it seemed to cause
 * weird problems, hence it is done with the '&&'.
 */
extern BOOL logbool;
#define nLog logbool = ((account.flags & Account::LOGGING)!=0) && LogFunc
BOOL LogFunc(char * text,...);

/* The log file handle. */
extern BPTR logFile;
