* remove header of a function which was moved to libcitadel a while ago
authorWilfried Göesgens <willi@citadel.org>
Thu, 25 Feb 2010 19:05:04 +0000 (19:05 +0000)
committerWilfried Göesgens <willi@citadel.org>
Thu, 25 Feb 2010 19:05:04 +0000 (19:05 +0000)
* if UBER_VERBOSE_DEBUGGING is defined, wc_printf will wrap its output with File:Function:Line[string]

webcit/webcit.c
webcit/webcit.h

index 360ba4108ab274e2e44c5d7cad732d4c0f3646ee..faf3d746201816cf0ea64c0e3111f9ee376dd93e 100644 (file)
@@ -50,17 +50,27 @@ void tmplput_HANDLER_DISPLAYNAME(StrBuf *Target, WCTemplputParams *TP)
 /*
  * web-printing funcion. uses our vsnprintf wrapper
  */
+#ifdef UBER_VERBOSE_DEBUGGING
+void wcc_printf(const char *FILE, const char *FUNCTION, long LINE, const char *format,...)
+#else
 void wc_printf(const char *format,...)
+#endif
 {
        wcsession *WCC = WC;
        va_list arg_ptr;
 
        if (WCC->WBuf == NULL)
                WCC->WBuf = NewStrBuf();
+#ifdef UBER_VERBOSE_DEBUGGING
+       StrBufAppendPrintf(WCC->WBuf, "\n%s:%s:%d[", FILE, FUNCTION, LINE);
+#endif
 
        va_start(arg_ptr, format);
        StrBufVAppendPrintf(WCC->WBuf, format, arg_ptr);
        va_end(arg_ptr);
+#ifdef UBER_VERBOSE_DEBUGGING
+       StrBufAppendPrintf(WCC->WBuf, "]\n");
+#endif
 }
 
 /*
index c93fec496104cae20646cd1ac3f748ca330340cc..2aa529bfbdf9822091fd85d35667ee4eb728f262 100644 (file)
@@ -645,7 +645,14 @@ void output_headers(    int do_httpheaders,
                        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);
 
@@ -706,8 +713,6 @@ void clear_local_substs(void);
 
 
 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);