Internal function to enlarge the image stack by I_STACK_INCREMENT members.
| 579 | |
| 580 | // Internal function to enlarge the image stack by I_STACK_INCREMENT members. |
| 581 | ILboolean 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 | |
| 603 | static ILboolean IsInit = IL_FALSE; |
no test coverage detected