Changeset 1544 for trunk/dll/wrappers.c
- Timestamp:
- Sep 30, 2010, 3:00:59 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/dll/wrappers.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/wrappers.c
r1476 r1544 370 370 } 371 371 372 /** 373 * Wrapper for fopen it works around DosOpenL's failure to 374 * thunk properly so that fm2 can be loaded in high memory 375 * It also gives the option of reporting file open errors 376 * If fSilent is TRUE it fails silently; if FALSE it produces a 377 * runtime error dialog. Note pszMode must be passed on the stack 378 * to xfopen to avoid the thunking problem. 379 */ 380 372 381 FILE *xfopen(PCSZ pszFileName, PCSZ pszMode, PCSZ pszSrcFile, 373 UINT uiLineNumber) 374 { 375 FILE *fp = fopen(pszFileName, pszMode); 376 377 if (!fp) 382 UINT uiLineNumber, BOOL fSilent) 383 { 384 CHAR FileName[CCHMAXPATH]; 385 FILE *fp; 386 387 strcpy(FileName, pszFileName); 388 fp = fopen(FileName, pszMode); 389 390 if (!fp && !fSilent) 378 391 Runtime_Error(pszSrcFile, uiLineNumber, "fopen"); 379 392 return fp; 380 393 } 381 394 395 /** 396 * Wrapper for _fsopen it works around DosOpenL's failure to 397 * thunk properly so that fm2 can be loaded in high memory 398 * It also gives the option of reporting file open errors 399 * If fSilent is TRUE it fails silently; if FALSE it produces a 400 * runtime error dialog. Note pszMode must be passed on the stack 401 * to xfopen to avoid the thunking problem 402 */ 403 382 404 FILE *xfsopen(PCSZ pszFileName, PCSZ pszMode, INT fSharemode, PCSZ pszSrcFile, 383 UINT uiLineNumber) 384 { 385 FILE *fp = _fsopen(pszFileName, pszMode, fSharemode); 386 387 if (!fp) 405 UINT uiLineNumber, BOOL fSilent) 406 { 407 CHAR FileName[CCHMAXPATH]; 408 FILE *fp; 409 410 strcpy(FileName, pszFileName); 411 fp = _fsopen(FileName, pszMode, fSharemode); 412 413 if (!fp && !fSilent) 388 414 Runtime_Error(pszSrcFile, uiLineNumber, "_fsopen"); 389 415 return fp;
Note:
See TracChangeset
for help on using the changeset viewer.
