MCPcopy Create free account
hub / github.com/NetHack/NetHack / finder_file_request

Function finder_file_request

outdated/sys/mac/macmain.c:243–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243static void
244finder_file_request(void)
245{
246 if (macFlags.hasAE) {
247 /* we're capable of handling Apple Events, so let's see if we have any
248 */
249 EventRecord event;
250 long toWhen = TickCount()
251 + 20; /* wait a third of a second for all initial AE */
252
253 while (TickCount() < toWhen) {
254 if (WaitNextEvent(highLevelEventMask, &event, 3L, 0)) {
255 AEProcessAppleEvent(&event);
256 if (macFlags.gotOpen)
257 break;
258 }
259 }
260 }
261#if 0
262#ifdef MAC68K
263 else {
264 short finder_msg, file_count;
265 CountAppFiles(&finder_msg, &file_count);
266 if (finder_msg == appOpen && file_count == 1) {
267 OSErr err;
268 AppFile src;
269 FSSpec filespec;
270
271 GetAppFiles(1, &src);
272 err = FSMakeFSSpec(src.vRefNum, 0, src.fName, &filespec);
273 if (err == noErr && src.fType == SAVE_TYPE) {
274 process_openfile (filespec.vRefNum, filespec.parID, filespec.name, src.fType);
275 if (macFlags.gotOpen)
276 ClrAppFiles(1);
277 }
278 }
279 }
280#endif /* MAC68K */
281#endif /* 0 */
282}
283
284/* validate wizard mode if player has requested access to it */
285boolean

Callers 1

mainFunction · 0.85

Calls 1

process_openfileFunction · 0.85

Tested by

no test coverage detected