| 1454 | // but isn't a fatal error in that can still fall back to the -Q loop. |
| 1455 | |
| 1456 | void PrintError(CONST char *sz) |
| 1457 | { |
| 1458 | #ifndef WIN |
| 1459 | AnsiColor(kRedA); |
| 1460 | fprintf(stderr, "%s: %s\n", szAppName, sz); |
| 1461 | AnsiColor(kDefault); |
| 1462 | Terminate(tcError); |
| 1463 | #else |
| 1464 | char szT[cchSzDef]; |
| 1465 | |
| 1466 | if (wi.fNoPopup) |
| 1467 | return; |
| 1468 | if (gs.nAnim > 0) { |
| 1469 | // Turn off animation to avoid continual error messages. |
| 1470 | neg(gs.nAnim); |
| 1471 | WiCheckMenu(cmdAnimateNo, fFalse); |
| 1472 | } |
| 1473 | sprintf(szT, "%s Error", szAppName); |
| 1474 | MessageBox(wi.hwndMain, sz, szT, MB_ICONEXCLAMATION); |
| 1475 | #endif |
| 1476 | } |
| 1477 | |
| 1478 | |
| 1479 | // Print error message for missing parameters to a command switch. |
no test coverage detected