4 * Freeglut state query methods.
6 * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
7 * Written by Pawel W. Olszta, <olszta@sourceforge.net>
8 * Creation date: Thu Dec 16 1999
10 * Permission is hereby granted, free of charge, to any person obtaining a
11 * copy of this software and associated documentation files (the "Software"),
12 * to deal in the Software without restriction, including without limitation
13 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 * and/or sell copies of the Software, and to permit persons to whom the
15 * Software is furnished to do so, subject to the following conditions:
17 * The above copyright notice and this permission notice shall be included
18 * in all copies or substantial portions of the Software.
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
24 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 #include <GL/freeglut.h>
29 #include "freeglut_internal.h"
32 * TODO BEFORE THE STABLE RELEASE:
34 * glutGet() -- X11 tests passed, but check if all enums
35 * handled (what about Win32?)
36 * glutDeviceGet() -- X11 tests passed, but check if all enums
37 * handled (what about Win32?)
38 * glutGetModifiers() -- OK, but could also remove the limitation
39 * glutLayerGet() -- what about GLUT_NORMAL_DAMAGED?
41 * The fail-on-call policy will help adding the most needed things imho.
44 /* -- LOCAL DEFINITIONS ---------------------------------------------------- */
46 /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
48 #if TARGET_HOST_POSIX_X11
50 * Queries the GL context about some attributes
52 static int fghGetConfig( int attribute )
55 int result; /* Not checked */
57 if( fgStructure.CurrentWindow )
58 result = glXGetFBConfigAttrib( fgDisplay.Display,
59 *(fgStructure.CurrentWindow->Window.FBConfig),
67 /* -- INTERFACE FUNCTIONS -------------------------------------------------- */
70 * General settings assignment method
72 void FGAPIENTRY glutSetOption( GLenum eWhat, int value )
74 FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSetOption" );
77 * XXX In chronological code add order. (WHY in that order?)
81 case GLUT_INIT_WINDOW_X:
82 fgState.Position.X = (GLint)value;
85 case GLUT_INIT_WINDOW_Y:
86 fgState.Position.Y = (GLint)value;
89 case GLUT_INIT_WINDOW_WIDTH:
90 fgState.Size.X = (GLint)value;
93 case GLUT_INIT_WINDOW_HEIGHT:
94 fgState.Size.Y = (GLint)value;
97 case GLUT_INIT_DISPLAY_MODE:
98 fgState.DisplayMode = (unsigned int)value;
101 case GLUT_ACTION_ON_WINDOW_CLOSE:
102 fgState.ActionOnWindowClose = value;
105 case GLUT_RENDERING_CONTEXT:
106 fgState.UseCurrentContext =
107 ( value == GLUT_USE_CURRENT_CONTEXT ) ? GL_TRUE : GL_FALSE;
110 case GLUT_DIRECT_RENDERING:
111 fgState.DirectContext = value;
114 case GLUT_WINDOW_CURSOR:
115 if( fgStructure.CurrentWindow != NULL )
116 fgStructure.CurrentWindow->State.Cursor = value;
120 fgState.AuxiliaryBufferNumber = value;
123 case GLUT_MULTISAMPLE:
124 fgState.SampleNumber = value;
128 fgWarning( "glutSetOption(): missing enum handle %d", eWhat );
133 #if TARGET_HOST_MS_WINDOWS
134 /* The following include file is available from SGI but is not standard:
135 * #include <GL/wglext.h>
136 * So we copy the necessary parts out of it to support the multisampling query
138 #define WGL_SAMPLES_ARB 0x2042
143 * General settings query method
145 int FGAPIENTRY glutGet( GLenum eWhat )
147 #if TARGET_HOST_MS_WINDOWS
149 GLboolean boolValue ;
156 case GLUT_INIT_STATE:
157 return fgState.Initialised;
159 case GLUT_ELAPSED_TIME:
160 return fgElapsedTime();
163 FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutGet" );
165 /* XXX In chronological code add order. (WHY in that order?) */
168 /* Following values are stored in fgState and fgDisplay global structures */
169 case GLUT_SCREEN_WIDTH: return fgDisplay.ScreenWidth ;
170 case GLUT_SCREEN_HEIGHT: return fgDisplay.ScreenHeight ;
171 case GLUT_SCREEN_WIDTH_MM: return fgDisplay.ScreenWidthMM ;
172 case GLUT_SCREEN_HEIGHT_MM: return fgDisplay.ScreenHeightMM;
173 case GLUT_INIT_WINDOW_X: return fgState.Position.Use ?
174 fgState.Position.X : -1 ;
175 case GLUT_INIT_WINDOW_Y: return fgState.Position.Use ?
176 fgState.Position.Y : -1 ;
177 case GLUT_INIT_WINDOW_WIDTH: return fgState.Size.Use ?
178 fgState.Size.X : -1 ;
179 case GLUT_INIT_WINDOW_HEIGHT: return fgState.Size.Use ?
180 fgState.Size.Y : -1 ;
181 case GLUT_INIT_DISPLAY_MODE: return fgState.DisplayMode ;
183 #if TARGET_HOST_POSIX_X11
185 * The window/context specific queries are handled mostly by
188 case GLUT_WINDOW_NUM_SAMPLES:
189 #ifdef GLX_VERSION_1_3
190 glGetIntegerv(GL_SAMPLES, &nsamples);
195 * The rest of GLX queries under X are general enough to use a macro to
198 # define GLX_QUERY(a,b) case a: return fghGetConfig( b );
200 GLX_QUERY( GLUT_WINDOW_RGBA, GLX_RGBA );
201 GLX_QUERY( GLUT_WINDOW_DOUBLEBUFFER, GLX_DOUBLEBUFFER );
202 GLX_QUERY( GLUT_WINDOW_BUFFER_SIZE, GLX_BUFFER_SIZE );
203 GLX_QUERY( GLUT_WINDOW_STENCIL_SIZE, GLX_STENCIL_SIZE );
204 GLX_QUERY( GLUT_WINDOW_DEPTH_SIZE, GLX_DEPTH_SIZE );
205 GLX_QUERY( GLUT_WINDOW_RED_SIZE, GLX_RED_SIZE );
206 GLX_QUERY( GLUT_WINDOW_GREEN_SIZE, GLX_GREEN_SIZE );
207 GLX_QUERY( GLUT_WINDOW_BLUE_SIZE, GLX_BLUE_SIZE );
208 GLX_QUERY( GLUT_WINDOW_ALPHA_SIZE, GLX_ALPHA_SIZE );
209 GLX_QUERY( GLUT_WINDOW_ACCUM_RED_SIZE, GLX_ACCUM_RED_SIZE );
210 GLX_QUERY( GLUT_WINDOW_ACCUM_GREEN_SIZE, GLX_ACCUM_GREEN_SIZE );
211 GLX_QUERY( GLUT_WINDOW_ACCUM_BLUE_SIZE, GLX_ACCUM_BLUE_SIZE );
212 GLX_QUERY( GLUT_WINDOW_ACCUM_ALPHA_SIZE, GLX_ACCUM_ALPHA_SIZE );
213 GLX_QUERY( GLUT_WINDOW_STEREO, GLX_STEREO );
217 /* Colormap size is handled in a bit different way than all the rest */
218 case GLUT_WINDOW_COLORMAP_SIZE:
219 if( (fghGetConfig( GLX_RGBA )) || (fgStructure.CurrentWindow == NULL) )
222 * We've got a RGBA visual, so there is no colormap at all.
223 * The other possibility is that we have no current window set.
229 const GLXFBConfig * fbconfig =
230 fgStructure.CurrentWindow->Window.FBConfig;
232 XVisualInfo * visualInfo =
233 glXGetVisualFromFBConfig( fgDisplay.Display, *fbconfig );
235 const int result = visualInfo->visual->map_entries;
243 * Those calls are somewhat similiar, as they use XGetWindowAttributes()
248 case GLUT_WINDOW_BORDER_WIDTH:
249 case GLUT_WINDOW_HEADER_HEIGHT:
254 if( fgStructure.CurrentWindow == NULL )
257 XTranslateCoordinates(
259 fgStructure.CurrentWindow->Window.Handle,
260 fgDisplay.RootWindow,
265 case GLUT_WINDOW_X: return x;
266 case GLUT_WINDOW_Y: return y;
271 XTranslateCoordinates(
273 fgStructure.CurrentWindow->Window.Handle,
274 w, 0, 0, &x, &y, &w);
278 case GLUT_WINDOW_BORDER_WIDTH: return x;
279 case GLUT_WINDOW_HEADER_HEIGHT: return y;
283 case GLUT_WINDOW_WIDTH:
284 case GLUT_WINDOW_HEIGHT:
286 XWindowAttributes winAttributes;
288 if( fgStructure.CurrentWindow == NULL )
290 XGetWindowAttributes(
292 fgStructure.CurrentWindow->Window.Handle,
297 case GLUT_WINDOW_WIDTH: return winAttributes.width ;
298 case GLUT_WINDOW_HEIGHT: return winAttributes.height ;
302 /* I do not know yet if there will be a fgChooseVisual() function for Win32 */
303 case GLUT_DISPLAY_MODE_POSSIBLE:
305 /* We should not have to call fgChooseFBConfig again here. */
306 GLXFBConfig * fbconfig;
309 fbconfig = fgChooseFBConfig();
311 if (fbconfig == NULL)
324 /* This is system-dependant */
325 case GLUT_WINDOW_FORMAT_ID:
326 if( fgStructure.CurrentWindow == NULL )
329 return fghGetConfig( GLX_VISUAL_ID );
331 #elif TARGET_HOST_MS_WINDOWS
333 case GLUT_WINDOW_NUM_SAMPLES:
334 glGetIntegerv(WGL_SAMPLES_ARB, &nsamples);
337 /* Handle the OpenGL inquiries */
338 case GLUT_WINDOW_RGBA:
339 glGetBooleanv ( GL_RGBA_MODE, &boolValue );
340 returnValue = boolValue ? 1 : 0;
342 case GLUT_WINDOW_DOUBLEBUFFER:
343 glGetBooleanv ( GL_DOUBLEBUFFER, &boolValue );
344 returnValue = boolValue ? 1 : 0;
346 case GLUT_WINDOW_STEREO:
347 glGetBooleanv ( GL_STEREO, &boolValue );
348 returnValue = boolValue ? 1 : 0;
351 case GLUT_WINDOW_RED_SIZE:
352 glGetIntegerv ( GL_RED_BITS, &returnValue );
354 case GLUT_WINDOW_GREEN_SIZE:
355 glGetIntegerv ( GL_GREEN_BITS, &returnValue );
357 case GLUT_WINDOW_BLUE_SIZE:
358 glGetIntegerv ( GL_BLUE_BITS, &returnValue );
360 case GLUT_WINDOW_ALPHA_SIZE:
361 glGetIntegerv ( GL_ALPHA_BITS, &returnValue );
363 case GLUT_WINDOW_ACCUM_RED_SIZE:
364 glGetIntegerv ( GL_ACCUM_RED_BITS, &returnValue );
366 case GLUT_WINDOW_ACCUM_GREEN_SIZE:
367 glGetIntegerv ( GL_ACCUM_GREEN_BITS, &returnValue );
369 case GLUT_WINDOW_ACCUM_BLUE_SIZE:
370 glGetIntegerv ( GL_ACCUM_BLUE_BITS, &returnValue );
372 case GLUT_WINDOW_ACCUM_ALPHA_SIZE:
373 glGetIntegerv ( GL_ACCUM_ALPHA_BITS, &returnValue );
375 case GLUT_WINDOW_DEPTH_SIZE:
376 glGetIntegerv ( GL_DEPTH_BITS, &returnValue );
379 case GLUT_WINDOW_BUFFER_SIZE:
380 returnValue = 1 ; /* ????? */
382 case GLUT_WINDOW_STENCIL_SIZE:
383 returnValue = 0 ; /* ????? */
388 case GLUT_WINDOW_WIDTH:
389 case GLUT_WINDOW_HEIGHT:
392 * There is considerable confusion about the "right thing to
393 * do" concerning window size and position. GLUT itself is
394 * not consistent between Windows and UNIX/X11; since
395 * platform independence is a virtue for "freeglut", we
396 * decided to break with GLUT's behaviour.
398 * Under UNIX/X11, it is apparently not possible to get the
399 * window border sizes in order to subtract them off the
400 * window's initial position until some time after the window
401 * has been created. Therefore we decided on the following
402 * behaviour, both under Windows and under UNIX/X11:
403 * - When you create a window with position (x,y) and size
404 * (w,h), the upper left hand corner of the outside of the
405 * window is at (x,y) and the size of the drawable area is
407 * - When you query the size and position of the window--as
408 * is happening here for Windows--"freeglut" will return
409 * the size of the drawable area--the (w,h) that you
410 * specified when you created the window--and the coordinates
411 * of the upper left hand corner of the drawable
412 * area--which is NOT the (x,y) you specified.
417 freeglut_return_val_if_fail( fgStructure.CurrentWindow != NULL, 0 );
420 * We need to call GetWindowRect() first...
421 * (this returns the pixel coordinates of the outside of the window)
423 GetWindowRect( fgStructure.CurrentWindow->Window.Handle, &winRect );
425 /* ...then we've got to correct the results we've just received... */
427 #if !defined(_WIN32_WCE)
428 if ( ( fgStructure.GameModeWindow != fgStructure.CurrentWindow ) && ( fgStructure.CurrentWindow->Parent == NULL ) &&
429 ( ! fgStructure.CurrentWindow->IsMenu ) )
431 winRect.left += GetSystemMetrics( SM_CXSIZEFRAME );
432 winRect.right -= GetSystemMetrics( SM_CXSIZEFRAME );
433 winRect.top += GetSystemMetrics( SM_CYSIZEFRAME ) + GetSystemMetrics( SM_CYCAPTION );
434 winRect.bottom -= GetSystemMetrics( SM_CYSIZEFRAME );
436 #endif /* !defined(_WIN32_WCE) */
440 case GLUT_WINDOW_X: return winRect.left ;
441 case GLUT_WINDOW_Y: return winRect.top ;
442 case GLUT_WINDOW_WIDTH: return winRect.right - winRect.left;
443 case GLUT_WINDOW_HEIGHT: return winRect.bottom - winRect.top;
448 case GLUT_WINDOW_BORDER_WIDTH :
449 #if defined(_WIN32_WCE)
452 return GetSystemMetrics( SM_CXSIZEFRAME );
453 #endif /* !defined(_WIN32_WCE) */
455 case GLUT_WINDOW_HEADER_HEIGHT :
456 #if defined(_WIN32_WCE)
459 return GetSystemMetrics( SM_CYCAPTION );
460 #endif /* defined(_WIN32_WCE) */
462 case GLUT_DISPLAY_MODE_POSSIBLE:
463 #if defined(_WIN32_WCE)
466 return fgSetupPixelFormat( fgStructure.CurrentWindow, GL_TRUE,
468 #endif /* defined(_WIN32_WCE) */
471 case GLUT_WINDOW_FORMAT_ID:
472 #if !defined(_WIN32_WCE)
473 if( fgStructure.CurrentWindow != NULL )
474 return GetPixelFormat( fgStructure.CurrentWindow->Window.Device );
475 #endif /* defined(_WIN32_WCE) */
480 /* The window structure queries */
481 case GLUT_WINDOW_PARENT:
482 if( fgStructure.CurrentWindow == NULL ) return 0;
483 if( fgStructure.CurrentWindow->Parent == NULL ) return 0;
484 return fgStructure.CurrentWindow->Parent->ID;
486 case GLUT_WINDOW_NUM_CHILDREN:
487 if( fgStructure.CurrentWindow == NULL )
489 return fgListLength( &fgStructure.CurrentWindow->Children );
491 case GLUT_WINDOW_CURSOR:
492 if( fgStructure.CurrentWindow == NULL )
494 return fgStructure.CurrentWindow->State.Cursor;
496 case GLUT_MENU_NUM_ITEMS:
497 if( fgStructure.CurrentMenu == NULL )
499 return fgListLength( &fgStructure.CurrentMenu->Entries );
501 case GLUT_ACTION_ON_WINDOW_CLOSE:
502 return fgState.ActionOnWindowClose;
505 return VERSION_MAJOR * 10000 + VERSION_MINOR * 100 + VERSION_PATCH;
507 case GLUT_RENDERING_CONTEXT:
508 return fgState.UseCurrentContext ? GLUT_USE_CURRENT_CONTEXT
509 : GLUT_CREATE_NEW_CONTEXT;
511 case GLUT_DIRECT_RENDERING:
512 return fgState.DirectContext;
516 fgWarning( "glutGet(): missing enum handle %d", eWhat );
523 * Returns various device information.
525 int FGAPIENTRY glutDeviceGet( GLenum eWhat )
527 FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutDeviceGet" );
529 /* XXX WARNING: we are mostly lying in this function. */
532 case GLUT_HAS_KEYBOARD:
534 * Win32 is assumed a keyboard, and this cannot be queried,
535 * except for WindowsCE.
537 * X11 has a core keyboard by definition, although it can
538 * be present as a virtual/dummy keyboard. For now, there
539 * is no reliable way to tell if a real keyboard is present.
541 #if defined(_WIN32_CE)
542 return ( GetKeyboardStatus() & KBDI_KEYBOARD_PRESENT ) ? 1 : 0;
543 # if FREEGLUT_LIB_PRAGMAS
544 # pragma comment (lib,"Kbdui.lib")
551 #if TARGET_HOST_POSIX_X11
553 /* X11 has a mouse by definition */
557 case GLUT_NUM_MOUSE_BUTTONS:
558 /* We should be able to pass NULL when the last argument is zero,
559 * but at least one X server has a bug where this causes a segfault.
561 * In XFree86/Xorg servers, a mouse wheel is seen as two buttons
562 * rather than an Axis; "freeglut_main.c" expects this when
563 * checking for a wheel event.
567 int nbuttons = XGetPointerMapping(fgDisplay.Display, &map,0);
571 #elif TARGET_HOST_MS_WINDOWS
575 * MS Windows can be booted without a mouse.
577 return GetSystemMetrics( SM_MOUSEPRESENT );
579 case GLUT_NUM_MOUSE_BUTTONS:
580 # if defined(_WIN32_WCE)
583 return GetSystemMetrics( SM_CMOUSEBUTTONS );
587 case GLUT_HAS_JOYSTICK:
588 return fgJoystickDetect ();
590 case GLUT_OWNS_JOYSTICK:
591 return fgState.JoysticksInitialised;
593 case GLUT_JOYSTICK_POLL_RATE:
594 return fgStructure.CurrentWindow ? fgStructure.CurrentWindow->State.JoystickPollRate : 0;
596 /* XXX The following two are only for Joystick 0 but this is an improvement */
597 case GLUT_JOYSTICK_BUTTONS:
598 return glutJoystickGetNumButtons ( 0 );
600 case GLUT_JOYSTICK_AXES:
601 return glutJoystickGetNumAxes ( 0 );
603 case GLUT_HAS_DIAL_AND_BUTTON_BOX:
604 return fgInputDeviceDetect ();
607 if ( fgState.InputDevsInitialised ) return 8;
610 case GLUT_NUM_BUTTON_BOX_BUTTONS:
613 case GLUT_HAS_SPACEBALL:
614 case GLUT_HAS_TABLET:
617 case GLUT_NUM_SPACEBALL_BUTTONS:
618 case GLUT_NUM_TABLET_BUTTONS:
621 case GLUT_DEVICE_IGNORE_KEY_REPEAT:
622 return fgStructure.CurrentWindow ? fgStructure.CurrentWindow->State.IgnoreKeyRepeat : 0;
624 case GLUT_DEVICE_KEY_REPEAT:
625 return fgState.KeyRepeat;
628 fgWarning( "glutDeviceGet(): missing enum handle %d", eWhat );
632 /* And now -- the failure. */
637 * This should return the current state of ALT, SHIFT and CTRL keys.
639 int FGAPIENTRY glutGetModifiers( void )
641 FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutGetModifiers" );
642 if( fgState.Modifiers == INVALID_MODIFIERS )
644 fgWarning( "glutGetModifiers() called outside an input callback" );
648 return fgState.Modifiers;
652 * Return the state of the GLUT API overlay subsystem. A misery ;-)
654 int FGAPIENTRY glutLayerGet( GLenum eWhat )
656 FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutLayerGet" );
659 * This is easy as layers are not implemented ;-)
661 * XXX Can we merge the UNIX/X11 and WIN32 sections? Or
662 * XXX is overlay support planned?
667 #if TARGET_HOST_POSIX_X11
669 case GLUT_OVERLAY_POSSIBLE:
672 case GLUT_LAYER_IN_USE:
675 case GLUT_HAS_OVERLAY:
678 case GLUT_TRANSPARENT_INDEX:
680 * Return just anything, which is always defined as zero
686 case GLUT_NORMAL_DAMAGED:
687 /* XXX Actually I do not know. Maybe. */
690 case GLUT_OVERLAY_DAMAGED:
693 #elif TARGET_HOST_MS_WINDOWS
695 case GLUT_OVERLAY_POSSIBLE:
696 /* return fgSetupPixelFormat( fgStructure.CurrentWindow, GL_TRUE,
697 PFD_OVERLAY_PLANE ); */
700 case GLUT_LAYER_IN_USE:
703 case GLUT_HAS_OVERLAY:
706 case GLUT_TRANSPARENT_INDEX:
708 * Return just anything, which is always defined as zero
714 case GLUT_NORMAL_DAMAGED:
715 /* XXX Actually I do not know. Maybe. */
718 case GLUT_OVERLAY_DAMAGED:
723 fgWarning( "glutLayerGet(): missing enum handle %d", eWhat );
727 /* And fail. That's good. Programs do love failing. */
731 int * FGAPIENTRY glutGetModeValues(GLenum eWhat, int * size)
735 #if TARGET_HOST_POSIX_X11
737 GLXFBConfig * fbconfigArray; /* Array of FBConfigs */
738 int fbconfigArraySize; /* Number of FBConfigs in the array */
739 int attribute_name = 0;
742 FREEGLUT_EXIT_IF_NOT_INITIALISED("glutGetModeValues");
749 #if TARGET_HOST_POSIX_X11
751 case GLUT_MULTISAMPLE:
753 attributes[0] = GLX_BUFFER_SIZE;
754 attributes[1] = GLX_DONT_CARE;
760 FBConfigs are now sorted by increasing number of auxiliary
761 buffers. We want at least one buffer.
763 attributes[2] = GLX_AUX_BUFFERS;
765 attributes[4] = None;
767 attribute_name = GLX_AUX_BUFFERS;
772 case GLUT_MULTISAMPLE:
773 attributes[2] = GLX_AUX_BUFFERS;
774 attributes[3] = GLX_DONT_CARE;
775 attributes[4] = GLX_SAMPLE_BUFFERS;
778 FBConfigs are now sorted by increasing number of samples per
779 pixel. We want at least one sample.
781 attributes[6] = GLX_SAMPLES;
783 attributes[8] = None;
785 attribute_name = GLX_SAMPLES;
790 fbconfigArray = glXChooseFBConfig(fgDisplay.Display,
795 if (fbconfigArray != NULL)
798 int result; /* Returned by glXGetFBConfigAttrib. Not checked. */
802 temp_array = malloc(sizeof(int) * fbconfigArraySize);
805 for (i = 0; i < fbconfigArraySize; i++)
809 result = glXGetFBConfigAttrib(fgDisplay.Display,
813 if (value > previous_value)
815 temp_array[*size] = value;
816 previous_value = value;
821 array = malloc(sizeof(int) * (*size));
822 for (i = 0; i < *size; i++)
824 array[i] = temp_array[i];
828 XFree(fbconfigArray);
841 /*** END OF FILE ***/