The attached patch fixes the const-correctness of _alIsZeroVector and
_alcSetContext.
In addition, the first argument of the latter is made a little bit more correct
(ALCint vs. int).
Cheers,
S.
Index: linux/src/al_main.c
===================================================================
RCS file: /usr/local/cvs-repository/openal/linux/src/al_main.c,v
retrieving revision 1.10
diff -u -r1.10 al_main.c
--- linux/src/al_main.c 19 Apr 2004 22:03:07 -0000 1.10
+++ linux/src/al_main.c 27 Feb 2005 14:53:49 -0000
@@ -785,11 +785,11 @@
}
/*
- * _alIsZeroVector( ALfloat *fv1 )
+ * ALboolean _alIsZeroVector( const ALfloat *fv1 )
*
* Returns true if fv1 == { 0.0f, 0.0f, 0.0f }
*/
-ALboolean _alIsZeroVector(ALfloat *fv)
+ALboolean _alIsZeroVector(const ALfloat *fv)
{
if(fv[0] != 0.0f) {
return AL_FALSE;
Index: linux/src/al_main.h
===================================================================
RCS file: /usr/local/cvs-repository/openal/linux/src/al_main.h,v
retrieving revision 1.5
diff -u -r1.5 al_main.h
--- linux/src/al_main.h 10 Aug 2003 07:58:31 -0000 1.5
+++ linux/src/al_main.h 27 Feb 2005 14:53:49 -0000
@@ -278,11 +278,11 @@
ALboolean _alCheckRangeb( ALboolean val );
/*
- * _alIsZeroVector( ALfloat *fv1 )
+ * ALboolean _alIsZeroVector( const ALfloat *fv1 )
*
* Returns true if fv1 == { 0.0f, 0.0f, 0.0f }
*/
-ALboolean _alIsZeroVector( ALfloat *fv1 );
+ALboolean _alIsZeroVector( const ALfloat *fv1 );
/*
* the buffers that sources are split into in SplitSources and
Index: linux/src/alc/alc_context.c
===================================================================
RCS file: /usr/local/cvs-repository/openal/linux/src/alc/alc_context.c,v
retrieving revision 1.13
diff -u -r1.13 alc_context.c
--- linux/src/alc/alc_context.c 25 Jun 2004 18:47:20 -0000 1.13
+++ linux/src/alc/alc_context.c 27 Feb 2005 14:53:51 -0000
@@ -614,12 +614,12 @@
/*
- * _alcSetContext( int *attrlist, ALuint cid, AL_device *dev )
+ * void _alcSetContext( const ALCint *attrlist, ALuint cid, AL_device *dev )
*
* Sets context id paramaters according to an attribute list and device.
*
*/
-void _alcSetContext(int *attrlist, ALuint cid, AL_device *dev ) {
+void _alcSetContext(const ALCint *attrlist, ALuint cid, AL_device *dev ) {
AL_context *cc;
ALboolean reading_keys = AL_TRUE;
struct { int key; int val; } rdr;
Index: linux/src/alc/alc_context.h
===================================================================
RCS file: /usr/local/cvs-repository/openal/linux/src/alc/alc_context.h,v
retrieving revision 1.3
diff -u -r1.3 alc_context.h
--- linux/src/alc/alc_context.h 20 Jun 2003 19:23:06 -0000 1.3
+++ linux/src/alc/alc_context.h 27 Feb 2005 14:53:51 -0000
@@ -9,6 +9,7 @@
#define _ALC_CONTEXT_H_
#include "AL/altypes.h"
+#include "AL/alctypes.h"
#include "../al_types.h"
#include "../al_attenuation.h"
@@ -90,11 +91,11 @@
ALboolean _alcIsContext( ALuint cid );
/*
- * _alcSetContext( int *attrlist, ALuint cid, AL_device *dev )
+ * void _alcSetContext( const ALCint *attrlist, ALuint cid, AL_device *dev )
*
* Sets context id paramaters according to an attribute list and device.
*/
-void _alcSetContext( int *attrlist, ALuint cid, AL_device *dev );
+void _alcSetContext( const ALCint *attrlist, ALuint cid, AL_device *dev );
/*
* _alcGetNewContextId( void )
|