From 8179fa6e60da83d53435ed943d15a3eddb3a0d5f Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 18 Oct 2018 11:41:16 -0400 Subject: [PATCH] minor style cleanup --- citadel/modules/calendar/serv_calendar.c | 43 +++++------------------- 1 file changed, 8 insertions(+), 35 deletions(-) diff --git a/citadel/modules/calendar/serv_calendar.c b/citadel/modules/calendar/serv_calendar.c index 71c7fbc51..02153287f 100644 --- a/citadel/modules/calendar/serv_calendar.c +++ b/citadel/modules/calendar/serv_calendar.c @@ -17,9 +17,7 @@ #define PRODID "-//Citadel//NONSGML Citadel Calendar//EN" #include "ctdl_module.h" - #include - #include "msgbase.h" #include "internet_addressing.h" #include "serv_calendar.h" @@ -28,7 +26,6 @@ #include "default_timezone.h" #include "config.h" - struct ical_respond_data { char desired_partnum[SIZ]; icalcomponent *cal; @@ -310,7 +307,6 @@ void ical_send_a_reply(icalcomponent *request, char *action) { } - /* * Callback function for mime parser that hunts for calendar content types * and turns them into calendar objects. If something is found, it is placed @@ -570,8 +566,6 @@ STARTOVER: } - - /* * Handle an incoming RSVP (object with method==ICAL_METHOD_REPLY) for a * calendar event. The object has already been deserialized for us; all @@ -863,6 +857,7 @@ int ical_ctdl_is_overlap( return(1); } + /* * Phase 6 of "hunt for conflicts" * called by ical_conflicts_phase5() @@ -914,7 +909,6 @@ int ical_conflicts_phase6(struct icaltimetype t1start, } - /* * Phase 5 of "hunt for conflicts" * Called by ical_conflicts_phase4() @@ -1029,8 +1023,6 @@ void ical_conflicts_phase5(struct icaltimetype t1start, } - - /* * Phase 4 of "hunt for conflicts" * Called by ical_hunt_for_conflicts_backend() @@ -1132,7 +1124,6 @@ void ical_conflicts_phase4(icalcomponent *proposed_event, } - /* * Phase 3 of "hunt for conflicts" * Called by ical_hunt_for_conflicts() @@ -1163,7 +1154,6 @@ void ical_hunt_for_conflicts_backend(long msgnum, void *data) { } - /* * Phase 2 of "hunt for conflicts" operation. * At this point we have a calendar object which represents the VEVENT that @@ -1197,7 +1187,6 @@ void ical_hunt_for_conflicts(icalcomponent *cal) { } - /* * Hunt for conflicts (Phase 1 -- retrieve the object and call Phase 2) */ @@ -1235,7 +1224,6 @@ void ical_conflicts(long msgnum, char *partnum) { } - /* * Look for busy time in a VEVENT and add it to the supplied VFREEBUSY. * @@ -1375,7 +1363,6 @@ void ical_add_to_freebusy(icalcomponent *fb, icalcomponent *top_level_cal) { } - /* * Backend for ical_freebusy() * @@ -1410,7 +1397,6 @@ void ical_freebusy_backend(long msgnum, void *data) { } - /* * Grab another user's free/busy times */ @@ -1573,7 +1559,6 @@ void ical_freebusy(char *who) { } - /* * Backend for ical_getics() * @@ -1647,7 +1632,6 @@ void ical_getics_backend(long msgnum, void *data) { } - /* * Retrieve all of the calendar items in the current room, and output them * as a single icalendar object. @@ -1856,10 +1840,8 @@ void cmd_ical(char *argbuf) } if (!strcasecmp(subcmd, "sgi")) { - CIT_ICAL->server_generated_invitations = - (extract_int(argbuf, 1) ? 1 : 0) ; - cprintf("%d %d\n", - CIT_OK, CIT_ICAL->server_generated_invitations); + CIT_ICAL->server_generated_invitations = (extract_int(argbuf, 1) ? 1 : 0) ; + cprintf("%d %d\n", CIT_OK, CIT_ICAL->server_generated_invitations); return; } @@ -1902,7 +1884,6 @@ void cmd_ical(char *argbuf) } - /* * We don't know if the calendar room exists so we just create it at login */ @@ -2003,7 +1984,6 @@ void ical_send_out_invitations(icalcomponent *top_level_cal, icalcomponent *cal) return; } - /* If this is a VCALENDAR component, look for a VEVENT subcomponent. */ if (icalcomponent_isa(cal) == ICAL_VCALENDAR_COMPONENT) { ical_send_out_invitations(top_level_cal, @@ -2141,8 +2121,7 @@ void ical_send_out_invitations(icalcomponent *top_level_cal, icalcomponent *cal) attached_zones[num_zones_attached++] = z; } - icalproperty_set_parameter(p, - icalparameter_new_tzid(icaltimezone_get_tzid(z)) + icalproperty_set_parameter(p, icalparameter_new_tzid(icaltimezone_get_tzid(z)) ); } } @@ -2265,7 +2244,6 @@ void ical_saving_vevent(icalcomponent *top_level_cal, icalcomponent *cal) { } - /* * Back end for ical_obj_beforesave() * This hunts for the UID of the calendar event (becomes Citadel msg EUID), @@ -2365,8 +2343,6 @@ void ical_obj_beforesave_backend(char *name, char *filename, char *partnum, } - - /* * See if we need to prevent the object from being saved (we don't allow * MIME types other than text/calendar in "calendar" or "tasks" rooms). @@ -2478,6 +2454,7 @@ void ical_session_startup(void) { memset(CIT_ICAL, 0, sizeof(struct cit_ical)); } + void ical_session_shutdown(void) { free(CIT_ICAL); } @@ -2486,9 +2463,7 @@ void ical_session_shutdown(void) { /* * Back end for ical_fixed_output() */ -void ical_fixed_output_backend(icalcomponent *cal, - int recursion_level -) { +void ical_fixed_output_backend(icalcomponent *cal, int recursion_level) { icalcomponent *c; icalproperty *p; char buf[256]; @@ -2533,7 +2508,6 @@ void ical_fixed_output_backend(icalcomponent *cal, } - /* * Function to output iCalendar data as plain text. Nobody uses MSG0 * anymore, so really this is just so we expose the vCard data to the full @@ -2559,8 +2533,7 @@ void ical_fixed_output(char *ptr, int len) { } -void serv_calendar_destroy(void) -{ +void serv_calendar_destroy(void) { icaltimezone_free_builtin_timezones(); } @@ -2588,7 +2561,7 @@ CTDL_MODULE_INIT(calendar) CtdlRegisterMessageHook(ical_obj_beforesave, EVT_BEFORESAVE); CtdlRegisterMessageHook(ical_obj_aftersave, EVT_AFTERSAVE); CtdlRegisterSessionHook(ical_CtdlCreateRoom, EVT_LOGIN, PRIO_LOGIN + 1); - CtdlRegisterProtoHook(cmd_ical, "ICAL", "Citadel iCal commands"); + CtdlRegisterProtoHook(cmd_ical, "ICAL", "Citadel iCalendar commands"); CtdlRegisterSessionHook(ical_session_startup, EVT_START, PRIO_START + 1); CtdlRegisterSessionHook(ical_session_shutdown, EVT_STOP, PRIO_STOP + 80); CtdlRegisterFixedOutputHook("text/calendar", ical_fixed_output); -- 2.30.2