MCPcopy Create free account
hub / github.com/DentonW/DevIL / iEnlargeStack

Function iEnlargeStack

DevIL/src-IL/src/il_stack.cpp:581–600  ·  view source on GitHub ↗

Internal function to enlarge the image stack by I_STACK_INCREMENT members.

Source from the content-addressed store, hash-verified

579
580// Internal function to enlarge the image stack by I_STACK_INCREMENT members.
581ILboolean iEnlargeStack()
582{
583 // 02-05-2001: Moved from ilGenImages().
584 // Puts the cleanup function on the exit handler once.
585 if (!OnExit) {
586 #ifdef _MEM_DEBUG
587 AddToAtexit(); // So iFreeMem doesn't get called after unfreed information.
588 #endif//_MEM_DEBUG
589#if (!defined(_WIN32_WCE)) && (!defined(IL_STATIC_LIB))
590 atexit(ilShutDownInternal);
591#endif
592 OnExit = IL_TRUE;
593 }
594
595 if (!(ImageStack = (ILimage**)ilRecalloc(ImageStack, StackSize * sizeof(ILimage*), (StackSize + I_STACK_INCREMENT) * sizeof(ILimage*)))) {
596 return IL_FALSE;
597 }
598 StackSize += I_STACK_INCREMENT;
599 return IL_TRUE;
600}
601
602
603static ILboolean IsInit = IL_FALSE;

Callers 4

ILAPIENTRY ilGenImagesFunction · 0.85
ILAPIENTRY ilBindImageFunction · 0.85
iSetImage0Function · 0.85
iBindImageTempFunction · 0.85

Calls 1

AddToAtexitFunction · 0.85

Tested by

no test coverage detected