Tweaks to help building with MSVC++
This commit is contained in:
parent
ad2bd3db0f
commit
1088c5fa57
@ -8,6 +8,10 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "mat3defs.h"
|
#include "mat3defs.h"
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <memory.h> /* required for memset() and memcpy() */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* #include "macros.h" */
|
/* #include "macros.h" */
|
||||||
|
|
||||||
/* -------------------------- Static Routines ---------------------------- */
|
/* -------------------------- Static Routines ---------------------------- */
|
||||||
@ -26,7 +30,12 @@ MAT3identity (register MAT3mat mat)
|
|||||||
{
|
{
|
||||||
register int i;
|
register int i;
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
memset(mat,0x00, sizeof(MAT3mat));
|
||||||
|
#else
|
||||||
bzero (mat, sizeof(MAT3mat));
|
bzero (mat, sizeof(MAT3mat));
|
||||||
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
mat[i][i] = 1.0;
|
mat[i][i] = 1.0;
|
||||||
}
|
}
|
||||||
@ -38,7 +47,11 @@ MAT3identity (register MAT3mat mat)
|
|||||||
void
|
void
|
||||||
MAT3zero (MAT3mat mat)
|
MAT3zero (MAT3mat mat)
|
||||||
{
|
{
|
||||||
|
#ifdef WIN32
|
||||||
|
memset(mat,0x00, sizeof(MAT3mat));
|
||||||
|
#else
|
||||||
bzero (mat, sizeof(MAT3mat));
|
bzero (mat, sizeof(MAT3mat));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -49,7 +62,11 @@ MAT3zero (MAT3mat mat)
|
|||||||
void
|
void
|
||||||
MAT3copy(MAT3mat to, MAT3mat from)
|
MAT3copy(MAT3mat to, MAT3mat from)
|
||||||
{
|
{
|
||||||
bcopy (from, to, sizeof(MAT3mat));
|
#ifdef WIN32
|
||||||
|
memcpy(to, from, sizeof(MAT3mat));
|
||||||
|
#else
|
||||||
|
bcopy(from, to, sizeof(MAT3mat));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user