* typedef wcsession, so we don't always need to say gcc again its a struct.
authorWilfried Göesgens <willi@citadel.org>
Sat, 13 Dec 2008 18:59:52 +0000 (18:59 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sat, 13 Dec 2008 18:59:52 +0000 (18:59 +0000)
* removed faster blabla comments, since we should know it meanwhile.

24 files changed:
webcit/auth.c
webcit/calendar.c
webcit/calendar_view.c
webcit/context_loop.c
webcit/downloads.c
webcit/gettext.c
webcit/iconbar.c
webcit/inetconf.c
webcit/messages.c
webcit/msg_renderers.c
webcit/paramhandling.c
webcit/roomops.c
webcit/rss.c
webcit/serv_func.c
webcit/siteconfig.c
webcit/smtpqueue.c
webcit/subst.c
webcit/summary.c
webcit/tcp_sockets.c
webcit/vcard_edit.c
webcit/webcit.c
webcit/webcit.h
webcit/webserver.c
webcit/who.c

index e8c627399d25bcb38700e8e723181219a8a3b6a1..3ae236e4c6cc82ce66ea4e582419a7e9a46aa5b2 100644 (file)
@@ -176,7 +176,7 @@ void become_logged_in(char *user, char *pass, char *serv_response)
  */
 void do_login(void)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        char buf[SIZ];
 
        if (havebstr("language")) {
@@ -342,7 +342,7 @@ void do_openid_login(void)
 void finalize_openid_login(void)
 {
        char buf[1024];
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        int already_logged_in = (WCC->logged_in) ;
        int linecount = 0;
        char result[128] = "";
@@ -850,7 +850,7 @@ int ConditionalRoomAide(WCTemplateToken *Tokens, void *Context, int ContextType)
 
 int ConditionalRoomAcessDelete(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        return ( (WCC->is_room_aide) || (WCC->is_mailbox) || (WCC->room_flags2 & QR2_COLLABDEL) );
 }
 
index 9dc2b07330ad9182b62cb4e5d6115e41641140ef..30698c816304d994167ed50ba89acb37670356cd 100644 (file)
@@ -397,7 +397,7 @@ void display_individual_cal(icalcomponent *cal, long msgnum, char *from, int unr
        icalproperty *ps = NULL;
        struct icaltimetype dtstart, dtend;
        struct icaldurationtype dur;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        disp_cal *Cal;
        size_t len;
        time_t final_recurrence = 0;
index 14112d0932918217dd91821ace59899a7f90276a..db5c45346f02feb506bcce742840cfe8010c99d5 100644 (file)
@@ -182,7 +182,7 @@ void calendar_month_view_display_events(int year, int month, int day)
        int all_day_event = 0;
        int show_event = 0;
        char buf[256];
-       struct wcsession *WCC = WC;     /* This is done to make it run faster; WC is a function */
+       wcsession *WCC = WC;
        time_t tt;
 
        if (GetCount(WCC->disp_cal_items) == 0) {
@@ -362,7 +362,7 @@ void calendar_month_view_brief_events(time_t thetime, const char *daycolor) {
        time_t event_tt;
        time_t event_tts;
        time_t event_tte;
-       struct wcsession *WCC = WC;     /* This is done to make it run faster; WC is a function */
+       wcsession *WCC = WC;
        struct tm event_tms;
        struct tm event_tme;
        struct tm today_tm;
@@ -778,7 +778,7 @@ void calendar_day_view_display_events(time_t thetime,
        int show_event = 0;
        int all_day_event = 0;
        int ongoing_event = 0;
-       struct wcsession *WCC = WC;     /* This is done to make it run faster; WC is a function */
+       wcsession *WCC = WC;
        disp_cal *Cal;
        struct icaltimetype t;
        struct icaltimetype end_t;
@@ -1257,7 +1257,7 @@ void calendar_summary_view(void) {
        time_t now;
        int all_day_event = 0;
        char timestring[SIZ];
-       struct wcsession *WCC = WC;     /* This is done to make it run faster; WC is a function */
+       wcsession *WCC = WC;
 
        if (GetCount(WC->disp_cal_items) == 0) {
                return;
@@ -1481,7 +1481,7 @@ void do_tasks_view(void) {
        time_t due;
        char buf[SIZ];
        icalproperty *p;
-       struct wcsession *WCC = WC;     /* This is done to make it run faster; WC is a function */
+       wcsession *WCC = WC;
 
        wprintf("<div class=\"fix_scrollbar_bug\">"
                "<table class=\"calendar_view_background\"><tbody id=\"taskview\">\n<tr>\n"
index 128487dc04663c1ffce5b34652bf773b96a68421..fa789c138c247477b0b92442f816b617f7093e8c 100644 (file)
 /* Only one thread may manipulate SessionList at a time... */
 pthread_mutex_t SessionListMutex;
 
-struct wcsession *SessionList = NULL; /**< our sessions ????*/
+wcsession *SessionList = NULL; /**< our sessions ????*/
 
 pthread_key_t MyConKey;         /**< TSD key for MySession() */
 
 
 
-void DestroySession(struct wcsession **sessions_to_kill)
+void DestroySession(wcsession **sessions_to_kill)
 {
        close((*sessions_to_kill)->serv_sock);
        close((*sessions_to_kill)->chat_sock);
@@ -47,7 +47,7 @@ void DestroySession(struct wcsession **sessions_to_kill)
 
 void shutdown_sessions(void)
 {
-       struct wcsession *sptr;
+       wcsession *sptr;
        
        for (sptr = SessionList; sptr != NULL; sptr = sptr->next) {
                        sptr->killthis = 1;
@@ -56,8 +56,8 @@ void shutdown_sessions(void)
 
 void do_housekeeping(void)
 {
-       struct wcsession *sptr, *ss;
-       struct wcsession *sessions_to_kill = NULL;
+       wcsession *sptr, *ss;
+       wcsession *sessions_to_kill = NULL;
        int num_sessions = 0;
        static int num_threads = MIN_WORKER_THREADS;
 
@@ -297,7 +297,7 @@ void context_loop(int *sock)
        int desired_session = 0;
        int got_cookie = 0;
        int gzip_ok = 0;
-       struct wcsession *TheSession, *sptr;
+       wcsession *TheSession, *sptr;
        char httpauth_string[1024];
        char httpauth_user[1024];
        char httpauth_pass[1024];
@@ -529,9 +529,9 @@ authentication
         */
        if (TheSession == NULL) {
                lprintf(3, "Creating a new session\n");
-               TheSession = (struct wcsession *)
-                       malloc(sizeof(struct wcsession));
-               memset(TheSession, 0, sizeof(struct wcsession));
+               TheSession = (wcsession *)
+                       malloc(sizeof(wcsession));
+               memset(TheSession, 0, sizeof(wcsession));
                TheSession->serv_sock = (-1);
                TheSession->chat_sock = (-1);
        
@@ -615,7 +615,7 @@ authentication
 
 void tmpl_nonce(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        StrBufAppendPrintf(Target, "%ld",
                           (WCC != NULL)? WCC->nonce:0);                   
 }
index 23e1ccd23aae70fac1bfd657fb7d7350672389de..8ec1137380154abe0b9ac4074137b8d12b29de22 100644 (file)
@@ -428,7 +428,7 @@ void upload_file(void)
        char buf[1024];
        long bytes_transmitted = 0;
        long blocksize;
-       struct wcsession *WCC = WC;     /* stack this for faster access (WC is a function) */
+       wcsession *WCC = WC;     /* stack this for faster access (WC is a function) */
 
        MimeType = GuessMimeType(WCC->upload, WCC->upload_length); 
        serv_printf("UOPN %s|%s|%s", WCC->upload_filename, MimeType, bstr("description"));
@@ -471,7 +471,7 @@ void upload_file(void)
  */
 void output_image()
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        char buf[SIZ];
        off_t bytes;
        const char *MimeType;
index d504a6eaf2895acc904ddc2084f15333993c3846..f055ee5a320f9a7742d3d57ff1ec288f302b542f 100644 (file)
@@ -251,7 +251,7 @@ void set_selected_language(const char *lang) {
  */
 void go_selected_language(void) {
 #ifdef HAVE_USELOCALE
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        if (WCC->selected_language < 0) return;
        uselocale(wc_locales[WCC->selected_language]);  /** switch locales */
        textdomain(textdomain(NULL));                   /** clear the cache */
index cab143b881924a60527adee89ea245bf0f76471c..271d0d6bac0fe139ff305cab229b79ef25952096 100644 (file)
@@ -53,7 +53,7 @@ inline const char *PrintInt(void *Prefstr)
 
 void LoadIconSettings(void)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        StrBuf *iconbar = NULL;
        StrBuf *buf = NewStrBuf();;
        StrBuf *key = NewStrBuf();
@@ -805,7 +805,7 @@ void commit_iconbar(void) {
 
 void tmplput_iconbar(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        if ((WCC != NULL) && (WCC->logged_in)) {
                wprintf("<div id=\"iconbar\">");
index 10313f16740041a59e1880eb479cb694c9f19f3c..56981ddaae694f0bd21ec28aa0bc1d7737bfdb9f 100644 (file)
@@ -44,7 +44,7 @@ ConstStrBuf CfgNames[] = {
  */
 void load_inetconf(void)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        StrBuf *Buf, *CfgToken, *Value;
        void *vHash;
        HashList *Hash;
@@ -93,7 +93,7 @@ void load_inetconf(void)
  * save changes to the inet config
  */
 void new_save_inetconf(void) {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        HashList *Hash;
        StrBuf *Str;
        const StrBuf *eType, *eNum, *eName;
@@ -182,7 +182,7 @@ void InetCfgSubst(StrBuf *TemplBuffer, void *vContext, WCTemplateToken *Tokens)
 
 void DeleteInetConfHash(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
 
        if (WCC->InetCfg != NULL)
                DeleteHash(&WCC->InetCfg);
@@ -192,7 +192,7 @@ void DeleteInetConfHash(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void
 
 HashList *GetInetConfHash(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        void *vHash;
 
        if (WCC->InetCfg == NULL)
index bad4b3e8bed827fb434453bb5a8c3092b43aefc3..9d14b3c38a293354c8983f7781e319964fd7387f 100644 (file)
@@ -376,7 +376,7 @@ message_summary *ReadOneMessageSummary(StrBuf *RawMessage, const char *DefaultSu
 int load_msg_ptrs(char *servcmd, int with_headers)
 {
        StrBuf* FoundCharset = NULL;
-        struct wcsession *WCC = WC;
+        wcsession *WCC = WC;
        message_summary *Msg;
        StrBuf *Buf, *Buf2;
        ///char buf[1024];
@@ -489,7 +489,7 @@ inline message_summary* GetMessagePtrAt(int n, HashList *Summ)
 void DrawMessageDropdown(StrBuf *Selector, long maxmsgs, long startmsg)
 {
        StrBuf *TmpBuf;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        message_summary* Msg;
        int lo, hi, n;
        int i = 0;
@@ -579,7 +579,7 @@ void readloop(long oper)
        addrbookent *addrbook = NULL;
        int num_ab = 0;
        int bbs_reverse = 0;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        HashPos *at;
        const char *HashKey;
        long HKLen;
@@ -887,7 +887,7 @@ DONE:
  * ... this is where the actual message gets transmitted to the server.
  */
 void post_mime_to_server(void) {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        char top_boundary[SIZ];
        char alt_boundary[SIZ];
        int is_multipart = 0;
@@ -1001,7 +1001,7 @@ void post_message(void)
        wc_mime_attachment  *att;
        int is_anonymous = 0;
        const StrBuf *display_name = NULL;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        if (havebstr("force_room")) {
                gotoroom(bstr("force_room"));
@@ -1194,7 +1194,7 @@ void display_enter(void)
        int recipient_bad = 0;
        int is_anonymous = 0;
 
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
 
        now = time(NULL);
 
index c6dbf179502bc3938e9aa1f4e21cfc9a1029b917..c10c7cd987364b16cb4491add469fa4ea4791714 100644 (file)
@@ -916,7 +916,7 @@ void tmplput_MIME_Data(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void
 
 void tmplput_MIME_LoadData(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;     
+       wcsession *WCC = WC;    
        wc_mime_attachment *mime = (wc_mime_attachment*) Context;
        wc_mime_attachment *att;
        
index 628f914f6711447a44ffb61dc8e9b90d9f87c1fa..7e85cfbe4c721d225b00a621957d14a3dde6ae55 100644 (file)
@@ -22,7 +22,7 @@ void ParseURLParams(StrBuf *url)
        const char *aptr, *bptr, *eptr, *up;
        int len, keylen;
        urlcontent *u;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
 
        if (WCC->urlstrings == NULL)
                WCC->urlstrings = NewHash(1, NULL);
@@ -86,7 +86,7 @@ void free_urls(void)
 
 void dump_vars(void)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        urlcontent *u;
        void *U;
        long HKLen;
index 51dd72788700bf90f8851159d4596eb6af44754a..6a41b0c41e358859cb8d091f1ecc98bd6a8406e4 100644 (file)
@@ -79,7 +79,7 @@ void load_floorlist(void)
 /*
  * Free a session's march list
  */
-void free_march_list(struct wcsession *wcf)
+void free_march_list(wcsession *wcf)
 {
        struct march *mptr;
 
@@ -3197,7 +3197,7 @@ void do_rooms_view(struct folder *fold, int max_folders, int num_floors) {
  * \param which_floordiv name of the floordiv???
  */
 void set_floordiv_expanded(void) {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        StrBuf *FloorDiv;
        
        FloorDiv = NewStrBuf();
@@ -3682,7 +3682,7 @@ void tmplput_roombanner(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void
 
 void tmplput_ungoto(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
 
        if ((WCC!=NULL) && 
            (!IsEmptyStr(WCC->ugname)))
@@ -3692,7 +3692,7 @@ void tmplput_ungoto(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Co
 
 int ConditionalHaveUngoto(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        return ((WCC!=NULL) && 
                (!IsEmptyStr(WCC->ugname)) && 
@@ -3704,7 +3704,7 @@ int ConditionalHaveUngoto(WCTemplateToken *Tokens, void *Context, int ContextTyp
 
 int ConditionalRoomHas_QR_PERMANENT(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        return ((WCC!=NULL) &&
                ((WCC->room_flags & QR_PERMANENT) != 0));
@@ -3712,7 +3712,7 @@ int ConditionalRoomHas_QR_PERMANENT(WCTemplateToken *Tokens, void *Context, int
 
 int ConditionalRoomHas_QR_INUSE(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        return ((WCC!=NULL) &&
                ((WCC->room_flags & QR_INUSE) != 0));
@@ -3720,7 +3720,7 @@ int ConditionalRoomHas_QR_INUSE(WCTemplateToken *Tokens, void *Context, int Cont
 
 int ConditionalRoomHas_QR_PRIVATE(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        return ((WCC!=NULL) &&
                ((WCC->room_flags & QR_PRIVATE) != 0));
@@ -3728,7 +3728,7 @@ int ConditionalRoomHas_QR_PRIVATE(WCTemplateToken *Tokens, void *Context, int Co
 
 int ConditionalRoomHas_QR_PASSWORDED(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        return ((WCC!=NULL) &&
                ((WCC->room_flags & QR_PASSWORDED) != 0));
@@ -3736,7 +3736,7 @@ int ConditionalRoomHas_QR_PASSWORDED(WCTemplateToken *Tokens, void *Context, int
 
 int ConditionalRoomHas_QR_GUESSNAME(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        return ((WCC!=NULL) &&
                ((WCC->room_flags & QR_GUESSNAME) != 0));
@@ -3744,7 +3744,7 @@ int ConditionalRoomHas_QR_GUESSNAME(WCTemplateToken *Tokens, void *Context, int
 
 int ConditionalRoomHas_QR_DIRECTORY(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        return ((WCC!=NULL) &&
                ((WCC->room_flags & QR_DIRECTORY) != 0));
@@ -3752,7 +3752,7 @@ int ConditionalRoomHas_QR_DIRECTORY(WCTemplateToken *Tokens, void *Context, int
 
 int ConditionalRoomHas_QR_UPLOAD(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        return ((WCC!=NULL) &&
                ((WCC->room_flags & QR_UPLOAD) != 0));
@@ -3760,7 +3760,7 @@ int ConditionalRoomHas_QR_UPLOAD(WCTemplateToken *Tokens, void *Context, int Con
 
 int ConditionalRoomHas_QR_DOWNLOAD(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        return ((WCC!=NULL) &&
                ((WCC->room_flags & QR_DOWNLOAD) != 0));
@@ -3768,7 +3768,7 @@ int ConditionalRoomHas_QR_DOWNLOAD(WCTemplateToken *Tokens, void *Context, int C
 
 int ConditionalRoomHas_QR_VISDIR(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        return ((WCC!=NULL) &&
                ((WCC->room_flags & QR_VISDIR) != 0));
@@ -3776,7 +3776,7 @@ int ConditionalRoomHas_QR_VISDIR(WCTemplateToken *Tokens, void *Context, int Con
 
 int ConditionalRoomHas_QR_ANONONLY(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        return ((WCC!=NULL) &&
                ((WCC->room_flags & QR_ANONONLY) != 0));
@@ -3784,7 +3784,7 @@ int ConditionalRoomHas_QR_ANONONLY(WCTemplateToken *Tokens, void *Context, int C
 
 int ConditionalRoomHas_QR_ANONOPT(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        return ((WCC!=NULL) &&
                ((WCC->room_flags & QR_ANONOPT) != 0));
@@ -3792,7 +3792,7 @@ int ConditionalRoomHas_QR_ANONOPT(WCTemplateToken *Tokens, void *Context, int Co
 
 int ConditionalRoomHas_QR_NETWORK(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        return ((WCC!=NULL) &&
                ((WCC->room_flags & QR_NETWORK) != 0));
@@ -3800,7 +3800,7 @@ int ConditionalRoomHas_QR_NETWORK(WCTemplateToken *Tokens, void *Context, int Co
 
 int ConditionalRoomHas_QR_PREFONLY(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        return ((WCC!=NULL) &&
                ((WCC->room_flags & QR_PREFONLY) != 0));
@@ -3808,7 +3808,7 @@ int ConditionalRoomHas_QR_PREFONLY(WCTemplateToken *Tokens, void *Context, int C
 
 int ConditionalRoomHas_QR_READONLY(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        return ((WCC!=NULL) &&
                ((WCC->room_flags & QR_READONLY) != 0));
@@ -3816,7 +3816,7 @@ int ConditionalRoomHas_QR_READONLY(WCTemplateToken *Tokens, void *Context, int C
 
 int ConditionalRoomHas_QR_MAILBOX(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        return ((WCC!=NULL) &&
                ((WCC->room_flags & QR_MAILBOX) != 0));
@@ -3829,7 +3829,7 @@ int ConditionalRoomHas_QR_MAILBOX(WCTemplateToken *Tokens, void *Context, int Co
 
 int ConditionalHaveRoomeditRights(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
 
        return ( (WCC!= NULL) && 
                 ((WCC->axlevel >= 6) || 
index ffdf08c4f325480d2ae0f89db0284c08a598fa8c..1369098903d67b07af80962942edee80593dc2f7 100644 (file)
@@ -46,7 +46,7 @@ void display_rss_control(char *reply_to, char *subject)
 void display_rss(char *roomname, StrBuf *request_method)
 {
        message_summary *Msg;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        int nummsgs;
        int a, b;
        int bq = 0;
index 24d64589695b36b6c91c9aae4bde057d04b3052e..cd7b73a39b63971e674cd97a5d065a476485f08f 100644 (file)
@@ -469,7 +469,7 @@ int read_server_binary(StrBuf *Ret, size_t total_len)
  */
 int read_server_text(StrBuf *Buf, long *nLines)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        long nRead;
        long nTotal = 0;
        long nlines;
index 53d8684f2497e937068764e79bdb88a6dc8f47b3..58c7e1ca637f9b89dddf18f31bae93ac921b32c7 100644 (file)
@@ -125,7 +125,7 @@ CfgMapping ServerConfig[] = {
  */
 void load_siteconfig(void)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        StrBuf *Buf, *CfgToken;
        HashList *Cfg;
        char buf[SIZ];
@@ -195,7 +195,7 @@ void load_siteconfig(void)
  */
 void siteconfig(void)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        int i;
        char buf[256];
 
@@ -247,7 +247,7 @@ void siteconfig(void)
 
 void tmplput_servcfg(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        void *vBuf;
        StrBuf *Buf;
 
@@ -265,7 +265,7 @@ void tmplput_servcfg(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *C
 
 int ConditionalServCfg(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        void *vBuf;
        StrBuf *Buf;
 
@@ -290,7 +290,7 @@ int ConditionalServCfg(WCTemplateToken *Tokens, void *Context, int ContextType)
 
 int ConditionalServCfgSubst(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        void *vBuf;
        StrBuf *Buf;
 
index a830b660f8b98b5cd9dd42cb074eb4965755c4cd..ca17b24e1fcb6dfb2a265b531edd6de07ec7e0c5 100644 (file)
@@ -165,7 +165,7 @@ void display_queue_msg(long msgnum)
 
 void display_smtpqueue_inner_div(void) {
        message_summary *Msg;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        int i;
        int num_msgs;
 
index 41aad9274daad0bb6e6d3818cf6795c8f1956215..1de23b6ae5e67ffb899d09b0a8324e581727be96 100644 (file)
@@ -139,7 +139,7 @@ void VarPrintEntry(const char *Key, void *vSubst, int odd)
 /**
  * \brief Clear out the list of substitution variables local to this session
  */
-void clear_substs(struct wcsession *wc) {
+void clear_substs(wcsession *wc) {
 
        if (wc->vars != NULL) {
                DeleteHash(&wc->vars);
@@ -221,7 +221,7 @@ void deletevar(void *data)
 wcsubst *NewSubstVar(const char *keyname, int keylen, int type)
 {
        wcsubst* ptr;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
 
        ptr = (wcsubst *) malloc(sizeof(wcsubst));
        memset(ptr, 0, sizeof(wcsubst));
@@ -259,7 +259,7 @@ void SVPRINTF(char *keyname, int keytype, const char *format,...)
        void *vPtr;
        wcsubst *ptr = NULL;
        size_t keylen;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        keylen = strlen(keyname);
        /**
@@ -295,7 +295,7 @@ void svprintf(char *keyname, size_t keylen, int keytype, const char *format,...)
        va_list arg_ptr;
        void *vPtr;
        wcsubst *ptr = NULL;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
                
        /**
         * First look if we're doing a replacement of
@@ -329,7 +329,7 @@ void SVPut(char *keyname, size_t keylen, int keytype, char *Data)
 {
        void *vPtr;
        wcsubst *ptr = NULL;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
 
        
        /**
@@ -360,7 +360,7 @@ void SVPutLong(char *keyname, size_t keylen, long Data)
 {
        void *vPtr;
        wcsubst *ptr = NULL;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
 
        
        /**
@@ -389,7 +389,7 @@ void SVCallback(char *keyname, size_t keylen, WCHandlerFunc fcn_ptr)
 {
        wcsubst *ptr;
        void *vPtr;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
 
        /**
         * First look if we're doing a replacement of
@@ -419,7 +419,7 @@ void SVPUTBuf(const char *keyname, int keylen, const StrBuf *Buf, int ref)
 {
        wcsubst *ptr;
        void *vPtr;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
 
        /**
         * First look if we're doing a replacement of
@@ -518,7 +518,7 @@ void GetTemplateTokenString(WCTemplateToken *Tokens,
  * \param keyname get a key to print
  */
 void print_value_of(StrBuf *Target, WCTemplateToken *Tokens, void *Context, int ContextType) {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        wcsubst *ptr;
        void *vVar;
 
@@ -568,7 +568,7 @@ void print_value_of(StrBuf *Target, WCTemplateToken *Tokens, void *Context, int
 
 int CompareSubstToToken(TemplateParam *ParamToCompare, TemplateParam *ParamToLookup)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        wcsubst *ptr;
        void *vVar;
 
@@ -606,7 +606,7 @@ int CompareSubstToToken(TemplateParam *ParamToCompare, TemplateParam *ParamToLoo
 
 int CompareSubstToStrBuf(StrBuf *Compare, TemplateParam *ParamToLookup)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        wcsubst *ptr;
        void *vVar;
 
@@ -647,7 +647,7 @@ void StrBufAppendTemplate(StrBuf *Target,
                          void *Context, int ContextType,
                          const StrBuf *Source, int FormatTypeIndex)
 {
-        struct wcsession *WCC;
+        wcsession *WCC;
        StrBuf *Buf;
        char EscapeAs = ' ';
 
index 41d2aa025828dfd6b2fd70b74752122c0bf4a9ce..d48643b13f2dde21a67ed27dad804f723cb80787 100644 (file)
@@ -82,7 +82,7 @@ void tasks_section(void) {
        long HKLen;
        void *vMsg;
        message_summary *Msg;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
 
        gotoroom("_TASKS_");
        if (WCC->wc_view != VIEW_TASKS) {
@@ -119,7 +119,7 @@ void calendar_section(void) {
        long HKLen;
        void *vMsg;
        message_summary *Msg;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        struct calview c;
 
        gotoroom("_CALENDAR_");
index d7a43f414006e84a4e1d4dcf6681ec35a84ac2bf..8c603ee1e720fa300961485c54341faf33426c1b 100644 (file)
@@ -119,7 +119,7 @@ int tcp_connectsock(char *host, char *service)
  *  buf the buffer to get the input to
  *  bytes the maximal number of bytes to read
  */
-inline void _serv_read(char *buf, int bytes, struct wcsession *WCC)
+inline void _serv_read(char *buf, int bytes, wcsession *WCC)
 {
        int len, rlen;
 
@@ -143,7 +143,7 @@ inline void _serv_read(char *buf, int bytes, struct wcsession *WCC)
 
 void serv_read(char *buf, int bytes)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        _serv_read(buf, bytes, WCC);
 }
 
@@ -152,7 +152,7 @@ void serv_read(char *buf, int bytes)
  */
 int serv_getln(char *strbuf, int bufsize)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        int ch, len;
        char buf[2];
 
index d137d191ec31ddf8f8f0ccf1752c1363fcbd8a75..bc0ed9174a1b3ec68a987758005faa7c61072882 100644 (file)
@@ -1127,7 +1127,7 @@ void display_vcard_photo_img(void)
        struct vCard *v;
        char *photosrc;
        const char *contentType;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
 
        msgnum = StrTol(WCC->UrlFragment2);
        
index 7054c7d9506ed6ea982510a4cbd32840e5b752ed..909a403871602a8f01fd68faddf8527fc7f2105f 100644 (file)
@@ -44,7 +44,7 @@ void WebcitAddUrlHandler(const char * UrlString,
  */
 void wprintf(const char *format,...)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        va_list arg_ptr;
 
        if (WCC->WBuf == NULL)
@@ -60,7 +60,7 @@ void wprintf(const char *format,...)
  */
 void hprintf(const char *format,...)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        va_list arg_ptr;
 
        va_start(arg_ptr, format);
@@ -407,7 +407,7 @@ void authorization_required(const char *message)
  * Convenience functions to wrap around asynchronous ajax responses
  */
 void begin_ajax_response(void) {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
 
        FlushStrBuf(WCC->HBuf);
         output_headers(0, 0, 0, 0, 0, 0);
@@ -565,7 +565,7 @@ void session_loop(HashList *HTTPHeaders, StrBuf *ReqLine, StrBuf *request_method
        char c_httpauth_string[SIZ];
        char c_httpauth_user[SIZ];
        char c_httpauth_pass[SIZ];
-       struct wcsession *WCC;
+       wcsession *WCC;
        
        safestrncpy(c_username, "", sizeof c_username);
        safestrncpy(c_password, "", sizeof c_password);
@@ -1021,7 +1021,7 @@ void diagnostics(void)
 
 int ConditionalImportantMesage(WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        if (WCC != NULL)
                return (!IsEmptyStr(WCC->ImportantMessage));
        else
@@ -1030,7 +1030,7 @@ int ConditionalImportantMesage(WCTemplateToken *Tokens, void *Context, int Conte
 
 void tmplput_importantmessage(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        if (WCC != NULL) {
 /*
@@ -1065,7 +1065,7 @@ void tmplput_bstr(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Cont
 
 void tmplput_trailing_javascript(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *vContext, int ContextType)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
 
        if (WCC != NULL)
                StrBufAppendTemplate(Target, nArgs, Tokens, vContext, ContextType,
@@ -1082,7 +1082,7 @@ void tmplput_csslocal(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *
 void tmplput_url_part(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType)
 {
        StrBuf *UrlBuf;
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
        
        if (WCC != NULL) {
                if (Tokens->Params[0]->lvalue == 0)
index 51462a1a40d96f69bc489012e523caf40f4cad40..9fe3dfad168a64d32f367913e067ead1569f6bcc 100644 (file)
@@ -533,8 +533,9 @@ enum {
  * One of these is kept for each active Citadel session.
  * HTTP transactions are bound to one at a time.
  */
+typedef struct wcsession wcsession;
 struct wcsession {
-       struct wcsession *next;                 /**< Linked list */
+       wcsession *next;                        /**< Linked list */
        int wc_session;                         /**< WebCit session ID */
        char wc_username[128];                  /**< login name of current user */
        char wc_fullname[128];                  /**< Screen name of current user */
@@ -916,8 +917,8 @@ void render_calendar_view(struct calview *c);
 void do_tasks_view(void);
 void calendar_summary_view(void);
 int load_msg_ptrs(char *servcmd, int with_headers);
-void free_attachments(struct wcsession *sess);
-void free_march_list(struct wcsession *wcf);
+void free_attachments(wcsession *sess);
+void free_march_list(wcsession *wcf);
 void display_rules_editor_inner_div(void);
 void generate_uuid(char *);
 void CtdlMakeTempFileName(char *, int);
index 480cdcf0d4dde6639f2eba37037ad16083c6a332..517a9d30799ef93c18f7a26171e52411182a0dce 100644 (file)
@@ -263,7 +263,7 @@ void begin_burst(void)
  */
 long end_burst(void)
 {
-       struct wcsession *WCC = WC;
+       wcsession *WCC = WC;
         const char *ptr, *eptr;
         long count;
        ssize_t res;
index 33f9f99a3489341d7f06db504d8c59ef2d55071c..68b33d80676c73ee396ee7cfc2bd727ac4cd8b45 100644 (file)
@@ -43,7 +43,7 @@ int CompareUserStruct(const void *VUser1, const void *VUser2)
 int GetWholistSection(HashList *List, time_t now)
 {
        StrBuf *Buf, *XBuf;
-       struct wcsession *WCC = WC;     /* This is done to make it run faster; WC is a function */
+       wcsession *WCC = WC;
        UserStateStruct *User, *OldUser;
        void *VOldUser;
        size_t BufLen;