]> code.citadel.org Git - citadel.git/blobdiff - webcit/webcit.h
Define a consistent way to turn message id into thread id hash
[citadel.git] / webcit / webcit.h
index bbb86603530c8d909978462230bcddf61870a64c..ccd2b779d571590cab76edd8d71160319a95ff46 100644 (file)
@@ -132,7 +132,7 @@ extern char *ssl_cipher_list;
 
 #define SIZ                    4096            /* generic buffer size */
 
-#define TRACE fprintf(stderr, "\033[7mCheckpoint: %s, %d\033[0m\n", __FILE__, __LINE__)
+#define TRACE syslog(LOG_DEBUG, "CHECKPOINT: %s, %d", __FILE__, __LINE__)
 
 #define SLEEPING               180             /* TCP connection timeout */
 #define WEBCIT_TIMEOUT         900             /* WebCit session timeout */
@@ -561,6 +561,8 @@ struct wcsession {
        int cache_num_floors;
        long *IBSettingsVec;                    /* which icons should be shown / not shown? */
        const StrBuf *floordiv_expanded;        /* which floordiv currently expanded */
+       int ib_wholist_expanded;
+       int ib_roomlist_expanded;
 
 /* Transcoding cache buffers; used to avoid to frequent realloc */
        StrBuf *ConvertBuf1;
@@ -664,6 +666,8 @@ void serv_puts(const char *string);
 void who(void);
 void push_destination(void);
 void pop_destination(void);
+void robots_txt(void);
+extern void do_404(void);
 
 void ajax_mini_calendar(void);
 void fmout(char *align);
@@ -690,6 +694,7 @@ void output_headers(    int do_httpheaders,
                        int suppress_check,
                        int cache);
 void output_custom_content_header(const char *ctype);
+void cdataout(char *rawdata);
 
 #ifdef UBER_VERBOSE_DEBUGGING
 #define wc_printf(...) wcc_printf(__FILE__, __FUNCTION__, __LINE__, __VA_ARGS__)
@@ -881,3 +886,28 @@ void http_datestring(char *buf, size_t n, time_t xtime);
 #define WC_TIMEFORMAT_24 2
 
 extern int time_to_die;                        /* Nonzero if server is shutting down */
+
+/* a nice consistent place to define how we turn a message id into a thread id hash */
+#define ThreadIdHash(Buf) abs(HashLittle(ChrPtr(Buf), StrLength(Buf)))
+
+/* 
+ * Array type for a blog post.  The first message is the post; the rest are comments
+ */
+struct blogpost {
+       int top_level_id;
+       long *msgs;             /* Array of msgnums for messages we are displaying */
+       int num_msgs;           /* Number of msgnums stored in 'msgs' */
+       int alloc_msgs;         /* Currently allocated size of array */
+};
+
+
+/*
+ * Data which gets returned from a call to blogview_learn_thread_references()
+ */
+struct bltr {
+       int id;
+       int refs;
+};
+
+
+struct bltr blogview_learn_thread_references(long msgnum);