Win64 fixes - I don't think that they introduced any bugs yet, but I want to be sure...
authorDaniel Genrich <daniel.genrich@gmx.net>
Wed, 29 Apr 2009 19:13:32 +0000 (19:13 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Wed, 29 Apr 2009 19:13:32 +0000 (19:13 +0000)
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/bmfont.c
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/exotic.c
source/blender/blenkernel/intern/font.c
source/blender/blenlib/BLI_vfontdata.h
source/blender/src/editfont.c
source/blender/src/imagepaint.c
source/blender/src/reeb.c

index 6cf934fa16598f1dbd8acc0c642db26252b803d9..ddb7d853f2f8af7773c2da05c35a349a9e65d219 100644 (file)
@@ -909,7 +909,7 @@ static void emDM_drawMappedFacesGLSL(DerivedMesh *dm,
        glShadeModel(GL_SMOOTH);
 
        for (i=0,eve=em->verts.first; eve; eve= eve->next)
-               eve->tmp.l = (long) i++;
+               eve->tmp.l = (intptr_t) i++;
 
 #define PASSATTRIB(efa, eve, vert) {                                                                                   \
        if(attribs.totorco) {                                                                                                           \
index 0af54b86ed6a3209b05110ae82456206e9df2db5..09770b2b4baeaba082b17dcf1a33a20c22bb4239 100644 (file)
@@ -178,7 +178,7 @@ void detectBitmapFont(ImBuf *ibuf)
 {
        unsigned char * rect;
        unsigned short version;
-       long i;
+       int i;
        
        if (ibuf != NULL) {
                // bitmap must have an x size that is a power of two
index 05271aa59a7a2ebb645d55d50d43c123af7875c8..6d5b86fa874ba6e2ac8ddb80265b6e60d3b4b208 100644 (file)
@@ -626,7 +626,7 @@ void CustomData_merge(const struct CustomData *source, struct CustomData *dest,
                        number++;
 
                if(layer->flag & CD_FLAG_NOCOPY) continue;
-               else if(!(mask & (1 << type))) continue;
+               else if(!((int)mask & (int)(1 << (int)type))) continue;
                else if(number < CustomData_number_of_layers(dest, type)) continue;
 
                if((alloctype == CD_ASSIGN) && (layer->flag & CD_FLAG_NOFREE))
@@ -1144,7 +1144,7 @@ void CustomData_set_only_copy(const struct CustomData *data,
        int i;
 
        for(i = 0; i < data->totlayer; ++i)
-               if(!(mask & (1 << data->layers[i].type)))
+               if(!((int)mask & (int)(1 << (int)data->layers[i].type)))
                        data->layers[i].flag |= CD_FLAG_NOCOPY;
 }
 
index 7716d71225eb9d76889b7bf785ed68fae63e7348..91eea56c9e75f76defc6260bd23d718083916875 100644 (file)
@@ -937,7 +937,7 @@ void filldisplist(ListBase *dispbase, ListBase *to)
        DispList *dlnew=0, *dl;
        float *f1;
        int colnr=0, charidx=0, cont=1, tot, a, *index;
-       long totvert;
+       intptr_t totvert;
        
        if(dispbase==0) return;
        if(dispbase->first==0) return;
index ee3fd59fe9fd5c6cf6cd042c55b9d9a017a3e085..76ad0cf07c39d5223b194bfeda62971df497a71a 100644 (file)
@@ -1131,7 +1131,7 @@ static int iv_finddata(struct IvNode *iv, char *field, int fieldnr)
        float *fp;
        int len, stackcount, skipdata=0;
        char *cpa, terminator, str[64];
-       long i;
+       intptr_t i;
        
        len= strlen(field);
 
@@ -2592,7 +2592,7 @@ static void write_videoscape_mesh(Object *ob, char *str)
        unsigned int kleur[32];
        float co[3];
        int a;
-       long tot;
+       intptr_t tot;
        char *cp;
        
        if(ob && ob->type==OB_MESH);
@@ -2642,17 +2642,17 @@ static void write_videoscape_mesh(Object *ob, char *str)
 
                        if(evl->v4==0) {
                                fprintf(fp, "3 %ld %ld %ld 0x%x\n", 
-                                               (long int) evl->v1->tmp.l,
-                                               (long int) evl->v2->tmp.l,
-                                               (long int) evl->v3->tmp.l, 
+                                               (intptr_t) evl->v1->tmp.l,
+                                               (intptr_t) evl->v2->tmp.l,
+                                               (intptr_t) evl->v3->tmp.l, 
                                                kleur[evl->mat_nr]);
                        }
                        else {
                                fprintf(fp, "4 %ld %ld %ld %ld 0x%x\n", 
-                                               (long int) evl->v1->tmp.l, 
-                                               (long int) evl->v2->tmp.l, 
-                                               (long int) evl->v3->tmp.l, 
-                                               (long int) evl->v4->tmp.l, 
+                                               (intptr_t) evl->v1->tmp.l, 
+                                               (intptr_t) evl->v2->tmp.l, 
+                                               (intptr_t) evl->v3->tmp.l, 
+                                               (intptr_t) evl->v4->tmp.l, 
                                                kleur[evl->mat_nr]);
                        }
                        evl= evl->next;
index 52275e507dde916be38794beef77814408a613c6..45b52f5af8e350611d68c025bb63e3f523fdf7ac 100644 (file)
@@ -1131,7 +1131,7 @@ struct chartrans *text_to_curve(Object *ob, int mode)
                ct= chartransdata;
                if (cu->sepchar==0) {
                for (i= 0; i<slen; i++) {
-                       cha = (unsigned long) mem[i];
+                       cha = (uintptr_t) mem[i];
                        info = &(cu->strinfo[i]);
                        if (info->mat_nr > (ob->totcol)) {
                                /* printf("Error: Illegal material index (%d) in text object, setting to 0\n", info->mat_nr); */
index 8838b1992e4e360ee4db40019f98a248375e38b1..bd89959801ad21db4dbe272adfd45b3ace949028 100644 (file)
@@ -54,7 +54,7 @@ typedef struct VFontData {
 typedef struct VChar {
        struct VChar    *next, *prev;
        ListBase        nurbsbase;
-       unsigned long   index;
+       intptr_t   index;
        float           resol;
        float           width;
        float           *points;
index a3b05a008c8d6b3ba851221cb9646319bba3c08a..682125dabb123cf2ec8db5c3dadf4c5a944d4f8d 100644 (file)
@@ -241,7 +241,7 @@ void update_string(Curve *cu)
        wcs2utf8s(cu->str, textbuf);
 }
 
-static int insert_into_textbuf(Curve *cu, unsigned long c)
+static int insert_into_textbuf(Curve *cu, uintptr_t c)
 {
        if (cu->len<MAXTEXT-1) {
                int x;
@@ -620,12 +620,12 @@ int mat_to_sel(void) {
        return 0;
 }
 
-void do_textedit(unsigned short event, short val, unsigned long _ascii)
+void do_textedit(unsigned short event, short val, uintptr_t _ascii)
 {
        Curve *cu;
        static int accentcode= 0;
        int x, doit=0, cursmove=0;
-       unsigned long ascii = _ascii;
+       uintptr_t ascii = _ascii;
        short kern;
 
        cu= G.obedit->data;
index 89dff67585ee04155187da8d33ac2a664f5b89a2..b0946e81dce67c0581726922ceb60576df5d12cf 100644 (file)
@@ -334,7 +334,7 @@ typedef struct UndoTile {
 typedef struct UndoElem {
        struct UndoElem *next, *prev;
        char name[MAXUNDONAME];
-       unsigned long undosize;
+       uintptr_t undosize;
 
        ImBuf *ibuf;
        ListBase tiles;
@@ -478,12 +478,12 @@ static void undo_imagepaint_push_begin(char *name)
 static void undo_imagepaint_push_end()
 {
        UndoElem *uel;
-       unsigned long totmem, maxmem;
+       uintptr_t totmem, maxmem;
 
        if(U.undomemory != 0) {
                /* limit to maximum memory (afterwards, we can't know in advance) */
                totmem= 0;
-               maxmem= ((unsigned long)U.undomemory)*1024*1024;
+               maxmem= ((uintptr_t)U.undomemory)*1024*1024;
 
                uel= undobase.last;
                while(uel) {
index 67cfce55907e67bc031d9f2ac961d4621e7379d4..f49071be63c8c1139c4d1bb526cdb4c47cd7dc4c 100644 (file)
@@ -2695,7 +2695,7 @@ static float cotan_weight(float *v1, float *v2, float *v3)
        return Inpf(a, b)/clen;
 }
 
-void addTriangle(EditVert *v1, EditVert *v2, EditVert *v3, long e1, long e2, long e3)
+void addTriangle(EditVert *v1, EditVert *v2, EditVert *v3, int e1, int e2, int e3)
 {
        /* Angle opposite e1 */
        float t1= cotan_weight(v1->co, v2->co, v3->co) / e2;