MCPcopy Create free account
hub / github.com/DentonW/DevIL / ILAPIENTRY ilRemoveSave

Function ILAPIENTRY ilRemoveSave

DevIL/src-IL/src/il_register.cpp:123–148  ·  view source on GitHub ↗

Unregisters a save extension - doesn't have to be called.

Source from the content-addressed store, hash-verified

121
122//! Unregisters a save extension - doesn't have to be called.
123ILboolean ILAPIENTRY ilRemoveSave(ILconst_string Ext)
124{
125 iFormatS *TempNode = SaveProcs, *PrevNode = NULL;
126
127 while (TempNode != NULL) {
128 if (!iStrCmp(Ext, TempNode->Ext)) {
129 if (PrevNode == NULL) { // first node in the list
130 SaveProcs = TempNode->Next;
131 ifree((void*)TempNode->Ext);
132 ifree(TempNode);
133 }
134 else {
135 PrevNode->Next = TempNode->Next;
136 ifree((void*)TempNode->Ext);
137 ifree(TempNode);
138 }
139
140 return IL_TRUE;
141 }
142
143 PrevNode = TempNode;
144 TempNode = TempNode->Next;
145 }
146
147 return IL_FALSE;
148}
149
150
151// Automatically removes all registered formats.

Callers

nothing calls this directly

Calls 1

iStrCmpFunction · 0.85

Tested by

no test coverage detected