Returns format-specific strings, truncated to MaxLen (not counting the terminating NULL).
| 173 | |
| 174 | // Returns format-specific strings, truncated to MaxLen (not counting the terminating NULL). |
| 175 | char *iGetString(ILenum StringName) |
| 176 | { |
| 177 | switch (StringName) |
| 178 | { |
| 179 | case IL_TGA_ID_STRING: |
| 180 | return iClipString(ilStates[ilCurrentPos].ilTgaId, 254); |
| 181 | case IL_TGA_AUTHNAME_STRING: |
| 182 | return iClipString(ilStates[ilCurrentPos].ilTgaAuthName, 40); |
| 183 | case IL_TGA_AUTHCOMMENT_STRING: |
| 184 | return iClipString(ilStates[ilCurrentPos].ilTgaAuthComment, 80); |
| 185 | case IL_PNG_AUTHNAME_STRING: |
| 186 | return iClipString(ilStates[ilCurrentPos].ilPngAuthName, 255); |
| 187 | case IL_PNG_TITLE_STRING: |
| 188 | return iClipString(ilStates[ilCurrentPos].ilPngTitle, 255); |
| 189 | case IL_PNG_DESCRIPTION_STRING: |
| 190 | return iClipString(ilStates[ilCurrentPos].ilPngDescription, 255); |
| 191 | |
| 192 | //changed 2003-08-31...here was a serious copy and paste bug ;-) |
| 193 | case IL_TIF_DESCRIPTION_STRING: |
| 194 | return iClipString(ilStates[ilCurrentPos].ilTifDescription, 255); |
| 195 | case IL_TIF_HOSTCOMPUTER_STRING: |
| 196 | return iClipString(ilStates[ilCurrentPos].ilTifHostComputer, 255); |
| 197 | case IL_TIF_DOCUMENTNAME_STRING: |
| 198 | return iClipString(ilStates[ilCurrentPos].ilTifDocumentName, 255); |
| 199 | case IL_TIF_AUTHNAME_STRING: |
| 200 | return iClipString(ilStates[ilCurrentPos].ilTifAuthName, 255); |
| 201 | case IL_CHEAD_HEADER_STRING: |
| 202 | return iClipString(ilStates[ilCurrentPos].ilCHeader, 32); |
| 203 | default: |
| 204 | ilSetError(IL_INVALID_ENUM); |
| 205 | } |
| 206 | return NULL; |
| 207 | } |
| 208 | |
| 209 | |
| 210 | //! Enables a mode |
no test coverage detected