5void display_init(
struct tdisplay* d);
6void internalc_init(
struct tinternalc* ic);
7void resources_init(
struct tresources* t);
8void resources_clear(
struct tresources* t);
9void threads_init(
struct tthreads* t);
11#if !defined(FRONTEND_DOES_SNAPSHOTS)
12void Snapshot_init(
struct tSnapshot *);
15void EAI_C_CommonFunctions_init(
struct tEAI_C_CommonFunctions*);
16void EAIEventsIn_init(
struct tEAIEventsIn* t);
17void EAIHelpers_init(
struct tEAIHelpers* t);
19#if !defined(EXCLUDE_EAI)
20void EAICore_init(
struct tEAICore* t);
23void SensInterps_init(
struct tSensInterps *t);
24void ConsoleMessage_init(
struct tConsoleMessage *t);
25void Mainloop_init(
struct tMainloop *t);
26void Mainloop_clear(
struct tMainloop *t);
27void ProdCon_init(
struct tProdCon *t);
28void ProdCon_clear(
struct tProdCon *t);
30#if defined (INCLUDE_NON_WEB3D_FORMATS)
31void ColladaParser_init(
struct tColladaParser *t);
34#if defined (INCLUDE_STL_FILES)
35void STL_Handler_init (
struct tSTLHandler *t);
40void Frustum_init(
struct tFrustum *t);
41void LoadTextures_init(
struct tLoadTextures *t);
42void OpenGL_Utils_init(
struct tOpenGL_Utils *t);
43void OpenGL_Utils_clear(
struct tOpenGL_Utils *t);
45void OpenCL_Utils_init(
struct tOpenCL_Utils *t);
48void RenderTextures_init(
struct tRenderTextures *t);
49void Textures_init(
struct tTextures *t);
50void Textures_clear(
struct tTextures *t);
52void PluginSocket_init(
struct tPluginSocket *t);
53void pluginUtils_init(
struct tpluginUtils *t);
54void collision_init(
struct tcollision *t);
55void collision_clear(
struct tcollision *t);
56void Component_CubeMapTexturing_init(
struct tComponent_CubeMapTexturing *t);
57void Component_CubeMapTexturing_clear(
struct tComponent_CubeMapTexturing *t);
58void Component_Lighting_init(
struct tComponent_Lighting* t);
59void Component_Lighting_clear(
struct tComponent_Lighting* t);
60void Component_EnvironSensor_init(
struct tComponent_EnvironSensor *t);
61void Component_Geometry3D_init(
struct tComponent_Geometry3D *t);
62void Component_Geometry3D_clear(
struct tComponent_Geometry3D *t);
63void Component_Geospatial_init(
struct tComponent_Geospatial *t);
64void Component_Geospatial_clear(
struct tComponent_Geospatial *t);
65void Component_HAnim_init(
struct tComponent_HAnim *t);
66void Component_HAnim_clear(
struct tComponent_HAnim *t);
67void Component_Layering_init(
struct tComponent_Layering *t);
68void Component_Layout_init(
struct tComponent_Layout *t);
69void Component_NURBS_init(
struct tComponent_NURBS *t);
70void Component_ParticleSystems_init(
struct tComponent_ParticleSystems *t);
71void Component_ParticleSystems_clear(
struct tComponent_ParticleSystems *t);
72void Component_ProgrammableShaders_init(
struct tComponent_ProgrammableShaders *t);
73void Component_ProgrammableShaders_clear(
struct tComponent_ProgrammableShaders *t);
74void Component_PTM_init(
struct tComponent_PTM *t);
75void Component_PTM_clear(
struct tComponent_PTM *t);
76void Component_RigidBodyPhysics_init(
struct tComponent_RigidBodyPhysics *t);
77void Component_RigidBodyPhysics_clear(
struct tComponent_RigidBodyPhysics *t);
78void Component_Followers_init(
struct tComponent_Followers *t);
79void Component_Followers_clear(
struct tComponent_Followers *t);
80void Component_MIDI_init(
struct tComponent_MIDI* t);
81void Component_MIDI_clear(
struct tComponent_MIDI* t);
83void Component_KeyDevice_init(
struct tComponent_KeyDevice *t);
84void Component_TextureProjector_clear(
struct tComponent_TextureProjector *t);
85void Component_TextureProjector_init(
struct tComponent_TextureProjector *t);
88OLDCODEvoid Component_Networking_init(
struct tComponent_Networking *t);
91void Component_Picking_init(
struct tComponent_Picking *t);
92void Component_Rendering_init(
struct tComponent_Rendering *t);
93void Component_Rendering_clear(
struct tComponent_Rendering *t);
94void Component_Shape_init(
struct tComponent_Shape *t);
95void Component_Sound_init(
struct tComponent_Sound *t);
96void Component_Sound_clear(
struct tComponent_Sound *t);
97void Component_Text_init(
struct tComponent_Text *t);
98void Component_Text_clear(
struct tComponent_Text *t);
99void Component_Layering_clear(
struct tComponent_Layering *t);
100void Component_Layout_clear(
struct tComponent_Layout *t);
101void Component_VolumeRendering_init(
struct tComponent_VolumeRendering *t);
102void Component_VolumeRendering_clear(
struct tComponent_VolumeRendering *t);
103void Component_Grouping_init(
struct tComponent_Grouping *t);
104void Component_Grouping_clear(
struct tComponent_Grouping *t);
106void RenderFuncs_init(
struct tRenderFuncs *t);
107void RenderFuncs_clear(
struct tRenderFuncs *t);
108void StreamPoly_init(
struct tStreamPoly *t);
109void Tess_init(
struct tTess *t);
110void Viewer_init(
struct tViewer *t);
112#if defined(STATUSBAR_HUD)
113void statusbar_init(
struct tstatusbar *t);
114void statusbar_clear(
struct tstatusbar *t);
117void CParse_init(
struct tCParse *t);
118void CParse_clear(
struct tCParse *t);
119void CParseParser_init(
struct tCParseParser *t);
120void CRoutes_init(
struct tCRoutes *t);
121void CRoutes_clear(
struct tCRoutes *t);
122void CScripts_init(
struct tCScripts *t);
124void JScript_init(
struct tJScript *t);
127void jsUtils_init(
struct tjsUtils *t);
128void jsVRMLBrowser_init(
struct tjsVRMLBrowser *t);
129void jsVRMLClasses_init(
struct tjsVRMLClasses *t);
132void JScript_duk_init(
struct tJScript_duk *t);
134void Bindable_init(
struct tBindable *t);
135void Bindable_clear(
struct tBindable *t);
137void X3DParser_init(
struct tX3DParser *t);
138void X3DParser_clear(
struct tX3DParser *t);
139void gltf_loader_init(
struct tgltf_loader *t);
140void gltf_loader_clear(
struct tgltf_loader *t);
142void common_init(
struct tcommon *t);
143void common_clear(
struct tcommon *t);
144void CursorDraw_init(
struct tCursorDraw *t);
147static int done_main_UI_thread_once = 0;
148pthread_key_t threadSpecificKey;
150void iiglobal_sizeof_from_C(){
151printf(
"sizeof_iiblobal_fromC >>>>>>>>>>>>>>>>>>>>>>\n");
152printf(
" tdisplay %d\n", (
int)
sizeof(
struct tdisplay));
153printf(
" tinternalc %d\n", (
int)
sizeof(
struct tinternalc));
154printf(
" tresources %d\n", (
int)
sizeof(
struct tresources));
155printf(
" tresources %d\n", (
int)
sizeof(
struct tresources));
156printf(
" tthreads %d\n", (
int)
sizeof(
struct tthreads));
158#if !defined(FRONTEND_DOES_SNAPSHOTS)
159printf(
" tSnapshot %d\n", (
int)
sizeof(
struct tSnapshot));
162printf(
" tEAI_C_CommonFunctions %d\n", (
int)
sizeof(
struct tEAI_C_CommonFunctions));
163printf(
" tEAIEventsIn %d\n", (
int)
sizeof(
struct tEAIEventsIn));
164printf(
" tEAIHelpers %d\n", (
int)
sizeof(
struct tEAIHelpers));
166#if !defined(EXCLUDE_EAI )
167printf(
" tEAICore %d\n", (
int)
sizeof(
struct tEAICore));
170printf(
" tSensInterps %d\n", (
int)
sizeof(
struct tSensInterps));
171printf(
" tConsoleMessage %d\n", (
int)
sizeof(
struct tConsoleMessage));
172printf(
" tMainloop %d\n", (
int)
sizeof(
struct tMainloop));
173printf(
" tMainloop %d\n", (
int)
sizeof(
struct tMainloop));
174printf(
" tProdCon %d\n", (
int)
sizeof(
struct tProdCon));
175printf(
" tProdCon %d\n", (
int)
sizeof(
struct tProdCon));
177#if defined (INCLUDE_NON_WEB3D_FORMATS )
178printf(
" tColladaParser %d\n", (
int)
sizeof(
struct tColladaParser));
181#if defined (INCLUDE_STL_FILES )
182printf(
" tSTLHandler %d\n", (
int)
sizeof(
struct tSTLHandler));
187printf(
" tFrustum %d\n", (
int)
sizeof(
struct tFrustum));
188printf(
" tLoadTextures %d\n", (
int)
sizeof(
struct tLoadTextures));
189printf(
" tOpenGL_Utils %d\n", (
int)
sizeof(
struct tOpenGL_Utils));
192printf(
" tOpenCL_Utils %d\n", (
int)
sizeof(
struct tOpenCL_Utils));
195printf(
" tRenderTextures %d\n", (
int)
sizeof(
struct tRenderTextures));
196printf(
" tTextures %d\n", (
int)
sizeof(
struct tTextures));
197printf(
" tPluginSocket %d\n", (
int)
sizeof(
struct tPluginSocket));
198printf(
" tpluginUtils %d\n", (
int)
sizeof(
struct tpluginUtils));
199printf(
" tcollision %d\n", (
int)
sizeof(
struct tcollision));
200printf(
" tComponent_CubeMapTexturing %d\n", (
int)
sizeof(
struct tComponent_CubeMapTexturing));
201printf(
" tComponent_Lighting %d\n", (
int)
sizeof(
struct tComponent_Lighting));
202printf(
" tComponent_EnvironSensor %d\n", (
int)
sizeof(
struct tComponent_EnvironSensor));
203printf(
" tComponent_Geometry3D %d\n", (
int)
sizeof(
struct tComponent_Geometry3D));
204printf(
" tComponent_Geospatial %d\n", (
int)
sizeof(
struct tComponent_Geospatial));
205printf(
" tComponent_HAnim %d\n", (
int)
sizeof(
struct tComponent_HAnim));
206printf(
" tComponent_Layering %d\n", (
int)
sizeof(
struct tComponent_Layering));
207printf(
" tComponent_Layout %d\n", (
int)
sizeof(
struct tComponent_Layout));
208printf(
" tComponent_NURBS %d\n", (
int)
sizeof(
struct tComponent_NURBS));
209printf(
" tComponent_ParticleSystems %d\n", (
int)
sizeof(
struct tComponent_ParticleSystems));
210printf(
" tComponent_ProgrammableShaders %d\n", (
int)
sizeof(
struct tComponent_ProgrammableShaders));
211printf(
" tComponent_PTM %d\n",(
int)
sizeof(
struct tComponent_TextureProjector));
212printf(
" tComponent_RigidBodyPhysics %d\n", (
int)
sizeof(
struct tComponent_RigidBodyPhysics));
213printf(
" tComponent_Followers %d\n", (
int)
sizeof(
struct tComponent_Followers));
214printf(
" tComponent_KeyDevice %d\n", (
int)
sizeof(
struct tComponent_KeyDevice));
216printf(
" tComponent_Picking %d\n", (
int)
sizeof(
struct tComponent_Picking));
217printf(
" tComponent_Rendering %d\n", (
int)
sizeof(
struct tComponent_Rendering));
218printf(
" tComponent_Shape %d\n", (
int)
sizeof(
struct tComponent_Shape));
219printf(
" tComponent_Sound %d\n", (
int)
sizeof(
struct tComponent_Sound));
220printf(
" tComponent_Text %d\n", (
int)
sizeof(
struct tComponent_Text));
221printf(
" tComponent_VolumeRendering %d\n", (
int)
sizeof(
struct tComponent_VolumeRendering));
223printf(
" tRenderFuncs %d\n", (
int)
sizeof(
struct tRenderFuncs));
224printf(
" tStreamPoly %d\n", (
int)
sizeof(
struct tStreamPoly));
225printf(
" tTess %d\n", (
int)
sizeof(
struct tTess));
226printf(
" tViewer %d\n", (
int)
sizeof(
struct tViewer));
228#if defined(STATUSBAR_HUD)
229printf(
" tstatusbar %d\n", (
int)
sizeof(
struct tstatusbar));
232printf(
" tCParse %d\n", (
int)
sizeof(
struct tCParse));
233printf(
" tCParseParser %d\n", (
int)
sizeof(
struct tCParseParser));
234printf(
" tCRoutes %d\n", (
int)
sizeof(
struct tCRoutes));
235printf(
" tCScripts %d\n", (
int)
sizeof(
struct tCScripts));
237printf(
" tJScript %d\n", (
int)
sizeof(
struct tJScript));
240printf(
" tjsUtils %d\n", (
int)
sizeof(
struct tjsUtils));
241printf(
" tjsVRMLBrowser %d\n", (
int)
sizeof(
struct tjsVRMLBrowser));
242printf(
" tjsVRMLClasses %d\n", (
int)
sizeof(
struct tjsVRMLClasses));
245printf(
" tJScript_duk %d\n", (
int)
sizeof(
struct tJScript_duk));
247printf(
" tBindable %d\n", (
int)
sizeof(
struct tBindable));
249printf(
" tX3DParser %d\n", (
int)
sizeof(
struct tX3DParser));
251printf(
" tcommon %d\n", (
int)
sizeof(
struct tcommon));
252printf(
" tCursorDraw %d\n", (
int)
sizeof(
struct tCursorDraw));
253printf(
"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n");
257ttglobal iglobal_constructor()
270 ttglobal iglobal = MALLOCV(
sizeof(
struct iiglobal));
271 memset(iglobal,0,
sizeof(
struct iiglobal));
273 if(!done_main_UI_thread_once){
274 pthread_key_create(&threadSpecificKey, NULL);
275 done_main_UI_thread_once = 1;
277 fwl_setCurrentHandle(iglobal,__FILE__,__LINE__);
279#if defined(WRAP_MALLOC) || defined(DEBUG_MALLOC)
280 iglobal->__memTable_ShouldRegisterAllocation = TRUE;
281 freewrlInitMemTable();
285 display_init(&iglobal->display);
286 internalc_init(&iglobal->internalc);
287 resources_init(&iglobal->resources);
288 threads_init(&iglobal->threads);
291 #if !defined(FRONTEND_DOES_SNAPSHOTS)
292 Snapshot_init(&iglobal->Snapshot);
295 EAI_C_CommonFunctions_init(&iglobal->EAI_C_CommonFunctions);
296#if !defined(EXCLUDE_EAI)
297 EAIEventsIn_init(&iglobal->EAIEventsIn);
298 EAIHelpers_init(&iglobal->EAIHelpers);
299 EAICore_init(&iglobal->EAICore);
302 SensInterps_init(&iglobal->SensInterps);
303 ConsoleMessage_init(&iglobal->ConsoleMessage);
304 Mainloop_init(&iglobal->Mainloop);
305 ProdCon_init(&iglobal->ProdCon);
307#if defined (INCLUDE_NON_WEB3D_FORMATS)
308 ColladaParser_init(&iglobal->ColladaParser);
311#if defined (INCLUDE_STL_FILES)
312 STL_Handler_init (&iglobal->STLHandler);
315 Frustum_init(&iglobal->Frustum);
316 LoadTextures_init(&iglobal->LoadTextures);
317 OpenGL_Utils_init(&iglobal->OpenGL_Utils);
319 OpenCL_Utils_init(&iglobal->OpenCL_Utils);
323 RenderTextures_init(&iglobal->RenderTextures);
324 Textures_init(&iglobal->Textures);
325 Component_TextureProjector_init(&iglobal->Component_TextureProjector);
327#ifndef NO_PLUGINSOCKET
328 PluginSocket_init(&iglobal->PluginSocket);
330 pluginUtils_init(&iglobal->pluginUtils);
332 collision_init(&iglobal->collision);
333 Component_CubeMapTexturing_init(&iglobal->Component_CubeMapTexturing);
334 Component_Lighting_init(&iglobal->Component_Lighting);
335 Component_EnvironSensor_init(&iglobal->Component_EnvironSensor);
336 Component_Geometry3D_init(&iglobal->Component_Geometry3D);
337 Component_Geospatial_init(&iglobal->Component_Geospatial);
338 Component_HAnim_init(&iglobal->Component_HAnim);
339 Component_Layering_init(&iglobal->Component_Layering);
340 Component_Layout_init(&iglobal->Component_Layout);
341 Component_NURBS_init(&iglobal->Component_NURBS);
342 Component_ProgrammableShaders_init(&iglobal->Component_ProgrammableShaders);
343 Component_ParticleSystems_init(&iglobal->Component_ParticleSystems);
344 Component_RigidBodyPhysics_init(&iglobal->Component_RigidBodyPhysics);
345 Component_Followers_init(&iglobal->Component_Followers);
346 Component_KeyDevice_init(&iglobal->Component_KeyDevice);
348OLDCODE Component_Networking_init(&iglobal->Component_Networking);
350 Component_Picking_init(&iglobal->Component_Picking);
351 Component_Rendering_init(&iglobal->Component_Rendering);
352 Component_Shape_init(&iglobal->Component_Shape);
353 Component_Sound_init(&iglobal->Component_Sound);
354 Component_Text_init(&iglobal->Component_Text);
355 Component_VolumeRendering_init(&iglobal->Component_VolumeRendering);
356 Component_MIDI_init(&iglobal->Component_MIDI);
357 Component_Grouping_init(&iglobal->Component_Grouping);
359 RenderFuncs_init(&iglobal->RenderFuncs);
360 StreamPoly_init(&iglobal->StreamPoly);
361 Tess_init(&iglobal->Tess);
362 Viewer_init(&iglobal->Viewer);
363#if defined(STATUSBAR_HUD)
364 statusbar_init(&iglobal->statusbar);
366 CParse_init(&iglobal->CParse);
367 CParseParser_init(&iglobal->CParseParser);
368 CRoutes_init(&iglobal->CRoutes);
369 CScripts_init(&iglobal->CScripts);
371 JScript_init(&iglobal->JScript);
372 jsUtils_init(&iglobal->jsUtils);
373 jsVRMLBrowser_init(&iglobal->jsVRMLBrowser);
374 jsVRMLClasses_init(&iglobal->jsVRMLClasses);
377 JScript_duk_init(&iglobal->JScript_duk);
379 Bindable_init(&iglobal->Bindable);
380 X3DParser_init(&iglobal->X3DParser);
381 gltf_loader_init(&iglobal->gltf_loader);
382 common_init(&iglobal->common);
384 CursorDraw_init(&iglobal->CursorDraw);
389 if(!done_main_UI_thread_once){
390 pthread_key_create(&threadSpecificKey, NULL);
391 done_main_UI_thread_once = 1;
393 fwl_setCurrentHandle(iglobal,__FILE__,__LINE__);
398void __iglobal_fields_destructor(ttglobal tg);
399void remove_iglobal_from_table(ttglobal tg);
400void __iglobal_destructor(ttglobal tg);
402void iglobal_destructor(ttglobal tg)
404 __iglobal_fields_destructor(tg);
405 __iglobal_destructor(tg);
408void __iglobal_fields_destructor(ttglobal tg)
412 FREE_IF_NZ(tg->CursorDraw.prv);
413 common_clear(&tg->common); FREE_IF_NZ(tg->common.prv);
414 gltf_loader_clear(&tg->gltf_loader); FREE_IF_NZ(tg->gltf_loader.prv);
415 X3DParser_clear(&tg->X3DParser); FREE_IF_NZ(tg->X3DParser.prv);
416 Bindable_clear(&tg->Bindable); FREE_IF_NZ(tg->Bindable.prv);
419 FREE_IF_NZ(tg->JScript_duk.prv);
422 FREE_IF_NZ(tg->jsVRMLClasses.prv);
423 FREE_IF_NZ(tg->jsVRMLBrowser.prv);
424 FREE_IF_NZ(tg->jsUtils.prv);
426 FREE_IF_NZ(tg->JScript.prv);
428 FREE_IF_NZ(tg->CScripts.prv);
429 CRoutes_clear(&tg->CRoutes); FREE_IF_NZ(tg->CRoutes.prv);
430 FREE_IF_NZ(tg->CParseParser.prv);
431 CParse_clear(&tg->CParse); FREE_IF_NZ(tg->CParse.prv);
432#if defined(STATUSBAR_HUD)
433 statusbar_clear(&tg->statusbar);
435 FREE_IF_NZ(tg->statusbar.prv);
436 FREE_IF_NZ(tg->Viewer.prv);
437 FREE_IF_NZ(tg->Tess.prv);
438 Component_Grouping_clear(&tg->Component_Grouping); FREE_IF_NZ(tg->Component_Grouping.prv);
439 Component_MIDI_clear(&tg->Component_MIDI); FREE_IF_NZ(tg->Component_MIDI.prv);
440 Component_VolumeRendering_clear(&tg->Component_VolumeRendering); FREE_IF_NZ(tg->Component_VolumeRendering.prv);
441 FREE_IF_NZ(tg->StreamPoly.prv);
443 RenderFuncs_clear(&tg->RenderFuncs); FREE_IF_NZ(tg->RenderFuncs.prv);
444 Component_Text_clear(&tg->Component_Text); FREE_IF_NZ(tg->Component_Text.prv);
445 Component_Sound_clear(&tg->Component_Sound); FREE_IF_NZ(tg->Component_Sound.prv);
446 FREE_IF_NZ(tg->Component_Shape.prv);
447 Component_Rendering_clear(&tg->Component_Rendering); FREE_IF_NZ(tg->Component_Rendering.prv);
448 FREE_IF_NZ(tg->Component_Picking.prv);
450OLDCODE FREE_IF_NZ(tg->Component_Networking.prv);
452 FREE_IF_NZ(tg->Component_KeyDevice.prv);
453 Component_Followers_clear(&tg->Component_Followers); FREE_IF_NZ(tg->Component_Followers.prv);
454 Component_RigidBodyPhysics_clear(&tg->Component_RigidBodyPhysics); FREE_IF_NZ(tg->Component_RigidBodyPhysics.prv);
455 Component_ProgrammableShaders_clear(&tg->Component_ProgrammableShaders); FREE_IF_NZ(tg->Component_ProgrammableShaders.prv);
456 Component_ParticleSystems_clear(&tg->Component_ParticleSystems); FREE_IF_NZ(tg->Component_ParticleSystems.prv);
457 FREE_IF_NZ(tg->Component_NURBS.prv);
458 Component_Layering_clear(&tg->Component_Layering); FREE_IF_NZ(tg->Component_Layering.prv);
459 Component_Layout_clear(&tg->Component_Layout); FREE_IF_NZ(tg->Component_Layout.prv);
460 Component_HAnim_clear(&tg->Component_HAnim); FREE_IF_NZ(tg->Component_HAnim.prv);
461 Component_Geospatial_clear(&tg->Component_Geospatial); FREE_IF_NZ(tg->Component_Geospatial.prv);
462 Component_Geometry3D_clear(&tg->Component_Geometry3D); FREE_IF_NZ(tg->Component_Geometry3D.prv);
463 FREE_IF_NZ(tg->Component_EnvironSensor.prv);
464 Component_Lighting_clear(&tg->Component_Lighting); FREE_IF_NZ(tg->Component_Lighting.prv);
465 Component_CubeMapTexturing_clear(&tg->Component_CubeMapTexturing); FREE_IF_NZ(tg->Component_CubeMapTexturing.prv);
466 collision_clear(&tg->collision); FREE_IF_NZ(tg->collision.prv);
467 FREE_IF_NZ(tg->pluginUtils.prv);
468 FREE_IF_NZ(tg->PluginSocket.prv);
469 Component_TextureProjector_clear(&tg->Component_TextureProjector); FREE_IF_NZ(tg->Component_TextureProjector.prv);
470 Textures_clear(&tg->Textures); FREE_IF_NZ(tg->Textures.prv);
471 FREE_IF_NZ(tg->RenderTextures.prv);
473 OpenGL_Utils_clear(&tg->OpenGL_Utils); FREE_IF_NZ(tg->OpenGL_Utils.prv);
474 FREE_IF_NZ(tg->LoadTextures.prv);
475 FREE_IF_NZ(tg->Frustum.prv);
477#if defined (INCLUDE_NON_WEB3D_FORMATS)
478 FREE_IF_NZ(tg->ColladaParser.prv);
481#if defined (INCLUDE_STL_FILES)
482 FREE_IF_NZ(tg->STLHandler.prv);
485 ProdCon_clear(&tg->ProdCon); FREE_IF_NZ(tg->ProdCon.prv);
486 Mainloop_clear(&tg->Mainloop); FREE_IF_NZ(tg->Mainloop.prv);
487 FREE_IF_NZ(tg->ConsoleMessage.prv);
488 FREE_IF_NZ(tg->SensInterps.prv);
489 FREE_IF_NZ(tg->EAICore.prv);
490 FREE_IF_NZ(tg->EAIHelpers.prv);
491 FREE_IF_NZ(tg->EAIEventsIn.prv);
492 FREE_IF_NZ(tg->EAI_C_CommonFunctions.prv);
493 FREE_IF_NZ(tg->Snapshot.prv);
495 FREE_IF_NZ(tg->threads.prv);
496 resources_clear(&tg->resources); FREE_IF_NZ(tg->resources.prv);
497 FREE_IF_NZ(tg->internalc.prv);
498 FREE_IF_NZ(tg->display.prv);
501void __iglobal_destructor(ttglobal tg)
510 fwl_clearCurrentHandle();
516void *fwl_getCurrentHandle(
char *fi,
int li){
517 ttglobal currentHandle = (ttglobal)pthread_getspecific(threadSpecificKey);
518 return (
void*)currentHandle;
520int fwl_setCurrentHandle(
void *handle,
char *fi,
int li)
524 pthread_setspecific(threadSpecificKey,handle);
527void fwl_clearCurrentHandle()
529 void *currentHandle = NULL;
530 pthread_setspecific(threadSpecificKey,currentHandle);
536 if (done_main_UI_thread_once)
538 tg = (ttglobal)pthread_getspecific(threadSpecificKey);
541 printf(
"Ouch - no state for this thread -- hit a key to exit\n");
543 printf (
"more info - thread %p\n\n",(
void *)pthread_self().p);
545 printf (
"more info - thread %p\n\n",(
void *)pthread_self());
556 if (!done_main_UI_thread_once)
561 return (ttglobal)pthread_getspecific(threadSpecificKey);