if (WCC->Floors != NULL)
return WCC->Floors;
- WCC->Floors = floors = NewHash(1, NULL);
+ WCC->Floors = floors = NewHash(1, Flathash);
Buf = NewStrBuf();
Floor = malloc(sizeof(floor));
Pos = NULL;
Floor = malloc(sizeof(floor));
- Floor->ID = StrBufExtractNext_long(Buf, &Pos, '|');
+ Floor->ID = StrBufExtractNext_int(Buf, &Pos, '|');
Floor->Name = NewStrBufPlain(NULL, StrLength(Buf));
StrBufExtract_NextToken(Floor->Name, Buf, &Pos, '|');
Floor->NRooms = StrBufExtractNext_long(Buf, &Pos, '|');
StrBufExtract_NextToken(room->name, Buf, &Pos, '|');
room->QRFlags = StrBufExtractNext_long(Buf, &Pos, '|');
- room->floorid = StrBufExtractNext_long(Buf, &Pos, '|');
+ room->floorid = StrBufExtractNext_int(Buf, &Pos, '|');
room->listorder = StrBufExtractNext_long(Buf, &Pos, '|');
room->QRFlags2 = StrBufExtractNext_long(Buf, &Pos, '|');
{
folder *r1 = (folder*) GetSearchPayload(room1);
folder *r2 = (folder*) GetSearchPayload(room2);
-
+
if ((r1->Floor == NULL) ||
(r2->Floor == NULL))
return 0;
-
+
/**
* are we on the same floor? else sort by floor.
*/
typedef struct _floor {
- long ID;
+ int ID;
StrBuf *Name;
long NRooms;
long AlphaN;
typedef struct _folder {
/* Data citserver tells us about the room */
StrBuf *name; /* the full name of the room we're talking about */
- int QRFlags; /* roomflags */
+ long QRFlags; /* roomflags */
int floorid; /* which floor is it on */
- int listorder; /* todo */
- int QRFlags2; /* Bitbucket NO2 */
+ long listorder; /* todo */
+ long QRFlags2; /* Bitbucket NO2 */
long RAFlags;
- int view; /* whats its default view? inbox/calendar.... */
- int defview;
- int lastchange; /* todo... */
+ long view; /* whats its default view? inbox/calendar.... */
+ long defview;
+ long lastchange; /* todo... */
/* later evaluated data from the serverdata */
long nRoomNameParts;
int hasnewmsgs; /* are there unread messages inside */
int is_inbox; /* is it a mailbox? */
int selectable; /* can we select it ??? */
- int num_rooms; /* If this is a floor, how many rooms does it have */
+ long num_rooms; /* If this is a floor, how many rooms does it have */
}folder;