From 8b3b916db46e22d83ba2740d4c09ef8c967263b2 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 19 Mar 2024 19:44:05 -0400 Subject: [PATCH] In webcit-classic, include webserver.h from webcit.h. This makes it easier to port ical_dezonify.c between webcit generations. --- webcit-ng/server/caldav_reports.c | 1 - webcit-ng/server/ical_dezonify.c | 1 + webcit/auth.c | 2 +- webcit/availability.c | 2 +- webcit/bbsview_renderer.c | 2 +- webcit/blogview_renderer.c | 2 +- webcit/calendar.c | 2 +- webcit/calendar_tools.c | 2 +- webcit/calendar_view.c | 2 +- webcit/context_loop.c | 2 +- webcit/crypto.c | 2 +- webcit/dav_delete.c | 2 +- webcit/dav_get.c | 2 +- webcit/dav_main.c | 2 +- webcit/dav_options.c | 2 +- webcit/dav_propfind.c | 2 +- webcit/dav_put.c | 2 +- webcit/dav_report.c | 2 +- webcit/downloads.c | 2 +- webcit/event.c | 2 +- webcit/feed_generator.c | 2 +- webcit/fmt_date.c | 2 +- webcit/gettext.c | 2 +- webcit/html2html.c | 2 +- webcit/ical_dezonify.c | 4 +++- webcit/icontheme.c | 2 +- webcit/inetconf.c | 2 +- webcit/jsonview_renderer.c | 2 +- webcit/locate_host.c | 2 +- webcit/mailview_renderer.c | 2 +- webcit/marchlist.c | 2 +- webcit/messages.c | 2 +- webcit/msg_renderers.c | 2 +- webcit/notes.c | 2 +- webcit/openid.c | 2 +- webcit/paramhandling.c | 2 +- webcit/preferences.c | 2 +- webcit/roomchat.c | 2 +- webcit/roomlist.c | 2 +- webcit/roomops.c | 2 +- webcit/roomtokens.c | 2 +- webcit/roomviews.c | 2 +- webcit/serv_func.c | 2 +- webcit/siteconfig.c | 2 +- webcit/sitemap.c | 2 +- webcit/sockets.c | 2 +- webcit/static.c | 2 +- webcit/subst.c | 2 +- webcit/sysdep.c | 2 +- webcit/tasks.c | 2 +- webcit/useredit.c | 2 +- webcit/vcard_edit.c | 2 +- webcit/webcit.c | 2 +- webcit/webcit.h | 2 ++ webcit/webserver.c | 2 +- 55 files changed, 57 insertions(+), 53 deletions(-) create mode 120000 webcit-ng/server/ical_dezonify.c diff --git a/webcit-ng/server/caldav_reports.c b/webcit-ng/server/caldav_reports.c index d2d323f43..9dece4c79 100644 --- a/webcit-ng/server/caldav_reports.c +++ b/webcit-ng/server/caldav_reports.c @@ -261,7 +261,6 @@ void caldav_report_one_item(struct http_transaction *h, struct ctdlsession *c, S // Returns nonzero if the supplied icalcomponent occurs within the specified time range int caldav_time_range_filter_matches(icalcomponent *cal, char *start_str, char *end_str) { - struct icaltimetype start = (start_str ? icaltime_from_string(start_str) : icaltime_null_time()); struct icaltimetype end = (end_str ? icaltime_from_string(end_str) : icaltime_null_time()); diff --git a/webcit-ng/server/ical_dezonify.c b/webcit-ng/server/ical_dezonify.c new file mode 120000 index 000000000..c3ad895f5 --- /dev/null +++ b/webcit-ng/server/ical_dezonify.c @@ -0,0 +1 @@ +../../webcit/ical_dezonify.c \ No newline at end of file diff --git a/webcit/auth.c b/webcit/auth.c index 57f8adb6b..0628d223d 100644 --- a/webcit/auth.c +++ b/webcit/auth.c @@ -13,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + #include diff --git a/webcit/availability.c b/webcit/availability.c index dcb6f1436..44e9ecf12 100644 --- a/webcit/availability.c +++ b/webcit/availability.c @@ -12,7 +12,7 @@ #include "webcit.h" -#include "webserver.h" + #include "calendar.h" /* diff --git a/webcit/bbsview_renderer.c b/webcit/bbsview_renderer.c index 67f42b12f..d06045d0b 100644 --- a/webcit/bbsview_renderer.c +++ b/webcit/bbsview_renderer.c @@ -20,7 +20,7 @@ #define RANGE 5 #include "webcit.h" -#include "webserver.h" + #include "dav.h" /* diff --git a/webcit/blogview_renderer.c b/webcit/blogview_renderer.c index 5cec69676..2e80f7a89 100644 --- a/webcit/blogview_renderer.c +++ b/webcit/blogview_renderer.c @@ -13,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + #include "dav.h" CtxType CTX_BLOGPOST = CTX_NONE; diff --git a/webcit/calendar.c b/webcit/calendar.c index ce49b3455..f0e662226 100644 --- a/webcit/calendar.c +++ b/webcit/calendar.c @@ -11,7 +11,7 @@ // GNU General Public License for more details. #include "webcit.h" -#include "webserver.h" + #include "calendar.h" // Process a calendar object. At this point it's already been deserialized by cal_process_attachment() diff --git a/webcit/calendar_tools.c b/webcit/calendar_tools.c index 3d875c307..488296ca7 100644 --- a/webcit/calendar_tools.c +++ b/webcit/calendar_tools.c @@ -13,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + #include "time.h" #include "calendar.h" diff --git a/webcit/calendar_view.c b/webcit/calendar_view.c index 6231da9aa..c6b4a9ff3 100644 --- a/webcit/calendar_view.c +++ b/webcit/calendar_view.c @@ -6,7 +6,7 @@ // is subject to the terms of the GNU General Public License, version 3. #include "webcit.h" -#include "webserver.h" + #include "calendar.h" // These define how high the hour rows are in the day view diff --git a/webcit/context_loop.c b/webcit/context_loop.c index f1035e71f..bb0c1cb97 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -16,7 +16,7 @@ */ #include "webcit.h" -#include "webserver.h" + #include "modules_init.h" /* Only one thread may manipulate SessionList at a time... */ diff --git a/webcit/crypto.c b/webcit/crypto.c index 0a9128957..845113791 100644 --- a/webcit/crypto.c +++ b/webcit/crypto.c @@ -12,7 +12,7 @@ #ifdef HAVE_OPENSSL #include "webcit.h" -#include "webserver.h" + SSL_CTX *ssl_ctx; // Global SSL context diff --git a/webcit/dav_delete.c b/webcit/dav_delete.c index 6abd8ce8e..85ae54e08 100644 --- a/webcit/dav_delete.c +++ b/webcit/dav_delete.c @@ -13,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + #include "dav.h" diff --git a/webcit/dav_get.c b/webcit/dav_get.c index 9c57f52ad..bbf013ffb 100644 --- a/webcit/dav_get.c +++ b/webcit/dav_get.c @@ -13,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + #include "dav.h" diff --git a/webcit/dav_main.c b/webcit/dav_main.c index 31cbfafff..acabf94f6 100644 --- a/webcit/dav_main.c +++ b/webcit/dav_main.c @@ -13,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + #include "dav.h" CtxType CTX_DAVNS = CTX_NONE; diff --git a/webcit/dav_options.c b/webcit/dav_options.c index f7687cf4e..cbb8f4421 100644 --- a/webcit/dav_options.c +++ b/webcit/dav_options.c @@ -13,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + #include "dav.h" /* diff --git a/webcit/dav_propfind.c b/webcit/dav_propfind.c index 76df63d21..b09b52c17 100644 --- a/webcit/dav_propfind.c +++ b/webcit/dav_propfind.c @@ -27,7 +27,7 @@ */ #include "webcit.h" -#include "webserver.h" + #include "dav.h" /* diff --git a/webcit/dav_put.c b/webcit/dav_put.c index 8b6935ef1..65e4a4225 100644 --- a/webcit/dav_put.c +++ b/webcit/dav_put.c @@ -13,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + #include "dav.h" diff --git a/webcit/dav_report.c b/webcit/dav_report.c index 9331ffd49..8780e3f30 100644 --- a/webcit/dav_report.c +++ b/webcit/dav_report.c @@ -51,7 +51,7 @@ Content-length: 255 */ #include "webcit.h" -#include "webserver.h" + #include "dav.h" diff --git a/webcit/downloads.c b/webcit/downloads.c index 0decb250a..9b7dde993 100644 --- a/webcit/downloads.c +++ b/webcit/downloads.c @@ -11,7 +11,7 @@ */ #include "webcit.h" -#include "webserver.h" + CtxType CTX_FILELIST = CTX_NONE; diff --git a/webcit/event.c b/webcit/event.c index a2e473b8f..ffe0688ab 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -13,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + #include "calendar.h" /* diff --git a/webcit/feed_generator.c b/webcit/feed_generator.c index 00bc5074f..119001bd8 100644 --- a/webcit/feed_generator.c +++ b/webcit/feed_generator.c @@ -13,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + /* * RSS feed generator -- do one message diff --git a/webcit/fmt_date.c b/webcit/fmt_date.c index a14c3d5c3..5050c1cce 100644 --- a/webcit/fmt_date.c +++ b/webcit/fmt_date.c @@ -11,7 +11,7 @@ */ #include "webcit.h" -#include "webserver.h" + #ifdef HAVE_USELOCALE extern locale_t *wc_locales; diff --git a/webcit/gettext.c b/webcit/gettext.c index 1bc40c8f4..8c749cb27 100644 --- a/webcit/gettext.c +++ b/webcit/gettext.c @@ -11,7 +11,7 @@ */ #include "webcit.h" -#include "webserver.h" + #define SEARCH_LANG 20 /* how many langs should we parse? */ #ifdef ENABLE_NLS diff --git a/webcit/html2html.c b/webcit/html2html.c index 3122c75ac..a631eb81b 100644 --- a/webcit/html2html.c +++ b/webcit/html2html.c @@ -14,7 +14,7 @@ */ #include "webcit.h" -#include "webserver.h" + /* diff --git a/webcit/ical_dezonify.c b/webcit/ical_dezonify.c index a39342d4c..b0342beee 100644 --- a/webcit/ical_dezonify.c +++ b/webcit/ical_dezonify.c @@ -6,8 +6,10 @@ // Copyright (c) 2002-2024 by the citadel.org team (Art Cancro et al) // This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License v3. +// NOTE: this file is symlinked between different generations of WebCit. When we retire WebCit-classic, copy the file over. + #include "webcit.h" -#include "webserver.h" + // Figure out which time zone needs to be used for timestamps that are not UTC and do not have a time zone specified. icaltimezone *get_default_icaltimezone(void) { diff --git a/webcit/icontheme.c b/webcit/icontheme.c index 28643aedb..723839369 100644 --- a/webcit/icontheme.c +++ b/webcit/icontheme.c @@ -23,7 +23,7 @@ #include #include "webcit.h" -#include "webserver.h" + HashList *AvailableThemes = NULL; diff --git a/webcit/inetconf.c b/webcit/inetconf.c index 265f3f6bd..3b7d82de5 100644 --- a/webcit/inetconf.c +++ b/webcit/inetconf.c @@ -3,7 +3,7 @@ */ #include "webcit.h" -#include "webserver.h" + typedef enum _e_cfg { diff --git a/webcit/jsonview_renderer.c b/webcit/jsonview_renderer.c index 5a097b0a4..b5442584e 100644 --- a/webcit/jsonview_renderer.c +++ b/webcit/jsonview_renderer.c @@ -1,5 +1,5 @@ #include "webcit.h" -#include "webserver.h" + #include "dav.h" int json_GetParamsGetServerCall(SharedMessageStatus *Stat, diff --git a/webcit/locate_host.c b/webcit/locate_host.c index d015f53f5..d3ba61707 100644 --- a/webcit/locate_host.c +++ b/webcit/locate_host.c @@ -13,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + /* * IPv4/IPv6 locate_host() diff --git a/webcit/mailview_renderer.c b/webcit/mailview_renderer.c index 309095130..9d38e6689 100644 --- a/webcit/mailview_renderer.c +++ b/webcit/mailview_renderer.c @@ -1,5 +1,5 @@ #include "webcit.h" -#include "webserver.h" + #include "dav.h" static inline void CheckConvertBufs(struct wcsession *WCC) diff --git a/webcit/marchlist.c b/webcit/marchlist.c index 7031d2643..8888c5d3c 100644 --- a/webcit/marchlist.c +++ b/webcit/marchlist.c @@ -1,5 +1,5 @@ #include "webcit.h" -#include "webserver.h" + /* * Free a session's march list diff --git a/webcit/messages.c b/webcit/messages.c index f8da6aa73..ec6306ecc 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -17,7 +17,7 @@ // GNU General Public License for more details. #include "webcit.h" -#include "webserver.h" + #include "dav.h" #include "calendar.h" diff --git a/webcit/msg_renderers.c b/webcit/msg_renderers.c index 2dfb30324..c32661081 100644 --- a/webcit/msg_renderers.c +++ b/webcit/msg_renderers.c @@ -1,5 +1,5 @@ #include "webcit.h" -#include "webserver.h" + #include "dav.h" CtxType CTX_MAILSUM = CTX_NONE; diff --git a/webcit/notes.c b/webcit/notes.c index 584e8d997..60c4d83a1 100644 --- a/webcit/notes.c +++ b/webcit/notes.c @@ -1,7 +1,7 @@ #include "webcit.h" #include "dav.h" -#include "webserver.h" + CtxType CTX_VNOTE = CTX_NONE; diff --git a/webcit/openid.c b/webcit/openid.c index ca71d6793..b56c01c24 100644 --- a/webcit/openid.c +++ b/webcit/openid.c @@ -11,7 +11,7 @@ */ #include "webcit.h" -#include "webserver.h" + /* * Display the OpenIDs associated with an account diff --git a/webcit/paramhandling.c b/webcit/paramhandling.c index 1e07fcfb3..1c301a5ee 100644 --- a/webcit/paramhandling.c +++ b/webcit/paramhandling.c @@ -13,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + /* uncomment to see all parameters sent to the server by the browser. */ /* #define DEBUG_URLSTRINGS */ diff --git a/webcit/preferences.c b/webcit/preferences.c index ae381cc1e..e438b0318 100644 --- a/webcit/preferences.c +++ b/webcit/preferences.c @@ -13,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + #include "dav.h" HashList *PreferenceHooks; diff --git a/webcit/roomchat.c b/webcit/roomchat.c index 3b0091e44..ea43afde0 100644 --- a/webcit/roomchat.c +++ b/webcit/roomchat.c @@ -13,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + /* * Display the screen containing multiuser chat for a room. diff --git a/webcit/roomlist.c b/webcit/roomlist.c index b9f967ce6..ccd54e074 100644 --- a/webcit/roomlist.c +++ b/webcit/roomlist.c @@ -3,7 +3,7 @@ */ #include "webcit.h" -#include "webserver.h" + typedef enum __eRoomParamType { eNotSet, diff --git a/webcit/roomops.c b/webcit/roomops.c index 4e48be902..2adf938d7 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -11,7 +11,7 @@ // GNU General Public License for more details. #include "webcit.h" -#include "webserver.h" + ConstStr QRFlagList[] = { {HKEY(strof(QR_PERMANENT))}, diff --git a/webcit/roomtokens.c b/webcit/roomtokens.c index 199cc3c1e..6999939ae 100644 --- a/webcit/roomtokens.c +++ b/webcit/roomtokens.c @@ -13,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + CtxType CTX_ROOMS = CTX_NONE; CtxType CTX_FLOORS = CTX_NONE; diff --git a/webcit/roomviews.c b/webcit/roomviews.c index 18563000d..d16b70530 100644 --- a/webcit/roomviews.c +++ b/webcit/roomviews.c @@ -3,7 +3,7 @@ */ #include "webcit.h" -#include "webserver.h" + char *viewdefs[VIEW_MAX]; diff --git a/webcit/serv_func.c b/webcit/serv_func.c index 10bea4657..e987c8216 100644 --- a/webcit/serv_func.c +++ b/webcit/serv_func.c @@ -6,7 +6,7 @@ // modify it under the terms of the GNU General Public License, version 3. #include "webcit.h" -#include "webserver.h" + HashList *EmbeddableMimes = NULL; StrBuf *EmbeddableMimeStrs = NULL; diff --git a/webcit/siteconfig.c b/webcit/siteconfig.c index 76e0ef0a3..39e90e614 100644 --- a/webcit/siteconfig.c +++ b/webcit/siteconfig.c @@ -8,7 +8,7 @@ */ #include "webcit.h" -#include "webserver.h" + /* * Expiry policy for the autopurger diff --git a/webcit/sitemap.c b/webcit/sitemap.c index 50618e636..a0fec9ad7 100644 --- a/webcit/sitemap.c +++ b/webcit/sitemap.c @@ -13,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + /* diff --git a/webcit/sockets.c b/webcit/sockets.c index 57ca65466..609af3ce6 100644 --- a/webcit/sockets.c +++ b/webcit/sockets.c @@ -16,7 +16,7 @@ */ #include "webcit.h" -#include "webserver.h" + long MaxRead = -1; /* should we do READ scattered or all at once? */ diff --git a/webcit/static.c b/webcit/static.c index e729d7479..7a12b4d0e 100644 --- a/webcit/static.c +++ b/webcit/static.c @@ -14,7 +14,7 @@ #include #include #include "webcit.h" -#include "webserver.h" + unsigned char OnePixelGif[37] = { 0x47, 0x49, 0x46, 0x38, 0x37, 0x61, 0x01, 0x00, diff --git a/webcit/subst.c b/webcit/subst.c index baaa5460c..f6725cd58 100644 --- a/webcit/subst.c +++ b/webcit/subst.c @@ -15,7 +15,7 @@ #define SHOW_ME_VAPPEND_PRINTF #include "webcit.h" -#include "webserver.h" + extern char *static_dirs[PATH_MAX]; /* Disk representation */ diff --git a/webcit/sysdep.c b/webcit/sysdep.c index 7c699699a..e5f928d52 100644 --- a/webcit/sysdep.c +++ b/webcit/sysdep.c @@ -48,7 +48,7 @@ #include #endif -#include "webserver.h" + #include "modules_init.h" #if HAVE_BACKTRACE #include diff --git a/webcit/tasks.c b/webcit/tasks.c index b3543826f..89910eba4 100644 --- a/webcit/tasks.c +++ b/webcit/tasks.c @@ -1,6 +1,6 @@ #include "webcit.h" #include "calendar.h" -#include "webserver.h" + /* * qsort filter to move completed tasks to bottom of task list diff --git a/webcit/useredit.c b/webcit/useredit.c index 05cab0d45..ce94a343d 100644 --- a/webcit/useredit.c +++ b/webcit/useredit.c @@ -11,7 +11,7 @@ */ #include "webcit.h" -#include "webserver.h" + CtxType CTX_USERLIST = CTX_NONE; /* diff --git a/webcit/vcard_edit.c b/webcit/vcard_edit.c index 8bd4a7841..e08a227fe 100644 --- a/webcit/vcard_edit.c +++ b/webcit/vcard_edit.c @@ -11,7 +11,7 @@ */ #include "webcit.h" -#include "webserver.h" + #include "calendar.h" CtxType CTX_VCARD = CTX_NONE; diff --git a/webcit/webcit.c b/webcit/webcit.c index 7cc9768b9..b24007f09 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -13,7 +13,7 @@ #include #include "webcit.h" #include "dav.h" -#include "webserver.h" + StrBuf *csslocal = NULL; HashList *HandlerHash = NULL; diff --git a/webcit/webcit.h b/webcit/webcit.h index 8cc1a05a5..852850561 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -624,3 +624,5 @@ extern char *ctdl_dir; /* Directory where Citadel Server is running */ // ical_dezonify() references this, but it's also used in WebCit Classic so we abstract it #define default_zone_name ChrPtr(WC->serv_info->serv_default_cal_zone) + +#include "webserver.h" diff --git a/webcit/webserver.c b/webcit/webserver.c index a12143eef..b10d5e9c3 100644 --- a/webcit/webserver.c +++ b/webcit/webserver.c @@ -4,7 +4,7 @@ // is subject to the terms of the GNU General Public License version 3. #include "webcit.h" -#include "webserver.h" + #include "modules_init.h" extern int msock; /* master listening socket */ -- 2.30.2