From: Wilfried Göesgens Date: Thu, 5 Nov 2009 20:20:43 +0000 (+0000) Subject: * 64 bit int / long blablabla X-Git-Tag: v7.86~661 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=ad5725816c6a6605de3acba6b2725660d475b7e6 * 64 bit int / long blablabla --- diff --git a/webcit/roomlist.c b/webcit/roomlist.c index 818b02d3a..6aac833c3 100644 --- a/webcit/roomlist.c +++ b/webcit/roomlist.c @@ -47,7 +47,7 @@ HashList *GetFloorListHash(StrBuf *Target, WCTemplputParams *TP) 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)); @@ -67,7 +67,7 @@ HashList *GetFloorListHash(StrBuf *Target, WCTemplputParams *TP) 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, '|'); @@ -167,7 +167,7 @@ HashList *GetRoomListHash(StrBuf *Target, WCTemplputParams *TP) 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, '|'); @@ -318,11 +318,11 @@ int CompareRoomListByFloorRoomPrivFirstRev(const void *room1, const void *room2) { 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. */ diff --git a/webcit/roomops.h b/webcit/roomops.h index d2b706cba..19d151e29 100644 --- a/webcit/roomops.h +++ b/webcit/roomops.h @@ -29,7 +29,7 @@ struct roomlisting { typedef struct _floor { - long ID; + int ID; StrBuf *Name; long NRooms; long AlphaN; @@ -57,17 +57,17 @@ struct __ofolder { 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; @@ -80,7 +80,7 @@ typedef struct _folder { 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;