gCAD3D 2.40
ut_cast.h File Reference

Go to the source code of this file.

Macros

#define LONG_PTR(vp1)   (long)vp1
 long from pointer long = LONG_PTR (ptr); More...
 
#define INT_PTR(vp1)   (int)((long)vp1)
 integer from pointer int = INT_PTR (ptr); More...
 
#define PTR_INT(i1)   (void*)((int)i1)
 pointer from integer ptr = PTR_INT (int|long) More...
 
#define PTR_LONG(l1)   (void*)l1
 pointer from long ptr = PTR_LONG (long); More...
 
#define PTR_CHRA(txt)   (void*)txt
 pointer from character-array ptr = PTR_CHRA (*txt); More...
 
#define TXT_PTR(vp1)   (char*)(vp1)
 text from pointer More...
 

Detailed Description

                        Linux     MS-Win
                        gcc:      MS-cl:

32-bit: sizeof(int) 4 32 32 sizeof(long) 4 32 32 sizeof(void*) 4 32 32

64-bit: sizeof(int) 4 32 32 sizeof(long) 4|8 64 32 | 64 (Compilerswitch) set to 64 !!! sizeof(void*) 8 64 64

see also ../ut/ut_types.h

Macro Definition Documentation

#define LONG_PTR (   vp1)    (long)vp1

long from pointer long = LONG_PTR (ptr);

#define INT_PTR (   vp1)    (int)((long)vp1)

integer from pointer int = INT_PTR (ptr);

#define PTR_INT (   i1)    (void*)((int)i1)

pointer from integer ptr = PTR_INT (int|long)

#define PTR_LONG (   l1)    (void*)l1

pointer from long ptr = PTR_LONG (long);

#define PTR_CHRA (   txt)    (void*)txt

pointer from character-array ptr = PTR_CHRA (*txt);

#define TXT_PTR (   vp1)    (char*)(vp1)

text from pointer