| 168 | } |
| 169 | |
| 170 | inline FONTFILE OPEN_FONT(char *filename, bool &success) { |
| 171 | FONTFILE fp; |
| 172 | int file_id; |
| 173 | |
| 174 | success = false; |
| 175 | fp = (FONTFILE)cfopen(filename, "rb"); |
| 176 | if (!fp) |
| 177 | return NULL; |
| 178 | |
| 179 | file_id = READ_FONT_INT(fp); |
| 180 | if (file_id != 0xfeedbaba) |
| 181 | return (FONTFILE)(-1); |
| 182 | |
| 183 | success = true; |
| 184 | return fp; |
| 185 | } |
| 186 | |
| 187 | inline void CLOSE_FONT(FONTFILE ffile) { cfclose(ffile); } |
| 188 |
no test coverage detected