US_FLOORS | US_COLOR | US_PROMPTCTL )
+
+
#define MAJORCODE(a) (((int)(a / 100) ) * 100)
#define LISTING_FOLLOWS 100
*/
#define NLI "(not logged in)"
+/*
+ * Expiry policy for the autopurger
+ */
+#define EXPIRE_NEXTLEVEL 0 /* Inherit expiration policy */
+#define EXPIRE_MANUAL 1 /* Don't expire messages at all */
+#define EXPIRE_NUMMSGS 2 /* Keep only latest n messages */
+#define EXPIRE_AGE 3 /* Expire messages after n days */
+typedef struct __ExpirePolicy {
+ int loaded; /* has this been loaded from the server? */
+ int expire_mode;
+ int expire_value;
+}ExpirePolicy;
+void LoadExpirePolicy(GPEXWhichPolicy which);
+void SaveExpirePolicyFromHTTP(GPEXWhichPolicy which);
/*
* Linked list of session variables encoded in an x-www-urlencoded content type
/* cache stuff for templates. TODO: find a smartrer way */
HashList *ServCfg; /* cache our server config for editing */
HashList *InetCfg; /* Our inet server config for editing */
-
+ ExpirePolicy Policy[maxpolicy];
};
void locate_host(StrBuf *TBuf, int);
void become_logged_in(const StrBuf *user, const StrBuf *pass, StrBuf *serv_response);
void openid_manual_create(void);
-void display_login();
+void display_login(void);
void display_openids(void);
void do_welcome(void);
void do_logout(void);
int suppress_check,
int cache);
void output_custom_content_header(const char *ctype);
+
+#ifdef UBER_VERBOSE_DEBUGGING
+#define wc_printf(...) wcc_printf(__FILE__, __FUNCTION__, __LINE__, __VA_ARGS__)
+void wcc_printf(const char *FILE, const char *FUNCTION, long LINE, const char *format, ...);
+#else
void wc_printf(const char *format,...)__attribute__((__format__(__printf__,1,2)));
+#endif
+
void hprintf(const char *format,...)__attribute__((__format__(__printf__,1,2)));
void output_static(const char* What);
int lingering_close(int fd);
-char *memreadline(char *start, char *buf, int maxlen);
-char *memreadlinelen(char *start, char *buf, int maxlen, int *retlen);
long extract_token(char *dest, const char *source, int parmnum, char separator, int maxlen);
void remove_token(char *source, int parmnum, char separator);
StrBuf *load_mimepart(long msgnum, char *partnum);
extern char *months[];
extern char *days[];
-int read_server_binary(StrBuf *Ret, size_t total_len, StrBuf *Buf);
+int serv_read_binary(StrBuf *Ret, size_t total_len, StrBuf *Buf);
int StrBuf_ServGetBLOB(StrBuf *buf, long BlobSize);
int StrBuf_ServGetBLOBBuffered(StrBuf *buf, long BlobSize);
int read_server_text(StrBuf *Buf, long *nLines);