* 64 bit int / long blablabla
authorWilfried Göesgens <willi@citadel.org>
Thu, 5 Nov 2009 20:20:43 +0000 (20:20 +0000)
committerWilfried Göesgens <willi@citadel.org>
Thu, 5 Nov 2009 20:20:43 +0000 (20:20 +0000)
webcit/roomlist.c
webcit/roomops.h

index 818b02d3a9ba2e3b02f34c768f382a0f67e2ab72..6aac833c3429ebfe61b2c5560dfc950b2c3e11bc 100644 (file)
@@ -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.
         */
index d2b706cba0b1c449f1c403fe8dee9768326f1fea..19d151e29e3e808b2d84933e751d680cdd4e6a24 100644 (file)
@@ -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;