projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f550293
)
if StrBuf_ServGetln() is called in a loop, its return value has to be checked for...
author
Wilfried Goesgens
<dothebart@citadel.org>
Thu, 7 Apr 2011 21:41:53 +0000
(23:41 +0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Thu, 7 Apr 2011 21:41:53 +0000
(23:41 +0200)
15 files changed:
webcit/auth.c
patch
|
blob
|
history
webcit/groupdav_propfind.c
patch
|
blob
|
history
webcit/inetconf.c
patch
|
blob
|
history
webcit/mainmenu.c
patch
|
blob
|
history
webcit/messages.c
patch
|
blob
|
history
webcit/preferences.c
patch
|
blob
|
history
webcit/pushemail.c
patch
|
blob
|
history
webcit/roomlist.c
patch
|
blob
|
history
webcit/serv_func.c
patch
|
blob
|
history
webcit/siteconfig.c
patch
|
blob
|
history
webcit/tcp_sockets.c
patch
|
blob
|
history
webcit/useredit.c
patch
|
blob
|
history
webcit/webcit.c
patch
|
blob
|
history
webcit/who.c
patch
|
blob
|
history
webcit/wiki.c
patch
|
blob
|
history
diff --git
a/webcit/auth.c
b/webcit/auth.c
index 99e11606d04b875fce63a4102db21d74e7d2e68a..d37382f224d8a22c144114e7a5a19a6dff3e35dd 100644
(file)
--- a/
webcit/auth.c
+++ b/
webcit/auth.c
@@
-384,6
+384,7
@@
void finalize_openid_login(void)
long HKLen;
const char *HKey;
HashPos *Cursor;
long HKLen;
const char *HKey;
HashPos *Cursor;
+ int len;
Cursor = GetNewHashPos (WCC->Hdr->urlstrings, 0);
while (GetNextHashPos(WCC->Hdr->urlstrings, Cursor, &HKLen, &HKey, &U)) {
Cursor = GetNewHashPos (WCC->Hdr->urlstrings, 0);
while (GetNextHashPos(WCC->Hdr->urlstrings, Cursor, &HKLen, &HKey, &U)) {
@@
-396,7
+397,9
@@
void finalize_openid_login(void)
serv_puts("000");
linecount = 0;
serv_puts("000");
linecount = 0;
- while (StrBuf_ServGetln(Buf), strcmp(ChrPtr(Buf), "000"))
+ while (len = StrBuf_ServGetln(Buf),
+ ((len >= 0) &&
+ ((len != 3) || strcmp(ChrPtr(Buf), "000") )))
{
if (linecount == 0) result = NewStrBufDup(Buf);
if (!strcasecmp(ChrPtr(result), "authenticate")) {
{
if (linecount == 0) result = NewStrBufDup(Buf);
if (!strcasecmp(ChrPtr(result), "authenticate")) {
diff --git
a/webcit/groupdav_propfind.c
b/webcit/groupdav_propfind.c
index 867cec9ee03f697a617fc88be3372e9ad23253d2..08dd90ad28377867fc10605df5d1b79df2c1c3a2 100644
(file)
--- a/
webcit/groupdav_propfind.c
+++ b/
webcit/groupdav_propfind.c
@@
-682,7
+682,10
@@
void groupdav_propfind(void)
StrBuf_ServGetln(MsgNum);
if (GetServerStatus(MsgNum, NULL) == 1)
StrBuf_ServGetln(MsgNum);
if (GetServerStatus(MsgNum, NULL) == 1)
- while (BufLen = StrBuf_ServGetln(MsgNum), strcmp(ChrPtr(MsgNum), "000")) {
+ while (BufLen = StrBuf_ServGetln(MsgNum),
+ ((BufLen >= 0) &&
+ ((BufLen != 3) || strcmp(ChrPtr(MsgNum), "000")) ))
+ {
msgs = realloc(msgs, ++num_msgs * sizeof(long));
msgs[num_msgs-1] = StrTol(MsgNum);
}
msgs = realloc(msgs, ++num_msgs * sizeof(long));
msgs[num_msgs-1] = StrTol(MsgNum);
}
@@
-694,7
+697,9
@@
void groupdav_propfind(void)
serv_printf("MSG0 %ld|3", msgs[i]);
StrBuf_ServGetln(MsgNum);
if (GetServerStatus(MsgNum, NULL) == 1)
serv_printf("MSG0 %ld|3", msgs[i]);
StrBuf_ServGetln(MsgNum);
if (GetServerStatus(MsgNum, NULL) == 1)
- while (BufLen = StrBuf_ServGetln(MsgNum), strcmp(ChrPtr(MsgNum), "000"))
+ while (BufLen = StrBuf_ServGetln(MsgNum),
+ ((BufLen >= 0) &&
+ ((BufLen != 3) || strcmp(ChrPtr(MsgNum), "000")) ))
{
if (!strncasecmp(ChrPtr(MsgNum), "exti=", 5)) {
strcpy(uid, &ChrPtr(MsgNum)[5]);
{
if (!strncasecmp(ChrPtr(MsgNum), "exti=", 5)) {
strcpy(uid, &ChrPtr(MsgNum)[5]);
diff --git
a/webcit/inetconf.c
b/webcit/inetconf.c
index 269967e4a7f9c243d7184c66fcd6885633f76a3c..9e9a73e7737f1442229eef93c38baa003388a15c 100644
(file)
--- a/
webcit/inetconf.c
+++ b/
webcit/inetconf.c
@@
-69,7
+69,10
@@
void load_inetconf(void)
if (GetServerStatus(Buf, NULL) == 1) {
CfgToken = NewStrBuf();
while ((len = StrBuf_ServGetln(Buf),
if (GetServerStatus(Buf, NULL) == 1) {
CfgToken = NewStrBuf();
while ((len = StrBuf_ServGetln(Buf),
- strcmp(ChrPtr(Buf), "000"))) {
+ ((len >= 0) &&
+ ((len != 3) ||
+ strcmp(ChrPtr(Buf), "000")))))
+ {
Value = NewStrBuf();
StrBufExtract_token(CfgToken, Buf, 1, '|');
Value = NewStrBuf();
StrBufExtract_token(CfgToken, Buf, 1, '|');
diff --git
a/webcit/mainmenu.c
b/webcit/mainmenu.c
index 52aa826fc0ada6a668141ead117c31fb79654a53..5022a0c0318a89cddde7ea0333f13da4ae463e6f 100644
(file)
--- a/
webcit/mainmenu.c
+++ b/
webcit/mainmenu.c
@@
-114,9
+114,10
@@
void do_generic(void)
}
case 1:
while (!Done) {
}
case 1:
while (!Done) {
- StrBuf_ServGetln(Buf);
- if ( (StrLength(Buf)==3) &&
- !strcmp(ChrPtr(Buf), "000")) {
+ if (StrBuf_ServGetln(LineBuf) < 0)
+ break;
+ if ( (StrLength(LineBuf)==3) &&
+ !strcmp(ChrPtr(LineBuf), "000")) {
Done = 1;
}
StrEscAppend(WCC->WBuf, Buf, NULL, 0, 0);
Done = 1;
}
StrEscAppend(WCC->WBuf, Buf, NULL, 0, 0);
diff --git
a/webcit/messages.c
b/webcit/messages.c
index ebe8f61ddacf9c6be8c20436e316d113ea497184..b20186ba0646c72fc4ac6af1935a43919dbe8219 100644
(file)
--- a/
webcit/messages.c
+++ b/
webcit/messages.c
@@
-547,8
+547,10
@@
message_summary *ReadOneMessageSummary(StrBuf *RawMessage, const char *DefaultSu
Msg = (message_summary*)malloc(sizeof(message_summary));
memset(Msg, 0, sizeof(message_summary));
while (len = StrBuf_ServGetln(Buf),
Msg = (message_summary*)malloc(sizeof(message_summary));
memset(Msg, 0, sizeof(message_summary));
while (len = StrBuf_ServGetln(Buf),
+ (len >= 0) &&
((len != 3) ||
((len != 3) ||
- strcmp(ChrPtr(Buf), "000")== 0)){
+ strcmp(ChrPtr(Buf), "000")))
+ {
buf = ChrPtr(Buf);
ebuf = strchr(ChrPtr(Buf), '=');
nBuf = ebuf - buf;
buf = ChrPtr(Buf);
ebuf = strchr(ChrPtr(Buf), '=');
nBuf = ebuf - buf;
@@
-599,7
+601,10
@@
int load_msg_ptrs(const char *servcmd,
return (Stat->nummsgs);
}
Buf2 = NewStrBuf();
return (Stat->nummsgs);
}
Buf2 = NewStrBuf();
- while (len = StrBuf_ServGetln(Buf), ((len != 3) || strcmp(ChrPtr(Buf), "000")!= 0))
+ while (len = StrBuf_ServGetln(Buf),
+ ((len >= 0) &&
+ ((len != 3) ||
+ strcmp(ChrPtr(Buf), "000")!= 0)))
{
if (Stat->nummsgs < Stat->maxload) {
skipit = 0;
{
if (Stat->nummsgs < Stat->maxload) {
skipit = 0;
diff --git
a/webcit/preferences.c
b/webcit/preferences.c
index 379fa6509dec76ee80bd5aaa28faff8f42088389..1007811725f85efe9399b90edcd2cae801c3a1bd 100644
(file)
--- a/
webcit/preferences.c
+++ b/
webcit/preferences.c
@@
-157,7
+157,8
@@
void ParsePref(HashList **List, StrBuf *ReadBuf)
Preference *LastData = NULL;
while (!Done) {
Preference *LastData = NULL;
while (!Done) {
- StrBuf_ServGetln(ReadBuf);
+ if (StrBuf_ServGetln(ReadBuf) < 0)
+ break;
if ( (StrLength(ReadBuf)==3) &&
!strcmp(ChrPtr(ReadBuf), "000")) {
Done = 1;
if ( (StrLength(ReadBuf)==3) &&
!strcmp(ChrPtr(ReadBuf), "000")) {
Done = 1;
@@
-224,7
+225,7
@@
void load_preferences(void)
serv_puts("000");
}
while (!Done &&
serv_puts("000");
}
while (!Done &&
-
StrBuf_ServGetln(ReadBuf
)) {
+
(StrBuf_ServGetln(ReadBuf) >= 0
)) {
if ( (StrLength(ReadBuf)==3) &&
!strcmp(ChrPtr(ReadBuf), "000")) {
Done = 1;
if ( (StrLength(ReadBuf)==3) &&
!strcmp(ChrPtr(ReadBuf), "000")) {
Done = 1;
@@
-237,7
+238,7
@@
void load_preferences(void)
serv_printf("MSG0 %ld", msgnum);
StrBuf_ServGetln(ReadBuf);
if (GetServerStatus(ReadBuf, NULL) == 1) {
serv_printf("MSG0 %ld", msgnum);
StrBuf_ServGetln(ReadBuf);
if (GetServerStatus(ReadBuf, NULL) == 1) {
- while (
StrBuf_ServGetln(ReadBuf),
+ while (
(StrBuf_ServGetln(ReadBuf) >= 0) &&
(strcmp(ChrPtr(ReadBuf), "text") &&
strcmp(ChrPtr(ReadBuf), "000"))) {
}
(strcmp(ChrPtr(ReadBuf), "text") &&
strcmp(ChrPtr(ReadBuf), "000"))) {
}
@@
-378,7
+379,7
@@
void save_preferences(void)
serv_puts("000");
}
while (!Done &&
serv_puts("000");
}
while (!Done &&
-
StrBuf_ServGetln(ReadBuf
)) {
+
(StrBuf_ServGetln(ReadBuf) >= 0
)) {
if ( (StrLength(ReadBuf)==3) &&
!strcmp(ChrPtr(ReadBuf), "000")) {
Done = 1;
if ( (StrLength(ReadBuf)==3) &&
!strcmp(ChrPtr(ReadBuf), "000")) {
Done = 1;
diff --git
a/webcit/pushemail.c
b/webcit/pushemail.c
index 482ee8a58afa60095f81f8ca50be31f24eef45e1..2f59929eb72037a921ba346be619356feb46adfc 100644
(file)
--- a/
webcit/pushemail.c
+++ b/
webcit/pushemail.c
@@
-29,7
+29,7
@@
void display_pushemail(void)
serv_puts("subj|__ Push email settings __");
serv_puts("000");
while (!Done &&
serv_puts("subj|__ Push email settings __");
serv_puts("000");
while (!Done &&
- StrBuf_ServGetln(Buf)) {
+ StrBuf_ServGetln(Buf)
>= 0
) {
if ( (StrLength(Buf)==3) &&
!strcmp(ChrPtr(Buf), "000")) {
Done = 1;
if ( (StrLength(Buf)==3) &&
!strcmp(ChrPtr(Buf), "000")) {
Done = 1;
@@
-45,7
+45,7
@@
void display_pushemail(void)
int i =0;
Done = 0;
while (!Done &&
int i =0;
Done = 0;
while (!Done &&
- StrBuf_ServGetln(Buf)) {
+ StrBuf_ServGetln(Buf)
>= 0
) {
if (( (StrLength(Buf)==3) &&
!strcmp(ChrPtr(Buf), "000"))||
((StrLength(Buf)==4) &&
if (( (StrLength(Buf)==3) &&
!strcmp(ChrPtr(Buf), "000"))||
((StrLength(Buf)==4) &&
@@
-58,7
+58,7
@@
void display_pushemail(void)
if (!strcmp(ChrPtr(Buf), "text")) {
Done = 0;
while (!Done &&
if (!strcmp(ChrPtr(Buf), "text")) {
Done = 0;
while (!Done &&
- StrBuf_ServGetln(Buf)) {
+ StrBuf_ServGetln(Buf)
>= 0
) {
if ( (StrLength(Buf)==3) &&
!strcmp(ChrPtr(Buf), "000")) {
Done = 1;
if ( (StrLength(Buf)==3) &&
!strcmp(ChrPtr(Buf), "000")) {
Done = 1;
@@
-126,7
+126,7
@@
void save_pushemail(void)
}
while (!Done &&
}
while (!Done &&
- StrBuf_ServGetln(Buf)) {
+ StrBuf_ServGetln(Buf)
>= 0
) {
if ( (StrLength(Buf)==3) &&
!strcmp(ChrPtr(Buf), "000")) {
Done = 1;
if ( (StrLength(Buf)==3) &&
!strcmp(ChrPtr(Buf), "000")) {
Done = 1;
diff --git
a/webcit/roomlist.c
b/webcit/roomlist.c
index 928e34adc440e346e1304205d1b5476503e61fc2..078ba6c2ab8c1ae4571def72f4b53322202f42eb 100644
(file)
--- a/
webcit/roomlist.c
+++ b/
webcit/roomlist.c
@@
-64,7
+64,7
@@
HashList *GetFloorListHash(StrBuf *Target, WCTemplputParams *TP)
StrBufTCP_read_line(Buf, &WC->serv_sock, 0, &Err); /* '100', we hope */
if (GetServerStatus(Buf, NULL) == 1)
{
StrBufTCP_read_line(Buf, &WC->serv_sock, 0, &Err); /* '100', we hope */
if (GetServerStatus(Buf, NULL) == 1)
{
- while(!Done && StrBuf_ServGetln(Buf))
+ while(!Done && StrBuf_ServGetln(Buf)
>= 0
)
if ( (StrLength(Buf)==3) &&
!strcmp(ChrPtr(Buf), "000"))
{
if ( (StrLength(Buf)==3) &&
!strcmp(ChrPtr(Buf), "000"))
{
@@
-181,7
+181,7
@@
HashList *GetRoomListHash(StrBuf *Target, WCTemplputParams *TP)
StrBuf_ServGetln(Buf);
if (GetServerStatus(Buf, NULL) == 1)
{
StrBuf_ServGetln(Buf);
if (GetServerStatus(Buf, NULL) == 1)
{
- while(!Done &&
StrBuf_ServGetln(Buf
))
+ while(!Done &&
(StrBuf_ServGetln(Buf) >= 0
))
if ( (StrLength(Buf)==3) &&
!strcmp(ChrPtr(Buf), "000"))
{
if ( (StrLength(Buf)==3) &&
!strcmp(ChrPtr(Buf), "000"))
{
diff --git
a/webcit/serv_func.c
b/webcit/serv_func.c
index 50bf1f771d993d5f306d67fd9ece24090d53562e..f4162a5a0e84ed87dc8ec71bc5bca0d537e84092 100644
(file)
--- a/
webcit/serv_func.c
+++ b/
webcit/serv_func.c
@@
-54,6
+54,7
@@
ServInfo *get_serv_info(StrBuf *browser_host, StrBuf *user_agent)
ServInfo *info;
StrBuf *Buf;
int a;
ServInfo *info;
StrBuf *Buf;
int a;
+ int rc;
Buf = NewStrBuf();
Buf = NewStrBuf();
@@
-100,7
+101,11
@@
ServInfo *get_serv_info(StrBuf *browser_host, StrBuf *user_agent)
info = (ServInfo*)malloc(sizeof(ServInfo));
memset(info, 0, sizeof(ServInfo));
a = 0;
info = (ServInfo*)malloc(sizeof(ServInfo));
memset(info, 0, sizeof(ServInfo));
a = 0;
- while (StrBuf_ServGetln(Buf), (strcmp(ChrPtr(Buf), "000")!= 0)) {
+ while (rc = StrBuf_ServGetln(Buf),
+ (rc >= 0) &&
+ ((rc != 3) ||
+ strcmp(ChrPtr(Buf), "000")))
+ {
switch (a) {
case 0:
info->serv_pid = StrToi(Buf);
switch (a) {
case 0:
info->serv_pid = StrToi(Buf);
diff --git
a/webcit/siteconfig.c
b/webcit/siteconfig.c
index 6a5eea83ba186cf3550e4b70b485c0c6527baa84..4b1fc5ce0a4ad1c8e3990b993f370b505402f3f4 100644
(file)
--- a/
webcit/siteconfig.c
+++ b/
webcit/siteconfig.c
@@
-225,10
+225,10
@@
void load_siteconfig(void)
serv_getln(buf, sizeof buf);
i = 0;
Buf = NewStrBuf();
serv_getln(buf, sizeof buf);
i = 0;
Buf = NewStrBuf();
- while (
(sizeof(ServerConfig) / sizeof(CfgMapping)) &&
- (len
= StrBuf_ServGetln(Buf),
- strcmp(ChrPtr(Buf), "000")) &&
- (
i <= sizeof(ServerConfig)))
+ while (
len = StrBuf_ServGetln(Buf),
+ (len
>= 0) &&
+ (i <= (sizeof(ServerConfig) / sizeof(CfgMapping))) &&
+ (
(len != 3) || strcmp(ChrPtr(Buf), "000")))
{
Put(Cfg,
ServerConfig[i].Key,
{
Put(Cfg,
ServerConfig[i].Key,
diff --git
a/webcit/tcp_sockets.c
b/webcit/tcp_sockets.c
index e783feb7fca0ca5f9643b581a92bee5d1ad0c381..6bbef24fb5fb7459fb001af957229c48bb3a6757 100644
(file)
--- a/
webcit/tcp_sockets.c
+++ b/
webcit/tcp_sockets.c
@@
-333,7
+333,10
@@
int serv_read_binary(StrBuf *Ret, size_t total_len, StrBuf *Buf)
}
serv_printf("READ %d|%d", bytes_read, total_len-bytes_read);
}
serv_printf("READ %d|%d", bytes_read, total_len-bytes_read);
- if ( (StrBuf_ServGetln(Buf) > 0) && (GetServerStatus(Buf, NULL) == 6) ) {
+ if ( (rc = StrBuf_ServGetln(Buf) > 0) && (GetServerStatus(Buf, NULL) == 6) )
+ {
+ if (rc < 0)
+ return rc;
StrBufCutLeft(Buf, 4);
this_block = StrTol(Buf);
rc = StrBuf_ServGetBLOBBuffered(Ret, this_block);
StrBufCutLeft(Buf, 4);
this_block = StrTol(Buf);
rc = StrBuf_ServGetBLOBBuffered(Ret, this_block);
diff --git
a/webcit/useredit.c
b/webcit/useredit.c
index 85e55f43a988491d94886e2bc5b757d2703358a2..a95670a8024da8946eddcdae3a167a26c176be67 100644
(file)
--- a/
webcit/useredit.c
+++ b/
webcit/useredit.c
@@
-272,8
+272,10
@@
HashList *iterate_load_userlist(StrBuf *Target, WCTemplputParams *TP)
while (!Done) {
len = StrBuf_ServGetln(Buf);
while (!Done) {
len = StrBuf_ServGetln(Buf);
- if ((len == 3) &&
- (strcmp(ChrPtr(Buf), "000")==0)) {
+ if ((len <0) ||
+ ((len == 3) &&
+ strcmp(ChrPtr(Buf), "000")))
+ {
Done = 1;
break;
}
Done = 1;
break;
}
diff --git
a/webcit/webcit.c
b/webcit/webcit.c
index 251c7df9a74422f98d62295a6e5d4269c8cc7228..9de1ad242289209df0864d5fbb24f95e3ce8c0fb 100644
(file)
--- a/
webcit/webcit.c
+++ b/
webcit/webcit.c
@@
-407,7
+407,8
@@
void ajax_servcmd(void)
}
case 1:
while (!Done) {
}
case 1:
while (!Done) {
- StrBuf_ServGetln(Buf);
+ if (StrBuf_ServGetln(Buf) < 0)
+ break;
if ( (StrLength(Buf)==3) &&
!strcmp(ChrPtr(Buf), "000")) {
Done = 1;
if ( (StrLength(Buf)==3) &&
!strcmp(ChrPtr(Buf), "000")) {
Done = 1;
diff --git
a/webcit/who.c
b/webcit/who.c
index 692481e382dfec128f8850925dc73c0776dc9e27..8904325878763a5c5073e5a1431da1f83601b992 100644
(file)
--- a/
webcit/who.c
+++ b/
webcit/who.c
@@
-51,7
+51,10
@@
int GetWholistSection(HashList *List, time_t now, StrBuf *Buf)
serv_puts("RWHO");
StrBuf_ServGetln(Buf);
if (GetServerStatus(Buf, NULL) == 1) {
serv_puts("RWHO");
StrBuf_ServGetln(Buf);
if (GetServerStatus(Buf, NULL) == 1) {
- while (BufLen = StrBuf_ServGetln(Buf), strcmp(ChrPtr(Buf), "000")) {
+ while (BufLen = StrBuf_ServGetln(Buf),
+ ((BufLen >= 0) &&
+ ((BufLen != 3) || strcmp(ChrPtr(Buf), "000"))))
+ {
if (BufLen <= 0)
continue;
Pos = NULL;
if (BufLen <= 0)
continue;
Pos = NULL;
diff --git
a/webcit/wiki.c
b/webcit/wiki.c
index 2b0ba7f888eb905a6d5e19a63e8a7f928d86748b..627424fe5d9547be112043e51370b9f5ce1c078f 100644
(file)
--- a/
webcit/wiki.c
+++ b/
webcit/wiki.c
@@
-169,7
+169,7
@@
void tmplput_display_wiki_history(StrBuf *Target, WCTemplputParams *TP)
wc_printf("<th>%s</th>", _("Date"));
wc_printf("<th>%s</th>", _("Author"));
wc_printf("<th>%s</th>", _("Date"));
wc_printf("<th>%s</th>", _("Author"));
- while(
StrBuf_ServGetln(Buf),
strcmp(ChrPtr(Buf), "000")) {
+ while(
(StrBuf_ServGetln(Buf) >= 0) &&
strcmp(ChrPtr(Buf), "000")) {
rev_date = extract_long(ChrPtr(Buf), 1);
webcit_fmt_date(rev_date_displayed, sizeof rev_date_displayed, rev_date, DATEFMT_FULL);
rev_date = extract_long(ChrPtr(Buf), 1);
webcit_fmt_date(rev_date_displayed, sizeof rev_date_displayed, rev_date, DATEFMT_FULL);
@@
-290,7
+290,7
@@
void tmplput_display_wiki_pagelist(StrBuf *Target, WCTemplputParams *TP)
wc_printf("<th>%s</th>", _("Page title"));
wc_printf("<th>%s</th>", _("Page title"));
- while(
StrBuf_ServGetln(Buf),
strcmp(ChrPtr(Buf), "000")) {
+ while(
(StrBuf_ServGetln(Buf) >= 0) &&
strcmp(ChrPtr(Buf), "000")) {
StrBufExtract_token(pagetitle, Buf, 1, '|');
if (!bmstrcasestr((char *)ChrPtr(pagetitle), "_HISTORY_")) { /* no history pages */
StrBufExtract_token(pagetitle, Buf, 1, '|');
if (!bmstrcasestr((char *)ChrPtr(pagetitle), "_HISTORY_")) { /* no history pages */