All pastes #2097805 Raw Edit

Mine

public cpp v1 · immutable
#2097805 ·published 2011-12-31 14:18 UTC
rendered paste body
Index: dbase.cpp===================================================================--- dbase.cpp   (revision 26)+++ dbase.cpp   (working copy)@@ -2328,8 +2328,10 @@         printf(DESIGN_VIEW_THREAD_MSG_HEADER);-#if TOPICS_SYSTEM_SUPPORT-        // print topic info+        /* Get info about parent thread.+        * It's needed for topic title printing and for favourites support+        * (when user is allowed to bookmark only threads, not messages).+        */         SMessage parmes;         if(msg->ParentThread != 0 && msg->ParentThread != NO_MESSAGE_CODE) {                 if(!ReadDBMessage(msg->ParentThread, &parmes)) {@@ -2341,10 +2343,10 @@                 memcpy(&parmes, msg, sizeof(SMessage));         }+#if TOPICS_SYSTEM_SUPPORT         if( parmes.Topics >= 0 && parmes.Topics < TOPICS_COUNT)                         printf(DESIGN_VIEW_THREAD_TOPIC, Topics_List[parmes.Topics]);         else printf(DESIGN_VIEW_THREAD_TOPIC, Topics_List[0]);- #endif         char *an_f = FilterBiDi(an);Index: main.cpp===================================================================--- main.cpp    (revision 26)+++ main.cpp    (working copy)@@ -1913,7 +1913,7 @@         cookie_dsm = CONFIGURE_SETTING_DEFAULT_dsm;         cookie_tz = DATETIME_DEFAULT_TIMEZONE;-#if        TOPICS_SYSTEM_SUPPORT+#if TOPICS_SYSTEM_SUPPORT         cookie_topics = CONFIGURE_SETTING_DEFAULT_topics;         topicsoverride = CONFIGURE_SETTING_DEFAULT_toverride; #endif@@ -2050,7 +2050,7 @@                                 free(t);                         }-#if        TOPICS_SYSTEM_SUPPORT+#if TOPICS_SYSTEM_SUPPORT                         // read topics                         if((t = strget(ss, "topics=", 20, '|', 0))) {                                 tmp = strtol(t, &st, 10);@@ -2399,14 +2399,15 @@                 if((st = strget(deal,"index=", 16, '&')) != NULL)                 {                         int entok = 0;-                        if(strcmp(st, "all") == 0) {+                        if(strcmp(st, "rss") == 0){+                                is_xml = 1;+                                currentss = 5;+                        }+#if TOPICS_SYSTEM_SUPPORT+                        else if(strcmp(st, "all") == 0) {                                 topicsoverride = TOPICS_COUNT + 50;                                 entok = 1;                         }-                        else if(strcmp(st, "rss") == 0){-                                is_xml = 1;-                                currentss = 5;-                        }                         else {                                 errno = 0;                                 char *ss;@@ -2420,6 +2421,7 @@                                         entok = 1;                                 }                         }+#endif                         if(entok) {                                 PrintHTMLHeader(HEADERSTRING_REDIRECT_NOW | HEADERSTRING_NO_CACHE_THIS, MAINPAGE_INDEX);                                 goto End_part;@@ -2427,7 +2429,7 @@                 }-#if TOPIC_SYSTEM_SUPPORT+#if TOPICS_SYSTEM_SUPPORT #if STABLE_TITLE == 0                 // add current topic to index title                 if (topicsoverride > 0 && topicsoverride <= TOPICS_COUNT) {@@ -2490,7 +2492,7 @@                         sprintf(displaymode, MESSAGEMAIN_WELCOME_DISPLAYTHREADS, currenttc);                 }-#if        TOPICS_SYSTEM_SUPPORT+#if TOPICS_SYSTEM_SUPPORT                 {                 char tmp[500], sel[50], sel2[50];                 sel[0] = sel2[0] = 0;@@ -2600,10 +2602,14 @@                 DWORD oldct = currenttopics;-                if(topicsoverride) {+#if TOPICS_SYSTEM_SUPPORT+               if(topicsoverride) {                         if(topicsoverride > TOPICS_COUNT) currenttopics = 0xffffffff;        // all                         else currenttopics = (1<<(topicsoverride-1));                 }+#else+               currenttopics = 0xffffffff;+#endif                 DB.DB_PrintHtmlIndex(time(NULL), time(NULL), mtc);                 currenttopics = oldct;@@ -2653,7 +2659,8 @@                                                           MAX_PARAMETERS_STRING, mes.Flag | BOARDTAGS_CUT_TAGS, &xtmp) != 1)                                                 an = mes.MessageHeader;-                                        if (mes.Topics < TOPICS_COUNT && mes.Topics  != 0 ){+#if TOPICS_SYSTEM_SUPPORT+                                       if (mes.Topics < TOPICS_COUNT && mes.Topics  != 0 ){                                                 char *t;                                                 t = (char*)malloc(strlen(an) + strlen(TITLE_divider) + strlen(Topics_List[mes.Topics]) + 4);                                                 *t = 0;@@ -2664,7 +2671,7 @@                                                 free(t);                                         } else                                                 Tittle_cat(an);-+#endif                                         if(an != mes.MessageHeader) free(an); #endif                                         // tmpxx contains vindex of parent message if thread is rolled.@@ -3272,7 +3279,6 @@                                 currenttz = DATETIME_DEFAULT_TIMEZONE;                                 if(par != NULL) {-                                        char *st, *ss; #define READ_PARAM_MASK(param, var, mask) {                             \         char *ss = strget(par, param, 20, '&');                         \@@ -3301,7 +3307,7 @@                                         READ_PARAM_MASK("clr=", currentdsm, CONFIGURE_clr); #define READ_PARAM_NUM(param, var, vardefault) {                        \-       char *ss = strget(par, param, 20, '&');                          \+       char *st, *ss = strget(par, param, 20, '&');                     \        errno = 0;                                                       \        var = vardefault;                                                \        if (ss && *ss) {                                                 \@@ -3344,9 +3350,10 @@                                         if(currenttz < -12 || currenttz > 12)                                                 currenttz = DATETIME_DEFAULT_TIMEZONE;-#if        TOPICS_SYSTEM_SUPPORT+#if TOPICS_SYSTEM_SUPPORT                                         // read topics that should be displayed                                         {+                                               char *ss;                                                 currenttopics = 0;                                                 DWORD i;                                                 for(i = 0; i < TOPICS_COUNT; i++)Index: basetypes.h===================================================================--- basetypes.h (revision 26)+++ basetypes.h (working copy)@@ -82,7 +82,7 @@ /*****************************************************************************/ // topic support-#define TOPICS_SYSTEM_SUPPORT        1+#define TOPICS_SYSTEM_SUPPORT        0 // should we allow posting messages as unregistred when the same registred user exists #define POST_ALLOW_UNDER_SAME_NICK 0