DeleteHashPos(&At);
}
+void load_seen_flags(void)
+{
+ message_summary *Msg;
+ const char *HashKey;
+ long HKLen;
+ StrBuf *OldMsg = NewStrBuf();;
+ wcsession *WCC = WC;
+ HashPos *at;
+ void *vMsg;
+
+ serv_puts("GTSN");
+ StrBuf_ServGetln(OldMsg);
+ if (ChrPtr(OldMsg)[0] == '2') {
+ StrBufCutLeft(OldMsg, 4);
+ }
+ else {
+ FreeStrBuf(&OldMsg);
+ return;
+ }
+ at = GetNewHashPos(WCC->summ, 0);
+ while (GetNextHashPos(WCC->summ, at, &HKLen, &HashKey, &vMsg)) {
+ /** Are you a new message, or an old message? */
+ Msg = (message_summary*) vMsg;
+ if (is_msg_in_mset(ChrPtr(OldMsg), Msg->msgnum)) {
+ Msg->is_new = 0;
+ }
+ else {
+ Msg->is_new = 1;
+ }
+ }
+ FreeStrBuf(&OldMsg);
+ DeleteHashPos(&at);
+}
extern readloop_struct rlid[];
message_summary *Msg;
char cmd[256] = "";
char buf[SIZ];
- char old_msgs[SIZ];
int a = 0;
int nummsgs;
long startmsg = 0;
}
}
- /* This is done to make it run faster; WC is a function */
- if (load_seen){
- void *vMsg;
-
- strcpy(old_msgs, "");
- serv_puts("GTSN");
- serv_getln(buf, sizeof buf);
- if (buf[0] == '2') {
- strcpy(old_msgs, &buf[4]);
- }
- at = GetNewHashPos(WCC->summ, 0);
- while (GetNextHashPos(WCC->summ, at, &HKLen, &HashKey, &vMsg)) {
- /** Are you a new message, or an old message? */
- Msg = (message_summary*) vMsg;
- if (is_msg_in_mset(old_msgs, Msg->msgnum)) {
- Msg->is_new = 0;
- }
- else {
- Msg->is_new = 1;
- }
- }
- DeleteHashPos(&at);
- }
+ if (load_seen) load_seen_flags();
if (sortit) {
CompareFunc SortIt;
#define set_room_pref(a, b, c) set_ROOM_PREFS(a, sizeof(a) - 1, b, c)
void set_ROOM_PREFS(const char *key, size_t keylen, StrBuf *value, int save_to_server);
-int is_msg_in_mset(char *mset, long msgnum);
void display_addressbook(long msgnum, char alpha);
void offer_start_page(StrBuf *Target, int nArgs, WCTemplateToken *Token, void *Context, int ContextType);
void convenience_page(char *titlebarcolor, char *titlebarmsg, char *messagetext);