/*
* Text description of this software
*/
-#define CITADEL "Citadel 6.52"
+#define CITADEL "Citadel 6.53"
/*
* REV_LEVEL is the current version number (multiplied by 100 to avoid having
* usually more strict because you're not really supposed to dump/load and
* upgrade at the same time.
*/
-#define REV_LEVEL 652 /* This version */
+#define REV_LEVEL 653 /* This version */
#define REV_MIN 591 /* Oldest compatible database */
#define EXPORT_REV_MIN 652 /* Oldest compatible export files */
!include "${NSISDIR}\Contrib\Modern UI\System.nsh"
!define MUI_PRODUCT "Citadel"
-!define MUI_VERSION "6.52"
+!define MUI_VERSION "6.53"
!define MUI_WELCOMEPAGE
!define MUI_LICENSEPAGE
!define MUI_COMPONENTSPAGE
;!define MUI_ICON "${NSISDIR}\Contrib\Icons\modern-install.ico"
;!define MUI_UNICON "${NSISDIR}\Contrib\Icons\modern-uninstall.ico"
-OutFile "citadel-6.52.exe"
+OutFile "citadel-6.53.exe"
BGGradient off
LangString DESC_Citadel ${LANG_ENGLISH} "Citadel client and core libraries (required)"
struct cdbdata *cdbfr;
int i, j;
int is_seen = 0;
- int was_seen = 1;
+ int was_seen = 0;
long lo = (-1L);
long hi = (-1L);
long t = (-1L);
int num_sets;
int s;
char setstr[SIZ], lostr[SIZ], histr[SIZ];
+ size_t tmp;
lprintf(CTDL_DEBUG, "CtdlSetSeen(%ld, %d, %d)\n",
target_msgnum, target_setting, which_set);
break;
}
- lprintf(CTDL_DEBUG, "before optimize: %s\n", vset);
+ /* lprintf(CTDL_DEBUG, "before optimize: %s\n", vset); */
/* Translate the existing sequence set into an array of booleans */
num_sets = num_tokens(vset, ',');
/* Now translate the array of booleans back into a sequence set */
strcpy(vset, "");
+ lo = (-1L);
+ hi = (-1L);
for (i=0; i<num_msgs; ++i) {
is_seen = 0;
is_seen = target_setting;
}
else {
- if (is_set[i]) {
- is_seen = 1;
- }
+ is_seen = is_set[i];
}
- if (is_seen == 1) {
+ if (is_seen) {
if (lo < 0L) lo = msglist[i];
hi = msglist[i];
}
+
if ( ((is_seen == 0) && (was_seen == 1))
|| ((is_seen == 1) && (i == num_msgs-1)) ) {
- size_t tmp;
+ /* begin trim-o-matic code */
j=9;
trimming = 0;
while ( (strlen(vset) + 20) > sizeof vset) {
"1:%ld,%s", t, vset);
safestrncpy(vset, lostr, sizeof vset);
}
+ /* end trim-o-matic code */
+
tmp = strlen(vset);
if (tmp > 0) {
strcat(vset, ",");
- tmp++;
+ ++tmp;
}
if (lo == hi) {
- snprintf(&vset[tmp], sizeof vset - tmp,
+ snprintf(&vset[tmp], (sizeof vset) - tmp,
"%ld", lo);
}
else {
- snprintf(&vset[tmp], sizeof vset - tmp,
+ snprintf(&vset[tmp], (sizeof vset) - tmp,
"%ld:%ld", lo, hi);
}
lo = (-1L);
}
free(is_set);
- lprintf(CTDL_DEBUG, " after optimize: %s\n", vset);
+ /* lprintf(CTDL_DEBUG, " after optimize: %s\n", vset); */
free(msglist);
CtdlSetRelationship(&vbuf,
((which_user != NULL) ? which_user : &CC->user),