| 183 | } |
| 184 | |
| 185 | static void |
| 186 | replace_resource(Handle new_res, ResType its_type, short its_id, |
| 187 | Str255 its_name) |
| 188 | { |
| 189 | Handle old_res; |
| 190 | |
| 191 | SetResLoad(false); |
| 192 | old_res = Get1Resource(its_type, its_id); |
| 193 | SetResLoad(true); |
| 194 | if (old_res) { |
| 195 | RemoveResource(old_res); |
| 196 | DisposeHandle(old_res); |
| 197 | } |
| 198 | |
| 199 | AddResource(new_res, its_type, its_id, its_name); |
| 200 | } |
| 201 | |
| 202 | int |
| 203 | maccreat(const char *name, long fileType) |