Changeset 616 for trunk/dll/error.c
- Timestamp:
- Apr 20, 2007, 8:53:00 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/error.c
r614 r616 22 22 07 Jan 07 GKY Move error strings etc. to string file 23 23 18 Apr 07 SHL showMsg: correct selective logging checks 24 19 Apr 07 SHL Add DbgMsg 25 20 Apr 07 SHL Correct IDS_GENERR1TEXT formatting 24 26 25 27 ***********************************************************************/ … … 58 60 59 61 if (hwndErr == NULLHANDLE) 60 hab = (HAB) 62 hab = (HAB)0; 61 63 else 62 64 hab = WinQueryAnchorBlock(hwndErr); … … 78 80 // Append file name and line number 79 81 sprintf(szMsg + strlen(szMsg), 80 GetPString(IDS_GENERR1TEXT), pszFileName, ulLineNo , " ");82 GetPString(IDS_GENERR1TEXT), pszFileName, ulLineNo); 81 83 82 84 // Get last PM error for the current thread … … 274 276 //=== showMsg: display error popup === 275 277 276 static APIRET showMsg(ULONG mb_type, HWND hwnd , PCSZ pszTitle, PCSZ pszMsg, BOOL wantLog)278 static APIRET showMsg(ULONG mb_type, HWND hwndOwner, PCSZ pszTitle, PCSZ pszMsg, BOOL wantLog) 277 279 { 278 280 if (wantLog) { … … 283 285 } 284 286 285 if (!hwnd )286 hwnd = HWND_DESKTOP;287 if (!hwndOwner) 288 hwndOwner = HWND_DESKTOP; 287 289 288 290 DosBeep(250, 100); 289 291 290 292 return WinMessageBox(HWND_DESKTOP, // Parent 291 hwnd , // Owner293 hwndOwner, 292 294 (PSZ) pszMsg, (PSZ) pszTitle, 0, // help id 293 295 mb_type | MB_MOVEABLE); 294 296 } // showMsg 297 298 //=== DbgMsg: output debug message stderr === 299 300 VOID DbgMsg(PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...) 301 { 302 va_list va; 303 304 // OK for source file name to be null 305 fprintf(stderr, "%s %u", pszSrcFile ? pszSrcFile : "n/a", uSrcLineNo); 306 // If format null want just file and line 307 if (pszFmt) { 308 fputc(' ', stderr); 309 va_start(va, pszFmt); 310 vfprintf(stderr, pszFmt, va); 311 va_end(va); 312 } 313 fputc('\n', stderr); 314 fflush(stderr); 315 316 } // DbgMsg 317
Note:
See TracChangeset
for help on using the changeset viewer.