| 65 | } |
| 66 | |
| 67 | static int |
| 68 | OpenHandleFile(const unsigned char *name, long fileType) |
| 69 | { |
| 70 | int i; |
| 71 | Handle h; |
| 72 | Str255 s; |
| 73 | |
| 74 | for (i = 0; i < MAX_HF; i++) { |
| 75 | if (theHandleFiles[i].data == 0L) |
| 76 | break; |
| 77 | } |
| 78 | |
| 79 | if (i >= MAX_HF) |
| 80 | return -1; |
| 81 | |
| 82 | h = GetNamedResource(fileType, name); |
| 83 | if (!h) |
| 84 | return (-1); |
| 85 | |
| 86 | theHandleFiles[i].data = h; |
| 87 | theHandleFiles[i].size = GetHandleSize(h); |
| 88 | GetResInfo(h, &theHandleFiles[i].id, (void *) &theHandleFiles[i].type, s); |
| 89 | theHandleFiles[i].mark = 0L; |
| 90 | |
| 91 | return (i + FIRST_HF); |
| 92 | } |
| 93 | |
| 94 | static int |
| 95 | CloseHandleFile(int fd) |
no outgoing calls
no test coverage detected