mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-12 19:33:03 +00:00
Fixed problems with find
SVN revision: 147
This commit is contained in:
parent
85db13a97c
commit
3552ab17e6
142
elogd.c
142
elogd.c
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 2.27 2002/06/20 09:19:10 midas
|
||||||
|
Fixed problems with find
|
||||||
|
|
||||||
Revision 2.26 2002/06/19 10:58:57 midas
|
Revision 2.26 2002/06/19 10:58:57 midas
|
||||||
Fixed bug that 'date format = %A...' always produced 'Sunday'
|
Fixed bug that 'date format = %A...' always produced 'Sunday'
|
||||||
|
|
||||||
@ -384,6 +387,7 @@ typedef struct {
|
|||||||
char file_name[32];
|
char file_name[32];
|
||||||
time_t file_time;
|
time_t file_time;
|
||||||
int offset;
|
int offset;
|
||||||
|
BOOL thread_head;
|
||||||
} EL_INDEX;
|
} EL_INDEX;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -1398,7 +1402,8 @@ int eli_compare(const void *e1, const void *e2)
|
|||||||
int el_build_index(LOGBOOK *lbs)
|
int el_build_index(LOGBOOK *lbs)
|
||||||
/* scan all ??????a.log files and build an index table in eli[] */
|
/* scan all ??????a.log files and build an index table in eli[] */
|
||||||
{
|
{
|
||||||
char *file_list, str[256], date[256], dir[256], file_name[256], *buffer, *p;
|
char *file_list, str[256], date[256], dir[256], file_name[256], *buffer, *p,
|
||||||
|
in_reply_to[80];
|
||||||
int index, n, length;
|
int index, n, length;
|
||||||
int i, fh;
|
int i, fh;
|
||||||
time_t ltime;
|
time_t ltime;
|
||||||
@ -1473,6 +1478,7 @@ struct tm tms;
|
|||||||
strcpy(lbs->el_index[lbs->n_el_index].file_name, str);
|
strcpy(lbs->el_index[lbs->n_el_index].file_name, str);
|
||||||
|
|
||||||
el_decode(p, "Date: ", date);
|
el_decode(p, "Date: ", date);
|
||||||
|
el_decode(p, "In reply to: ", in_reply_to);
|
||||||
|
|
||||||
memset(&tms, 0, sizeof(struct tm));
|
memset(&tms, 0, sizeof(struct tm));
|
||||||
|
|
||||||
@ -1481,11 +1487,12 @@ struct tm tms;
|
|||||||
break;
|
break;
|
||||||
tms.tm_mon = i;
|
tms.tm_mon = i;
|
||||||
|
|
||||||
tms.tm_mday = atoi(date+8);
|
tms.tm_mday = atoi(date+8);
|
||||||
tms.tm_hour = atoi(date+11);
|
tms.tm_hour = atoi(date+11);
|
||||||
tms.tm_min = atoi(date+14);
|
tms.tm_min = atoi(date+14);
|
||||||
tms.tm_sec = atoi(date+17);
|
tms.tm_sec = atoi(date+17);
|
||||||
tms.tm_year = atoi(date+20)-1900;
|
tms.tm_year = atoi(date+20)-1900;
|
||||||
|
tms.tm_isdst = -1;
|
||||||
|
|
||||||
if (tms.tm_year < 90)
|
if (tms.tm_year < 90)
|
||||||
tms.tm_year += 100;
|
tms.tm_year += 100;
|
||||||
@ -1495,13 +1502,15 @@ struct tm tms;
|
|||||||
|
|
||||||
lbs->el_index[lbs->n_el_index].message_id = atoi(p+8);
|
lbs->el_index[lbs->n_el_index].message_id = atoi(p+8);
|
||||||
lbs->el_index[lbs->n_el_index].offset = (int) p - (int) buffer;
|
lbs->el_index[lbs->n_el_index].offset = (int) p - (int) buffer;
|
||||||
|
lbs->el_index[lbs->n_el_index].thread_head = (in_reply_to[0] == 0);
|
||||||
|
|
||||||
if (lbs->el_index[lbs->n_el_index].message_id > 0)
|
if (lbs->el_index[lbs->n_el_index].message_id > 0)
|
||||||
{
|
{
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf(" ID %d in %s, offset %d\n",
|
printf(" ID %3d in %s, offset %5d, %s\n",
|
||||||
lbs->el_index[lbs->n_el_index].message_id, str,
|
lbs->el_index[lbs->n_el_index].message_id, str,
|
||||||
lbs->el_index[lbs->n_el_index].offset);
|
lbs->el_index[lbs->n_el_index].offset,
|
||||||
|
lbs->el_index[lbs->n_el_index].thread_head ? "thread head" : "reply");
|
||||||
|
|
||||||
/* valid ID */
|
/* valid ID */
|
||||||
lbs->n_el_index++;
|
lbs->n_el_index++;
|
||||||
@ -1526,7 +1535,7 @@ struct tm tms;
|
|||||||
{
|
{
|
||||||
printf("After sort:\n");
|
printf("After sort:\n");
|
||||||
for (i=0 ; i<lbs->n_el_index ; i++)
|
for (i=0 ; i<lbs->n_el_index ; i++)
|
||||||
printf(" ID %d in %s, offset %d\n",
|
printf(" ID %3d in %s, offset %5d\n",
|
||||||
lbs->el_index[i].message_id, lbs->el_index[i].file_name,
|
lbs->el_index[i].message_id, lbs->el_index[i].file_name,
|
||||||
lbs->el_index[i].offset);
|
lbs->el_index[i].offset);
|
||||||
}
|
}
|
||||||
@ -1536,7 +1545,7 @@ struct tm tms;
|
|||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
|
|
||||||
int el_search_message(LOGBOOK *lbs, int mode, int message_id)
|
int el_search_message(LOGBOOK *lbs, int mode, int message_id, BOOL head_only)
|
||||||
/********************************************************************\
|
/********************************************************************\
|
||||||
|
|
||||||
Routine: el_search_message
|
Routine: el_search_message
|
||||||
@ -1558,10 +1567,30 @@ int i;
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (mode == EL_FIRST)
|
if (mode == EL_FIRST)
|
||||||
|
{
|
||||||
|
if (head_only)
|
||||||
|
{
|
||||||
|
for (i=0 ; i<lbs->n_el_index ; i++)
|
||||||
|
if (lbs->el_index[i].thread_head)
|
||||||
|
return lbs->el_index[i].message_id;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return lbs->el_index[0].message_id;
|
return lbs->el_index[0].message_id;
|
||||||
|
}
|
||||||
|
|
||||||
if (mode == EL_LAST)
|
if (mode == EL_LAST)
|
||||||
|
{
|
||||||
|
if (head_only)
|
||||||
|
{
|
||||||
|
for (i=lbs->n_el_index-1 ; i>0 ; i--)
|
||||||
|
if (lbs->el_index[i].thread_head)
|
||||||
|
return lbs->el_index[i].message_id;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return lbs->el_index[lbs->n_el_index-1].message_id;
|
return lbs->el_index[lbs->n_el_index-1].message_id;
|
||||||
|
}
|
||||||
|
|
||||||
if (mode == EL_NEXT)
|
if (mode == EL_NEXT)
|
||||||
{
|
{
|
||||||
@ -1575,6 +1604,15 @@ int i;
|
|||||||
if (i == lbs->n_el_index-1)
|
if (i == lbs->n_el_index-1)
|
||||||
return 0; // last message
|
return 0; // last message
|
||||||
|
|
||||||
|
if (head_only)
|
||||||
|
{
|
||||||
|
for (i++ ; i<lbs->n_el_index ; i++)
|
||||||
|
if (lbs->el_index[i].thread_head)
|
||||||
|
return lbs->el_index[i].message_id;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return lbs->el_index[i+1].message_id;
|
return lbs->el_index[i+1].message_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1590,6 +1628,15 @@ int i;
|
|||||||
if (i == 0)
|
if (i == 0)
|
||||||
return 0; // first message
|
return 0; // first message
|
||||||
|
|
||||||
|
if (head_only)
|
||||||
|
{
|
||||||
|
for (i-- ; i>0 ; i--)
|
||||||
|
if (lbs->el_index[i].thread_head)
|
||||||
|
return lbs->el_index[i].message_id;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return lbs->el_index[i-1].message_id;
|
return lbs->el_index[i-1].message_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1643,7 +1690,7 @@ char message[TEXT_SIZE+1000], attachment_all[64*MAX_ATTACHMENTS];
|
|||||||
|
|
||||||
if (message_id == 0)
|
if (message_id == 0)
|
||||||
/* open most recent message */
|
/* open most recent message */
|
||||||
message_id = el_search_message(lbs, EL_LAST, 0);
|
message_id = el_search_message(lbs, EL_LAST, 0, FALSE);
|
||||||
|
|
||||||
if (message_id == 0)
|
if (message_id == 0)
|
||||||
return EL_EMPTY;
|
return EL_EMPTY;
|
||||||
@ -2027,6 +2074,7 @@ BOOL bedit;
|
|||||||
strcpy(lbs->el_index[lbs->n_el_index-1].file_name, file_name);
|
strcpy(lbs->el_index[lbs->n_el_index-1].file_name, file_name);
|
||||||
lbs->el_index[lbs->n_el_index-1].file_time = ltime;
|
lbs->el_index[lbs->n_el_index-1].file_time = ltime;
|
||||||
lbs->el_index[lbs->n_el_index-1].offset = TELL(fh);
|
lbs->el_index[lbs->n_el_index-1].offset = TELL(fh);
|
||||||
|
lbs->el_index[lbs->n_el_index-1].thread_head = (in_reply_to[0] == 0);
|
||||||
|
|
||||||
/* if index not ordered, sort it */
|
/* if index not ordered, sort it */
|
||||||
i = lbs->n_el_index;
|
i = lbs->n_el_index;
|
||||||
@ -3534,7 +3582,7 @@ char str[80], date[80], attrib[MAX_N_ATTR][NAME_LENGTH],
|
|||||||
|
|
||||||
str[0] = 0;
|
str[0] = 0;
|
||||||
n_attr = scan_attributes(lbs->name);
|
n_attr = scan_attributes(lbs->name);
|
||||||
message_id = el_search_message(lbs, EL_LAST, 0);
|
message_id = el_search_message(lbs, EL_LAST, 0, FALSE);
|
||||||
|
|
||||||
el_retrieve(lbs, message_id, date, attr_list, attrib, n_attr,
|
el_retrieve(lbs, message_id, date, attr_list, attrib, n_attr,
|
||||||
NULL, 0, in_reply_to, reply_to, att, encoding);
|
NULL, 0, in_reply_to, reply_to, att, encoding);
|
||||||
@ -3639,9 +3687,13 @@ time_t now;
|
|||||||
sprintf(str, "Subst on reply %s", attr_list[index]);
|
sprintf(str, "Subst on reply %s", attr_list[index]);
|
||||||
if (getcfg(lbs->name, str, preset))
|
if (getcfg(lbs->name, str, preset))
|
||||||
{
|
{
|
||||||
i = build_subst_list(lbs, slist, svalue, attrib);
|
/* check if already second reply */
|
||||||
strsubst(preset, slist, svalue, i);
|
if (orig_tag[0] == 0)
|
||||||
strcpy(attrib[index], preset);
|
{
|
||||||
|
i = build_subst_list(lbs, slist, svalue, attrib);
|
||||||
|
strsubst(preset, slist, svalue, i);
|
||||||
|
strcpy(attrib[index], preset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5017,20 +5069,25 @@ FILE *f;
|
|||||||
void display_reply(LOGBOOK *lbs, int message_id, int printable, int n_attr_disp,
|
void display_reply(LOGBOOK *lbs, int message_id, int printable, int n_attr_disp,
|
||||||
char disp_attr[MAX_N_ATTR+4][NAME_LENGTH], int level)
|
char disp_attr[MAX_N_ATTR+4][NAME_LENGTH], int level)
|
||||||
{
|
{
|
||||||
char date[80], attrib[MAX_N_ATTR][NAME_LENGTH], text[TEXT_SIZE],
|
char date[80], *text, in_reply_to[80], reply_to[256], encoding[80],
|
||||||
in_reply_to[80], reply_to[256], attachment[MAX_ATTACHMENTS][256], encoding[80];
|
attachment[MAX_ATTACHMENTS][NAME_LENGTH], attrib[MAX_N_ATTR][NAME_LENGTH];
|
||||||
int status, n_attr, size;
|
int status, n_attr, size;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
|
text = malloc(TEXT_SIZE);
|
||||||
|
|
||||||
n_attr = scan_attributes(lbs->name);
|
n_attr = scan_attributes(lbs->name);
|
||||||
reply_to[0] = 0;
|
reply_to[0] = 0;
|
||||||
size = sizeof(text);
|
size = TEXT_SIZE;
|
||||||
status = el_retrieve(lbs, message_id, date, attr_list, attrib, n_attr,
|
status = el_retrieve(lbs, message_id, date, attr_list, attrib, n_attr,
|
||||||
text, &size, in_reply_to, reply_to,
|
text, &size, in_reply_to, reply_to,
|
||||||
attachment, encoding);
|
attachment, encoding);
|
||||||
|
|
||||||
if (status != EL_SUCCESS)
|
if (status != EL_SUCCESS)
|
||||||
|
{
|
||||||
|
free(text);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
display_line(lbs, message_id, 0, "threaded", level, printable, 0,
|
display_line(lbs, message_id, 0, "threaded", level, printable, 0,
|
||||||
FALSE, date, reply_to, n_attr_disp, disp_attr,
|
FALSE, date, reply_to, n_attr_disp, disp_attr,
|
||||||
@ -5049,6 +5106,8 @@ char *p;
|
|||||||
p++;
|
p++;
|
||||||
} while(*p);
|
} while(*p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
@ -5065,7 +5124,7 @@ char str[256], col[80];
|
|||||||
char mode[80];
|
char mode[80];
|
||||||
char menu_str[1000], menu_item[MAX_N_LIST][NAME_LENGTH];
|
char menu_str[1000], menu_item[MAX_N_LIST][NAME_LENGTH];
|
||||||
char *p , *pt, *pt1, *pt2;
|
char *p , *pt, *pt1, *pt2;
|
||||||
BOOL show_attachments;
|
BOOL show_attachments, threaded, only_message_heads;
|
||||||
time_t ltime, ltime_start, ltime_end, ltime_current, now;
|
time_t ltime, ltime_start, ltime_end, ltime_current, now;
|
||||||
struct tm tms, *ptms;
|
struct tm tms, *ptms;
|
||||||
|
|
||||||
@ -5117,6 +5176,9 @@ struct tm tms, *ptms;
|
|||||||
show_attachments = (*getparam("attach") > 0);
|
show_attachments = (*getparam("attach") > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
threaded = equal_ustring(mode, "threaded");
|
||||||
|
only_message_heads = threaded;
|
||||||
|
|
||||||
time(&now);
|
time(&now);
|
||||||
ptms = localtime(&now);
|
ptms = localtime(&now);
|
||||||
current_year = ptms->tm_year+1900;
|
current_year = ptms->tm_year+1900;
|
||||||
@ -5458,7 +5520,7 @@ struct tm tms, *ptms;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (equal_ustring(mode, "threaded"))
|
if (threaded)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -5520,7 +5582,7 @@ struct tm tms, *ptms;
|
|||||||
{
|
{
|
||||||
if (reverse)
|
if (reverse)
|
||||||
{
|
{
|
||||||
message_id = el_search_message(lbs, EL_LAST, 0);
|
message_id = el_search_message(lbs, EL_LAST, 0, threaded);
|
||||||
|
|
||||||
time(&now);
|
time(&now);
|
||||||
ltime_start = now-3600*24*past_n;
|
ltime_start = now-3600*24*past_n;
|
||||||
@ -5541,14 +5603,14 @@ struct tm tms, *ptms;
|
|||||||
}
|
}
|
||||||
else if (last_n)
|
else if (last_n)
|
||||||
{
|
{
|
||||||
message_id = el_search_message(lbs, EL_LAST, 0);
|
message_id = el_search_message(lbs, EL_LAST, 0, threaded);
|
||||||
|
|
||||||
if (!reverse)
|
if (!reverse)
|
||||||
{
|
{
|
||||||
for (i=1 ; i<last_n ; i++)
|
for (i=1 ; i<last_n ; i++)
|
||||||
message_id = el_search_message(lbs, EL_PREV, message_id);
|
message_id = el_search_message(lbs, EL_PREV, message_id, threaded);
|
||||||
if (message_id == 0)
|
if (message_id == 0)
|
||||||
message_id = el_search_message(lbs, EL_FIRST, 0);
|
message_id = el_search_message(lbs, EL_FIRST, 0, threaded);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -5560,7 +5622,7 @@ struct tm tms, *ptms;
|
|||||||
if (!*getparam("y2") && !*getparam("m2") && !*getparam("d2"))
|
if (!*getparam("y2") && !*getparam("m2") && !*getparam("d2"))
|
||||||
{
|
{
|
||||||
/* search last message */
|
/* search last message */
|
||||||
message_id = el_search_message(lbs, EL_LAST, 0);
|
message_id = el_search_message(lbs, EL_LAST, 0, threaded);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -5578,7 +5640,7 @@ struct tm tms, *ptms;
|
|||||||
if (!*getparam("y1") && !*getparam("m1") && !*getparam("d1"))
|
if (!*getparam("y1") && !*getparam("m1") && !*getparam("d1"))
|
||||||
{
|
{
|
||||||
/* search first message */
|
/* search first message */
|
||||||
message_id = el_search_message(lbs, EL_FIRST, 0);
|
message_id = el_search_message(lbs, EL_FIRST, 0, threaded);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -5641,6 +5703,7 @@ struct tm tms, *ptms;
|
|||||||
{
|
{
|
||||||
if (*getparam(attr_list[i]))
|
if (*getparam(attr_list[i]))
|
||||||
{
|
{
|
||||||
|
only_message_heads = FALSE;
|
||||||
strcpy(str, getparam(attr_list[i]));
|
strcpy(str, getparam(attr_list[i]));
|
||||||
for (j=0 ; j<(int)strlen(str) ; j++)
|
for (j=0 ; j<(int)strlen(str) ; j++)
|
||||||
str[j] = toupper(str[j]);
|
str[j] = toupper(str[j]);
|
||||||
@ -5658,6 +5721,7 @@ struct tm tms, *ptms;
|
|||||||
|
|
||||||
if (*getparam("subtext"))
|
if (*getparam("subtext"))
|
||||||
{
|
{
|
||||||
|
only_message_heads = FALSE;
|
||||||
strcpy(str, getparam("subtext"));
|
strcpy(str, getparam("subtext"));
|
||||||
for (i=0 ; i<(int)strlen(str) ; i++)
|
for (i=0 ; i<(int)strlen(str) ; i++)
|
||||||
str[i] = toupper(str[i]);
|
str[i] = toupper(str[i]);
|
||||||
@ -5717,7 +5781,7 @@ struct tm tms, *ptms;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* check if reply */
|
/* check if reply */
|
||||||
if (equal_ustring(mode, "threaded") && in_reply_to[0])
|
if (only_message_heads && in_reply_to[0])
|
||||||
goto skip;
|
goto skip;
|
||||||
|
|
||||||
/*---- filter passed: display line ----*/
|
/*---- filter passed: display line ----*/
|
||||||
@ -5728,7 +5792,7 @@ struct tm tms, *ptms;
|
|||||||
show_attachments, date, reply_to, n_attr_disp, disp_attr,
|
show_attachments, date, reply_to, n_attr_disp, disp_attr,
|
||||||
attrib, n_attr, text, attachment, encoding);
|
attrib, n_attr, text, attachment, encoding);
|
||||||
|
|
||||||
if (equal_ustring(mode, "threaded"))
|
if (threaded)
|
||||||
{
|
{
|
||||||
if (reply_to[0] && (!getcfg(lbs->name, "Top level only", str) || atoi(str) == 0))
|
if (reply_to[0] && (!getcfg(lbs->name, "Top level only", str) || atoi(str) == 0))
|
||||||
{
|
{
|
||||||
@ -5753,9 +5817,9 @@ struct tm tms, *ptms;
|
|||||||
skip:
|
skip:
|
||||||
/* get index of next message */
|
/* get index of next message */
|
||||||
if (reverse)
|
if (reverse)
|
||||||
message_id = el_search_message(lbs, EL_PREV, message_id);
|
message_id = el_search_message(lbs, EL_PREV, message_id, only_message_heads);
|
||||||
else
|
else
|
||||||
message_id = el_search_message(lbs, EL_NEXT, message_id);
|
message_id = el_search_message(lbs, EL_NEXT, message_id, only_message_heads);
|
||||||
|
|
||||||
} while (message_id);
|
} while (message_id);
|
||||||
} /* for () */
|
} /* for () */
|
||||||
@ -6205,11 +6269,11 @@ LOGBOOK *lbs_dest;
|
|||||||
el_delete_message(lbs, src_id, TRUE, NULL, TRUE);
|
el_delete_message(lbs, src_id, TRUE, NULL, TRUE);
|
||||||
|
|
||||||
/* check if this was the last message */
|
/* check if this was the last message */
|
||||||
src_id = el_search_message(lbs, EL_NEXT, src_id);
|
src_id = el_search_message(lbs, EL_NEXT, src_id, FALSE);
|
||||||
|
|
||||||
/* if yes, force display of new last message */
|
/* if yes, force display of new last message */
|
||||||
if (src_id <= 0)
|
if (src_id <= 0)
|
||||||
src_id = el_search_message(lbs, EL_LAST, 0);
|
src_id = el_search_message(lbs, EL_LAST, 0, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* display status message */
|
/* display status message */
|
||||||
@ -6539,10 +6603,10 @@ BOOL first;
|
|||||||
orig_message_id = message_id;
|
orig_message_id = message_id;
|
||||||
|
|
||||||
if (equal_ustring(command, loc("Last")))
|
if (equal_ustring(command, loc("Last")))
|
||||||
message_id = el_search_message(lbs, EL_LAST, 0);
|
message_id = el_search_message(lbs, EL_LAST, 0, FALSE);
|
||||||
|
|
||||||
if (equal_ustring(command, loc("First")))
|
if (equal_ustring(command, loc("First")))
|
||||||
message_id = el_search_message(lbs, EL_FIRST, 0);
|
message_id = el_search_message(lbs, EL_FIRST, 0, FALSE);
|
||||||
|
|
||||||
if (!message_id)
|
if (!message_id)
|
||||||
{
|
{
|
||||||
@ -6554,19 +6618,19 @@ BOOL first;
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (equal_ustring(command, loc("Next")))
|
if (equal_ustring(command, loc("Next")))
|
||||||
message_id = el_search_message(lbs, EL_NEXT, message_id);
|
message_id = el_search_message(lbs, EL_NEXT, message_id, FALSE);
|
||||||
|
|
||||||
if (equal_ustring(command, loc("Previous")))
|
if (equal_ustring(command, loc("Previous")))
|
||||||
message_id = el_search_message(lbs, EL_PREV, message_id);
|
message_id = el_search_message(lbs, EL_PREV, message_id, FALSE);
|
||||||
|
|
||||||
if (!first)
|
if (!first)
|
||||||
{
|
{
|
||||||
if (equal_ustring(command, loc("First")))
|
if (equal_ustring(command, loc("First")))
|
||||||
message_id = el_search_message(lbs, EL_NEXT, message_id);
|
message_id = el_search_message(lbs, EL_NEXT, message_id, FALSE);
|
||||||
|
|
||||||
|
|
||||||
if (equal_ustring(command, loc("Last")))
|
if (equal_ustring(command, loc("Last")))
|
||||||
message_id = el_search_message(lbs, EL_PREV, message_id);
|
message_id = el_search_message(lbs, EL_PREV, message_id, FALSE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
first = FALSE;
|
first = FALSE;
|
||||||
@ -6659,7 +6723,7 @@ BOOL first;
|
|||||||
/*---- get current message ---------------------------------------*/
|
/*---- get current message ---------------------------------------*/
|
||||||
|
|
||||||
if (message_id == 0)
|
if (message_id == 0)
|
||||||
message_id = el_search_message(lbs, EL_LAST, 0);
|
message_id = el_search_message(lbs, EL_LAST, 0, FALSE);
|
||||||
|
|
||||||
if (message_id)
|
if (message_id)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user