/**
* \brief Linked list of session variables encoded in an x-www-urlencoded content type
*/
+typedef struct urlcontent urlcontent;
struct urlcontent {
- struct urlcontent *next; /**< the next variable in the list */
char url_key[32]; /**< the variable name */
char *url_data; /**< its value */
+ size_t url_data_size; /**< how big is it? */
};
/**
long msgnum; /**< the message number on the citadel server */
char from[128]; /**< the author */
char to[128]; /**< the recipient */
- char subj[128]; /**< the title / subject */
+ char subj[256]; /**< the title / subject */
int hasattachments; /**< does it have atachments? */
int is_new; /**< is it yet read? */
};
int num_summ; /**< number of messages in mailbox summary view */
struct message_summary *summ; /**< array of messages for mailbox summary view */
int is_wap; /**< Client is a WAP gateway */
- struct urlcontent *urlstrings; /**< variables passed to webcit in a URL */
+ HashList *urlstrings; /**< variables passed to webcit in a URL */
struct wcsubst *vars; /**< HTTP variable substitutions for this page */
char this_page[512]; /**< URL of current page */
char http_host[512]; /**< HTTP Host: header */
void pullquote_fmout(void);
void wDumpContent(int);
void serv_printf(const char *format,...);
-char *bstr(char *key);
+
+/* TODO: get rid of the non-const-typecast */
+#define bstr(a) (char*) Bstr(a, sizeof(a) - 1)
+const char *BSTR(char *key);
+const char *Bstr(char *key, size_t keylen);
+
+#define xbstr(a, b) (char*) XBstr(a, sizeof(a) - 1, b)
+const char *XBstr(char *key, size_t keylen, size_t *len);
+const char *XBSTR(char *key, size_t *len);
+
+#define lbstr(a) LBstr(a, sizeof(a) - 1)
+long LBstr(char *key, size_t keylen);
+long LBSTR(char *key);
+
+#define ibstr(a) IBstr(a, sizeof(a) - 1)
+int IBstr(char *key, size_t keylen);
+int IBSTR(char *key);
+
+#define havebstr(a) HaveBstr(a, sizeof(a) - 1)
+int HaveBstr(char *key, size_t keylen);
+int HAVEBSTR(char *key);
+
+#define yesbstr(a) YesBstr(a, sizeof(a) - 1)
+int YesBstr(char *key, size_t keylen);
+int YESBSTR(char *key);
+
+
void urlescputs(char *);
void jsesc(char *, size_t, char *);
void jsescputs(char *);
void sleeeeeeeeeep(int);
void http_transmit_thing(char *thing, size_t length, const char *content_type,
int is_static);
-void unescape_input(char *buf);
+long unescape_input(char *buf);
void do_iconbar(void);
void do_iconbar_roomlist(void);
void do_selected_iconbar(void);