From 566a9edfb36ddd5f02ee82209e80922a5fe56b46 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Thu, 29 Jul 2010 20:54:27 +0000 Subject: [PATCH] * AppendImportantMessage(): api function to set Important Messages --- webcit/webcit.c | 12 ++++++++++++ webcit/webcit.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/webcit/webcit.c b/webcit/webcit.c index 8ca820422..90575af7c 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -786,6 +786,18 @@ int Conditional_IS_HTTPS(StrBuf *Target, WCTemplputParams *TP) return is_https != 0; } +void AppendImportantMessage(const char *pch, long len) +{ + wcsession *WCC = WC; + int IsNew = 0; + + if (StrLength(WCC->ImportantMsg) > 0) { + StrBufAppendBufPlain(WCC->ImportantMsg, HKEY("\n")); + } + + StrBufAppendBufPlain(WCC->ImportantMsg, pch, len); +} + int ConditionalImportantMesage(StrBuf *Target, WCTemplputParams *TP) { wcsession *WCC = WC; diff --git a/webcit/webcit.h b/webcit/webcit.h index 80df8c66f..641bc6acb 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -878,6 +878,8 @@ void utf8ify_rfc822_string(char **buf); void begin_burst(void); long end_burst(void); +void AppendImportantMessage(const char *pch, long len); + extern char *hourname[]; /* Names of hours (12am, 1am, etc.) */ void http_datestring(char *buf, size_t n, time_t xtime); -- 2.30.2