2 * OpenAL cross platform audio library
3 * Copyright (C) 1999-2007 by authors.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
18 * Or go to http://www.gnu.org/copyleft/lgpl.html
26 #include "alExtension.h"
31 #include "alAuxEffectSlot.h"
36 static ALfunction function
[]= {
37 { "alEnable", (ALvoid
*) alEnable
},
38 { "alDisable", (ALvoid
*) alDisable
},
39 { "alIsEnabled", (ALvoid
*) alIsEnabled
},
40 { "alGetString", (ALvoid
*) alGetString
},
41 { "alGetBooleanv", (ALvoid
*) alGetBooleanv
},
42 { "alGetIntegerv", (ALvoid
*) alGetIntegerv
},
43 { "alGetFloatv", (ALvoid
*) alGetFloatv
},
44 { "alGetDoublev", (ALvoid
*) alGetDoublev
},
45 { "alGetBoolean", (ALvoid
*) alGetBoolean
},
46 { "alGetInteger", (ALvoid
*) alGetInteger
},
47 { "alGetFloat", (ALvoid
*) alGetFloat
},
48 { "alGetDouble", (ALvoid
*) alGetDouble
},
49 { "alGetError", (ALvoid
*) alGetError
},
50 { "alIsExtensionPresent", (ALvoid
*) alIsExtensionPresent
},
51 { "alGetProcAddress", (ALvoid
*) alGetProcAddress
},
52 { "alGetEnumValue", (ALvoid
*) alGetEnumValue
},
53 { "alListenerf", (ALvoid
*) alListenerf
},
54 { "alListener3f", (ALvoid
*) alListener3f
},
55 { "alListenerfv", (ALvoid
*) alListenerfv
},
56 { "alListeneri", (ALvoid
*) alListeneri
},
57 { "alListener3i", (ALvoid
*) alListener3i
},
58 { "alListeneriv", (ALvoid
*) alListeneriv
},
59 { "alGetListenerf", (ALvoid
*) alGetListenerf
},
60 { "alGetListener3f", (ALvoid
*) alGetListener3f
},
61 { "alGetListenerfv", (ALvoid
*) alGetListenerfv
},
62 { "alGetListeneri", (ALvoid
*) alGetListeneri
},
63 { "alGetListener3i", (ALvoid
*) alGetListener3i
},
64 { "alGetListeneriv", (ALvoid
*) alGetListeneriv
},
65 { "alGenSources", (ALvoid
*) alGenSources
},
66 { "alDeleteSources", (ALvoid
*) alDeleteSources
},
67 { "alIsSource", (ALvoid
*) alIsSource
},
68 { "alSourcef", (ALvoid
*) alSourcef
},
69 { "alSource3f", (ALvoid
*) alSource3f
},
70 { "alSourcefv", (ALvoid
*) alSourcefv
},
71 { "alSourcei", (ALvoid
*) alSourcei
},
72 { "alSource3i", (ALvoid
*) alSource3i
},
73 { "alSourceiv", (ALvoid
*) alSourceiv
},
74 { "alGetSourcef", (ALvoid
*) alGetSourcef
},
75 { "alGetSource3f", (ALvoid
*) alGetSource3f
},
76 { "alGetSourcefv", (ALvoid
*) alGetSourcefv
},
77 { "alGetSourcei", (ALvoid
*) alGetSourcei
},
78 { "alGetSource3i", (ALvoid
*) alGetSource3i
},
79 { "alGetSourceiv", (ALvoid
*) alGetSourceiv
},
80 { "alSourcePlayv", (ALvoid
*) alSourcePlayv
},
81 { "alSourceStopv", (ALvoid
*) alSourceStopv
},
82 { "alSourceRewindv", (ALvoid
*) alSourceRewindv
},
83 { "alSourcePausev", (ALvoid
*) alSourcePausev
},
84 { "alSourcePlay", (ALvoid
*) alSourcePlay
},
85 { "alSourceStop", (ALvoid
*) alSourceStop
},
86 { "alSourceRewind", (ALvoid
*) alSourceRewind
},
87 { "alSourcePause", (ALvoid
*) alSourcePause
},
88 { "alSourceQueueBuffers", (ALvoid
*) alSourceQueueBuffers
},
89 { "alSourceUnqueueBuffers", (ALvoid
*) alSourceUnqueueBuffers
},
90 { "alGenBuffers", (ALvoid
*) alGenBuffers
},
91 { "alDeleteBuffers", (ALvoid
*) alDeleteBuffers
},
92 { "alIsBuffer", (ALvoid
*) alIsBuffer
},
93 { "alBufferData", (ALvoid
*) alBufferData
},
94 { "alBufferf", (ALvoid
*) alBufferf
},
95 { "alBuffer3f", (ALvoid
*) alBuffer3f
},
96 { "alBufferfv", (ALvoid
*) alBufferfv
},
97 { "alBufferi", (ALvoid
*) alBufferi
},
98 { "alBuffer3i", (ALvoid
*) alBuffer3i
},
99 { "alBufferiv", (ALvoid
*) alBufferiv
},
100 { "alGetBufferf", (ALvoid
*) alGetBufferf
},
101 { "alGetBuffer3f", (ALvoid
*) alGetBuffer3f
},
102 { "alGetBufferfv", (ALvoid
*) alGetBufferfv
},
103 { "alGetBufferi", (ALvoid
*) alGetBufferi
},
104 { "alGetBuffer3i", (ALvoid
*) alGetBuffer3i
},
105 { "alGetBufferiv", (ALvoid
*) alGetBufferiv
},
106 { "alDopplerFactor", (ALvoid
*) alDopplerFactor
},
107 { "alDopplerVelocity", (ALvoid
*) alDopplerVelocity
},
108 { "alSpeedOfSound", (ALvoid
*) alSpeedOfSound
},
109 { "alDistanceModel", (ALvoid
*) alDistanceModel
},
111 { "alGenFilters", (ALvoid
*) alGenFilters
},
112 { "alDeleteFilters", (ALvoid
*) alDeleteFilters
},
113 { "alIsFilter", (ALvoid
*) alIsFilter
},
114 { "alFilteri", (ALvoid
*) alFilteri
},
115 { "alFilteriv", (ALvoid
*) alFilteriv
},
116 { "alFilterf", (ALvoid
*) alFilterf
},
117 { "alFilterfv", (ALvoid
*) alFilterfv
},
118 { "alGetFilteri", (ALvoid
*) alGetFilteri
},
119 { "alGetFilteriv", (ALvoid
*) alGetFilteriv
},
120 { "alGetFilterf", (ALvoid
*) alGetFilterf
},
121 { "alGetFilterfv", (ALvoid
*) alGetFilterfv
},
123 { "alGenEffects", (ALvoid
*) alGenEffects
},
124 { "alDeleteEffects", (ALvoid
*) alDeleteEffects
},
125 { "alIsEffect", (ALvoid
*) alIsEffect
},
126 { "alEffecti", (ALvoid
*) alEffecti
},
127 { "alEffectiv", (ALvoid
*) alEffectiv
},
128 { "alEffectf", (ALvoid
*) alEffectf
},
129 { "alEffectfv", (ALvoid
*) alEffectfv
},
130 { "alGetEffecti", (ALvoid
*) alGetEffecti
},
131 { "alGetEffectiv", (ALvoid
*) alGetEffectiv
},
132 { "alGetEffectf", (ALvoid
*) alGetEffectf
},
133 { "alGetEffectfv", (ALvoid
*) alGetEffectfv
},
135 { "alGenAuxiliaryEffectSlots", (ALvoid
*) alGenAuxiliaryEffectSlots
},
136 { "alDeleteAuxiliaryEffectSlots",(ALvoid
*) alDeleteAuxiliaryEffectSlots
},
137 { "alIsAuxiliaryEffectSlot", (ALvoid
*) alIsAuxiliaryEffectSlot
},
138 { "alAuxiliaryEffectSloti", (ALvoid
*) alAuxiliaryEffectSloti
},
139 { "alAuxiliaryEffectSlotiv", (ALvoid
*) alAuxiliaryEffectSlotiv
},
140 { "alAuxiliaryEffectSlotf", (ALvoid
*) alAuxiliaryEffectSlotf
},
141 { "alAuxiliaryEffectSlotfv", (ALvoid
*) alAuxiliaryEffectSlotfv
},
142 { "alGetAuxiliaryEffectSloti", (ALvoid
*) alGetAuxiliaryEffectSloti
},
143 { "alGetAuxiliaryEffectSlotiv", (ALvoid
*) alGetAuxiliaryEffectSlotiv
},
144 { "alGetAuxiliaryEffectSlotf", (ALvoid
*) alGetAuxiliaryEffectSlotf
},
145 { "alGetAuxiliaryEffectSlotfv", (ALvoid
*) alGetAuxiliaryEffectSlotfv
},
147 { NULL
, (ALvoid
*) NULL
} };
149 static ALenums enumeration
[]={
151 { (ALchar
*)"AL_INVALID", AL_INVALID
},
152 { (ALchar
*)"AL_NONE", AL_NONE
},
153 { (ALchar
*)"AL_FALSE", AL_FALSE
},
154 { (ALchar
*)"AL_TRUE", AL_TRUE
},
156 // Source and Listener Properties
157 { (ALchar
*)"AL_SOURCE_RELATIVE", AL_SOURCE_RELATIVE
},
158 { (ALchar
*)"AL_CONE_INNER_ANGLE", AL_CONE_INNER_ANGLE
},
159 { (ALchar
*)"AL_CONE_OUTER_ANGLE", AL_CONE_OUTER_ANGLE
},
160 { (ALchar
*)"AL_PITCH", AL_PITCH
},
161 { (ALchar
*)"AL_POSITION", AL_POSITION
},
162 { (ALchar
*)"AL_DIRECTION", AL_DIRECTION
},
163 { (ALchar
*)"AL_VELOCITY", AL_VELOCITY
},
164 { (ALchar
*)"AL_LOOPING", AL_LOOPING
},
165 { (ALchar
*)"AL_BUFFER", AL_BUFFER
},
166 { (ALchar
*)"AL_GAIN", AL_GAIN
},
167 { (ALchar
*)"AL_MIN_GAIN", AL_MIN_GAIN
},
168 { (ALchar
*)"AL_MAX_GAIN", AL_MAX_GAIN
},
169 { (ALchar
*)"AL_ORIENTATION", AL_ORIENTATION
},
170 { (ALchar
*)"AL_REFERENCE_DISTANCE", AL_REFERENCE_DISTANCE
},
171 { (ALchar
*)"AL_ROLLOFF_FACTOR", AL_ROLLOFF_FACTOR
},
172 { (ALchar
*)"AL_CONE_OUTER_GAIN", AL_CONE_OUTER_GAIN
},
173 { (ALchar
*)"AL_MAX_DISTANCE", AL_MAX_DISTANCE
},
174 { (ALchar
*)"AL_SEC_OFFSET", AL_SEC_OFFSET
},
175 { (ALchar
*)"AL_SAMPLE_OFFSET", AL_SAMPLE_OFFSET
},
176 { (ALchar
*)"AL_BYTE_OFFSET", AL_BYTE_OFFSET
},
177 { (ALchar
*)"AL_SOURCE_TYPE", AL_SOURCE_TYPE
},
178 { (ALchar
*)"AL_STATIC", AL_STATIC
},
179 { (ALchar
*)"AL_STREAMING", AL_STREAMING
},
180 { (ALchar
*)"AL_UNDETERMINED", AL_UNDETERMINED
},
181 { (ALchar
*)"AL_METERS_PER_UNIT", AL_METERS_PER_UNIT
},
183 // Source EFX Properties
184 { (ALchar
*)"AL_DIRECT_FILTER", AL_DIRECT_FILTER
},
185 { (ALchar
*)"AL_AUXILIARY_SEND_FILTER", AL_AUXILIARY_SEND_FILTER
},
186 { (ALchar
*)"AL_AIR_ABSORPTION_FACTOR", AL_AIR_ABSORPTION_FACTOR
},
187 { (ALchar
*)"AL_ROOM_ROLLOFF_FACTOR", AL_ROOM_ROLLOFF_FACTOR
},
188 { (ALchar
*)"AL_CONE_OUTER_GAINHF", AL_CONE_OUTER_GAINHF
},
189 { (ALchar
*)"AL_DIRECT_FILTER_GAINHF_AUTO", AL_DIRECT_FILTER_GAINHF_AUTO
},
190 { (ALchar
*)"AL_AUXILIARY_SEND_FILTER_GAIN_AUTO", AL_AUXILIARY_SEND_FILTER_GAIN_AUTO
},
191 { (ALchar
*)"AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO", AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO
},
194 // Source State information
195 { (ALchar
*)"AL_SOURCE_STATE", AL_SOURCE_STATE
},
196 { (ALchar
*)"AL_INITIAL", AL_INITIAL
},
197 { (ALchar
*)"AL_PLAYING", AL_PLAYING
},
198 { (ALchar
*)"AL_PAUSED", AL_PAUSED
},
199 { (ALchar
*)"AL_STOPPED", AL_STOPPED
},
202 { (ALchar
*)"AL_BUFFERS_QUEUED", AL_BUFFERS_QUEUED
},
203 { (ALchar
*)"AL_BUFFERS_PROCESSED", AL_BUFFERS_PROCESSED
},
206 { (ALchar
*)"AL_FORMAT_MONO8", AL_FORMAT_MONO8
},
207 { (ALchar
*)"AL_FORMAT_MONO16", AL_FORMAT_MONO16
},
208 { (ALchar
*)"AL_FORMAT_MONO_FLOAT32", AL_FORMAT_MONO_FLOAT32
},
209 { (ALchar
*)"AL_FORMAT_STEREO8", AL_FORMAT_STEREO8
},
210 { (ALchar
*)"AL_FORMAT_STEREO16", AL_FORMAT_STEREO16
},
211 { (ALchar
*)"AL_FORMAT_STEREO_FLOAT32", AL_FORMAT_STEREO_FLOAT32
},
212 { (ALchar
*)"AL_FORMAT_MONO_IMA4", AL_FORMAT_MONO_IMA4
},
213 { (ALchar
*)"AL_FORMAT_STEREO_IMA4", AL_FORMAT_STEREO_IMA4
},
214 { (ALchar
*)"AL_FORMAT_QUAD8_LOKI", AL_FORMAT_QUAD8_LOKI
},
215 { (ALchar
*)"AL_FORMAT_QUAD16_LOKI", AL_FORMAT_QUAD16_LOKI
},
216 { (ALchar
*)"AL_FORMAT_QUAD8", AL_FORMAT_QUAD8
},
217 { (ALchar
*)"AL_FORMAT_QUAD16", AL_FORMAT_QUAD16
},
218 { (ALchar
*)"AL_FORMAT_QUAD32", AL_FORMAT_QUAD32
},
219 { (ALchar
*)"AL_FORMAT_51CHN8", AL_FORMAT_51CHN8
},
220 { (ALchar
*)"AL_FORMAT_51CHN16", AL_FORMAT_51CHN16
},
221 { (ALchar
*)"AL_FORMAT_51CHN32", AL_FORMAT_51CHN32
},
222 { (ALchar
*)"AL_FORMAT_61CHN8", AL_FORMAT_61CHN8
},
223 { (ALchar
*)"AL_FORMAT_61CHN16", AL_FORMAT_61CHN16
},
224 { (ALchar
*)"AL_FORMAT_61CHN32", AL_FORMAT_61CHN32
},
225 { (ALchar
*)"AL_FORMAT_71CHN8", AL_FORMAT_71CHN8
},
226 { (ALchar
*)"AL_FORMAT_71CHN16", AL_FORMAT_71CHN16
},
227 { (ALchar
*)"AL_FORMAT_71CHN32", AL_FORMAT_71CHN32
},
228 { (ALchar
*)"AL_FORMAT_REAR8", AL_FORMAT_REAR8
},
229 { (ALchar
*)"AL_FORMAT_REAR16", AL_FORMAT_REAR16
},
230 { (ALchar
*)"AL_FORMAT_REAR32", AL_FORMAT_REAR32
},
233 { (ALchar
*)"AL_FREQUENCY", AL_FREQUENCY
},
234 { (ALchar
*)"AL_BITS", AL_BITS
},
235 { (ALchar
*)"AL_CHANNELS", AL_CHANNELS
},
236 { (ALchar
*)"AL_SIZE", AL_SIZE
},
238 // Buffer States (not supported yet)
239 { (ALchar
*)"AL_UNUSED", AL_UNUSED
},
240 { (ALchar
*)"AL_PENDING", AL_PENDING
},
241 { (ALchar
*)"AL_PROCESSED", AL_PROCESSED
},
244 { (ALchar
*)"AL_NO_ERROR", AL_NO_ERROR
},
245 { (ALchar
*)"AL_INVALID_NAME", AL_INVALID_NAME
},
246 { (ALchar
*)"AL_INVALID_ENUM", AL_INVALID_ENUM
},
247 { (ALchar
*)"AL_INVALID_VALUE", AL_INVALID_VALUE
},
248 { (ALchar
*)"AL_INVALID_OPERATION", AL_INVALID_OPERATION
},
249 { (ALchar
*)"AL_OUT_OF_MEMORY", AL_OUT_OF_MEMORY
},
252 { (ALchar
*)"AL_VENDOR", AL_VENDOR
},
253 { (ALchar
*)"AL_VERSION", AL_VERSION
},
254 { (ALchar
*)"AL_RENDERER", AL_RENDERER
},
255 { (ALchar
*)"AL_EXTENSIONS", AL_EXTENSIONS
},
258 { (ALchar
*)"AL_DOPPLER_FACTOR", AL_DOPPLER_FACTOR
},
259 { (ALchar
*)"AL_DOPPLER_VELOCITY", AL_DOPPLER_VELOCITY
},
260 { (ALchar
*)"AL_DISTANCE_MODEL", AL_DISTANCE_MODEL
},
261 { (ALchar
*)"AL_SPEED_OF_SOUND", AL_SPEED_OF_SOUND
},
264 { (ALchar
*)"AL_INVERSE_DISTANCE", AL_INVERSE_DISTANCE
},
265 { (ALchar
*)"AL_INVERSE_DISTANCE_CLAMPED", AL_INVERSE_DISTANCE_CLAMPED
},
266 { (ALchar
*)"AL_LINEAR_DISTANCE", AL_LINEAR_DISTANCE
},
267 { (ALchar
*)"AL_LINEAR_DISTANCE_CLAMPED", AL_LINEAR_DISTANCE_CLAMPED
},
268 { (ALchar
*)"AL_EXPONENT_DISTANCE", AL_EXPONENT_DISTANCE
},
269 { (ALchar
*)"AL_EXPONENT_DISTANCE_CLAMPED", AL_EXPONENT_DISTANCE_CLAMPED
},
272 { (ALchar
*)"AL_FILTER_TYPE", AL_FILTER_TYPE
},
273 { (ALchar
*)"AL_FILTER_NULL", AL_FILTER_NULL
},
274 { (ALchar
*)"AL_FILTER_LOWPASS", AL_FILTER_LOWPASS
},
275 { (ALchar
*)"AL_FILTER_HIGHPASS", AL_FILTER_HIGHPASS
},
276 { (ALchar
*)"AL_FILTER_BANDPASS", AL_FILTER_BANDPASS
},
279 { (ALchar
*)"AL_LOWPASS_GAIN", AL_LOWPASS_GAIN
},
280 { (ALchar
*)"AL_LOWPASS_GAINHF", AL_LOWPASS_GAINHF
},
283 { (ALchar
*)"AL_EFFECT_TYPE", AL_EFFECT_TYPE
},
284 { (ALchar
*)"AL_EFFECT_NULL", AL_EFFECT_NULL
},
285 { (ALchar
*)"AL_EFFECT_REVERB", AL_EFFECT_REVERB
},
286 { (ALchar
*)"AL_EFFECT_CHORUS", AL_EFFECT_CHORUS
},
287 { (ALchar
*)"AL_EFFECT_DISTORTION", AL_EFFECT_DISTORTION
},
288 { (ALchar
*)"AL_EFFECT_ECHO", AL_EFFECT_ECHO
},
289 { (ALchar
*)"AL_EFFECT_FLANGER", AL_EFFECT_FLANGER
},
290 { (ALchar
*)"AL_EFFECT_FREQUENCY_SHIFTER", AL_EFFECT_FREQUENCY_SHIFTER
},
291 { (ALchar
*)"AL_EFFECT_VOCAL_MORPHER", AL_EFFECT_VOCAL_MORPHER
},
292 { (ALchar
*)"AL_EFFECT_PITCH_SHIFTER", AL_EFFECT_PITCH_SHIFTER
},
293 { (ALchar
*)"AL_EFFECT_RING_MODULATOR", AL_EFFECT_RING_MODULATOR
},
294 { (ALchar
*)"AL_EFFECT_AUTOWAH", AL_EFFECT_AUTOWAH
},
295 { (ALchar
*)"AL_EFFECT_COMPRESSOR", AL_EFFECT_COMPRESSOR
},
296 { (ALchar
*)"AL_EFFECT_EQUALIZER", AL_EFFECT_EQUALIZER
},
299 { (ALchar
*)"AL_REVERB_DENSITY", AL_REVERB_DENSITY
},
300 { (ALchar
*)"AL_REVERB_DIFFUSION", AL_REVERB_DIFFUSION
},
301 { (ALchar
*)"AL_REVERB_GAIN", AL_REVERB_GAIN
},
302 { (ALchar
*)"AL_REVERB_GAINHF", AL_REVERB_GAINHF
},
303 { (ALchar
*)"AL_REVERB_DECAY_TIME", AL_REVERB_DECAY_TIME
},
304 { (ALchar
*)"AL_REVERB_DECAY_HFRATIO", AL_REVERB_DECAY_HFRATIO
},
305 { (ALchar
*)"AL_REVERB_REFLECTIONS_GAIN", AL_REVERB_REFLECTIONS_GAIN
},
306 { (ALchar
*)"AL_REVERB_REFLECTIONS_DELAY", AL_REVERB_REFLECTIONS_DELAY
},
307 { (ALchar
*)"AL_REVERB_LATE_REVERB_GAIN", AL_REVERB_LATE_REVERB_GAIN
},
308 { (ALchar
*)"AL_REVERB_LATE_REVERB_DELAY", AL_REVERB_LATE_REVERB_DELAY
},
309 { (ALchar
*)"AL_REVERB_AIR_ABSORPTION_GAINHF", AL_REVERB_AIR_ABSORPTION_GAINHF
},
310 { (ALchar
*)"AL_REVERB_ROOM_ROLLOFF_FACTOR", AL_REVERB_ROOM_ROLLOFF_FACTOR
},
311 { (ALchar
*)"AL_REVERB_DECAY_HFLIMIT", AL_REVERB_DECAY_HFLIMIT
},
315 { (ALchar
*)NULL
, (ALenum
)0 }
320 ALAPI ALboolean ALAPIENTRY
alIsExtensionPresent(const ALchar
*extName
)
322 ALboolean bIsSupported
= AL_FALSE
;
323 ALCcontext
*pContext
;
329 alSetError(AL_INVALID_VALUE
);
333 pContext
= alcGetCurrentContext();
336 alSetError(AL_INVALID_OPERATION
);
340 SuspendContext(pContext
);
342 len
= strlen(extName
);
343 ptr
= pContext
->ExtensionList
;
346 if(strncasecmp(ptr
, extName
, len
) == 0 &&
347 (ptr
[len
] == '\0' || isspace(ptr
[len
])))
349 bIsSupported
= AL_TRUE
;
352 if((ptr
=strchr(ptr
, ' ')) != NULL
)
356 } while(isspace(*ptr
));
360 ProcessContext(pContext
);
366 ALAPI ALvoid
* ALAPIENTRY
alGetProcAddress(const ALchar
*funcName
)
370 while(function
[i
].funcName
&&
371 strcmp((char*)function
[i
].funcName
, (char*)funcName
) != 0)
374 return function
[i
].address
;
377 /* NOTE: This function must be able to run without a context! */
378 ALAPI ALenum ALAPIENTRY
alGetEnumValue(const ALchar
*enumName
)
382 while(enumeration
[i
].enumName
&&
383 strcmp(enumeration
[i
].enumName
, enumName
) != 0)
386 return enumeration
[i
].value
;