Internal function used to check if the HEADER is a valid .sgi header. */
| 110 | |
| 111 | /* Internal function used to check if the HEADER is a valid .sgi header. */ |
| 112 | ILboolean iCheckSgi(iSgiHeader *Header) |
| 113 | { |
| 114 | if (Header->MagicNum != SGI_MAGICNUM) |
| 115 | return IL_FALSE; |
| 116 | if (Header->Storage != SGI_RLE && Header->Storage != SGI_VERBATIM) |
| 117 | return IL_FALSE; |
| 118 | if (Header->Bpc == 0 || Header->Dim == 0) |
| 119 | return IL_FALSE; |
| 120 | if (Header->XSize == 0 || Header->YSize == 0 || Header->ZSize == 0) |
| 121 | return IL_FALSE; |
| 122 | |
| 123 | return IL_TRUE; |
| 124 | } |
| 125 | |
| 126 | /*----------------------------------------------------------------------------*/ |
| 127 |
no outgoing calls
no test coverage detected