Lots of little tweaks to fix various consistency problems discovered by
Solaris' CC. Fixed a bug in fg_debug.c with how the fgPrintf() wrapper passed arguments along to the real printf(). Also incorporated HUD changes by Michele America.
This commit is contained in:
+9
-10
@@ -5,15 +5,14 @@
|
|||||||
* This file contains routines that operate solely on matrices.
|
* This file contains routines that operate solely on matrices.
|
||||||
* -------------------------------------------------------------------------*/
|
* -------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
# include <memory.h> /* required for memset() and memcpy() */
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <Math/mat3defs.h>
|
#include <Math/mat3defs.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
#define USE_MEM
|
||||||
# include <memory.h> /* required for memset() and memcpy() */
|
|
||||||
#elif __MWERKS__
|
|
||||||
# include <string.h> /* MetroWerks CodeWarrior: memset() & memcpy() */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* #include "macros.h" */
|
/* #include "macros.h" */
|
||||||
|
|
||||||
@@ -33,8 +32,8 @@ MAT3identity (register MAT3mat mat)
|
|||||||
{
|
{
|
||||||
register int i;
|
register int i;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef USE_MEM /* WIN32 */
|
||||||
memset(mat,0x00, sizeof(MAT3mat));
|
memset(mat, 0x00, sizeof(MAT3mat));
|
||||||
#else
|
#else
|
||||||
bzero (mat, sizeof(MAT3mat));
|
bzero (mat, sizeof(MAT3mat));
|
||||||
#endif
|
#endif
|
||||||
@@ -50,7 +49,7 @@ MAT3identity (register MAT3mat mat)
|
|||||||
void
|
void
|
||||||
MAT3zero (MAT3mat mat)
|
MAT3zero (MAT3mat mat)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef USE_MEM /* WIN32 */
|
||||||
memset(mat,0x00, sizeof(MAT3mat));
|
memset(mat,0x00, sizeof(MAT3mat));
|
||||||
#else
|
#else
|
||||||
bzero (mat, sizeof(MAT3mat));
|
bzero (mat, sizeof(MAT3mat));
|
||||||
@@ -65,7 +64,7 @@ MAT3zero (MAT3mat mat)
|
|||||||
void
|
void
|
||||||
MAT3copy(MAT3mat to, MAT3mat from)
|
MAT3copy(MAT3mat to, MAT3mat from)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef USE_MEM /* WIN32 */
|
||||||
memcpy(to, from, sizeof(MAT3mat));
|
memcpy(to, from, sizeof(MAT3mat));
|
||||||
#else
|
#else
|
||||||
bcopy(from, to, sizeof(MAT3mat));
|
bcopy(from, to, sizeof(MAT3mat));
|
||||||
|
|||||||
+16
-3
@@ -38,6 +38,13 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __SUNPRO_CC
|
||||||
|
extern "C" {
|
||||||
|
long int random(void);
|
||||||
|
void srandom(unsigned int seed);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Seed the random number generater with time() so we don't see the
|
/* Seed the random number generater with time() so we don't see the
|
||||||
* same sequence every time */
|
* same sequence every time */
|
||||||
@@ -63,10 +70,16 @@ double fg_random(void) {
|
|||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.3 1998/01/27 00:47:59 curt
|
/* Revision 1.4 1998/02/03 23:20:28 curt
|
||||||
/* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
|
/* Lots of little tweaks to fix various consistency problems discovered by
|
||||||
/* system and commandline/config file processing code.
|
/* Solaris' CC. Fixed a bug in fg_debug.c with how the fgPrintf() wrapper
|
||||||
|
/* passed arguments along to the real printf(). Also incorporated HUD changes
|
||||||
|
/* by Michele America.
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.3 1998/01/27 00:47:59 curt
|
||||||
|
* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
|
||||||
|
* system and commandline/config file processing code.
|
||||||
|
*
|
||||||
* Revision 1.2 1997/12/30 20:47:48 curt
|
* Revision 1.2 1997/12/30 20:47:48 curt
|
||||||
* Integrated new event manager with subsystem initializations.
|
* Integrated new event manager with subsystem initializations.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "xgl.h"
|
#include "xgl.h"
|
||||||
|
|
||||||
#ifndef TRUE
|
#ifndef TRUE
|
||||||
|
|||||||
Reference in New Issue
Block a user