| 282 | } |
| 283 | |
| 284 | static void |
| 285 | warmup() |
| 286 | { |
| 287 | short i; |
| 288 | |
| 289 | /* pre-System 7 MultiFinder hack for smooth launch */ |
| 290 | for (i = 0; i < 10; i++) { |
| 291 | if (WaitNextEvent(osMask, &wnEvt, 2L, (RgnHandle) 0L)) |
| 292 | if (((wnEvt.message & osEvtMessageMask) >> 24) |
| 293 | == suspendResumeMessage) |
| 294 | in.Front = (wnEvt.message & resumeFlag); |
| 295 | } |
| 296 | |
| 297 | #if 0 // ??? |
| 298 | /* clear out the Finder info */ |
| 299 | { |
| 300 | short message, count; |
| 301 | |
| 302 | CountAppFiles(&message, &count); |
| 303 | while(count) |
| 304 | ClrAppFiles(count--); |
| 305 | } |
| 306 | #endif |
| 307 | |
| 308 | /* fill out the notification template */ |
| 309 | nmt.nmr.qType = nmType; |
| 310 | nmt.nmr.nmMark = 1; |
| 311 | nmt.nmr.nmSound = (Handle) -1L; /* system beep */ |
| 312 | nmt.nmr.nmStr = nmt.nmBuf; |
| 313 | nmt.nmr.nmResp = nmCompletionUPP; |
| 314 | nmt.nmr.nmPending = (long) &in.Notify; |
| 315 | |
| 316 | #if 1 |
| 317 | { |
| 318 | /* get the app name */ |
| 319 | ProcessInfoRec info; |
| 320 | ProcessSerialNumber psn; |
| 321 | |
| 322 | info.processInfoLength = sizeof(info); |
| 323 | info.processName = nmt.nmBuf; |
| 324 | info.processAppSpec = NULL; |
| 325 | GetCurrentProcess(&psn); |
| 326 | GetProcessInformation(&psn, &info); |
| 327 | } |
| 328 | #else |
| 329 | /* prepend app name (31 chars or less) to notification buffer */ |
| 330 | { |
| 331 | short apRefNum; |
| 332 | Handle apParams; |
| 333 | |
| 334 | GetAppParms(*(Str255 *) &nmt.nmBuf, &apRefNum, &apParams); |
| 335 | } |
| 336 | #endif |
| 337 | |
| 338 | /* add formatting (two line returns) */ |
| 339 | nmt.nmBuf[++(nmt.nmBuf[0])] = '\r'; |
| 340 | nmt.nmBuf[++(nmt.nmBuf[0])] = '\r'; |
| 341 |
no test coverage detected