diff options
author | Ben Campbell <ben@scumways.com> | 2016-12-07 11:13:27 +1300 |
---|---|---|
committer | Ben Campbell <ben@scumways.com> | 2016-12-19 10:09:22 +1300 |
commit | 09efad5474ab07e2f6786eb518be417404384c2f (patch) | |
tree | e95b104a3e3a4ef772c5d1c9facd168db5b70295 | |
parent | 5a8c51d320e4c9ad274f1135be63483265c64dd5 (diff) | |
download | devil-09efad5474ab07e2f6786eb518be417404384c2f.tar.gz |
tighten up scoping of some stack.c vars and fns
clarifing which things are global to whole lib, and which
are private to stack.c
-rw-r--r-- | DevIL/src-IL/include/il_stack.h | 15 | ||||
-rw-r--r-- | DevIL/src-IL/src/il_stack.c | 14 |
2 files changed, 16 insertions, 13 deletions
diff --git a/DevIL/src-IL/include/il_stack.h b/DevIL/src-IL/include/il_stack.h index 5e4a214f..c5fb0f3f 100644 --- a/DevIL/src-IL/include/il_stack.h +++ b/DevIL/src-IL/include/il_stack.h @@ -26,18 +26,7 @@ typedef struct iFree } iFree; -// Internal functions -ILboolean iEnlargeStack(void); -void iFreeMem(void); - -// Globals for il_stack.c -ILuint StackSize = 0; -ILuint LastUsed = 0; -ILuint CurName = 0; -ILimage **ImageStack = NULL; -iFree *FreeNames = NULL; -ILboolean OnExit = IL_FALSE; -ILboolean ParentImage = IL_TRUE; - +// the currently-bound image +extern ILuint CurName; #endif//IMAGESTACK_H diff --git a/DevIL/src-IL/src/il_stack.c b/DevIL/src-IL/src/il_stack.c index 3d36c81e..b10fd149 100644 --- a/DevIL/src-IL/src/il_stack.c +++ b/DevIL/src-IL/src/il_stack.c @@ -17,6 +17,20 @@ #include "il_internal.h" #include "il_stack.h" +ILuint CurName = 0; + +// Internal functions +static ILboolean iEnlargeStack(); + + +static ILuint StackSize = 0; +static ILuint LastUsed = 0; +static ILimage **ImageStack = NULL; +static iFree *FreeNames = NULL; +static ILboolean OnExit = IL_FALSE; +static ILboolean ParentImage = IL_TRUE; + + //! Creates Num images and puts their index in Images - similar to glGenTextures(). void ILAPIENTRY ilGenImages(ILsizei Num, ILuint *Images) { |