Changeset 350 for trunk/dll/misc.c
- Timestamp:
- Jul 26, 2006, 9:01:20 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/misc.c
r245 r350 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2003, 200 5Steven H. Levine9 Copyright (c) 2003, 2006 Steven H. Levine 10 10 11 11 11 Jun 03 SHL Add JFS and FAT32 support … … 15 15 24 Jul 05 SHL Beautify 16 16 24 Jul 05 SHL Correct longname display option 17 17 Jul 06 SHL Use Runtime_Error 17 18 18 19 ***********************************************************************/ … … 21 22 #define INCL_WIN 22 23 #define INCL_GPI 23 24 24 #include <os2.h> 25 25 26 #include <stdarg.h> 26 27 #include <stdio.h> … … 29 30 #include <ctype.h> 30 31 #include <share.h> 32 31 33 #include "fm3dll.h" 32 34 #include "fm3dlg.h" … … 34 36 35 37 #pragma data_seg(DATA1) 38 39 static PSZ pszSrcFile = __FILE__; 40 36 41 #pragma alloc_text(MAINWND5,SetSysMenu) 37 42 #pragma alloc_text(MISC1,BoxWindow,PaintRecessedWindow,PostMsg,PaintSTextWindow) … … 165 170 len = WinQueryWindowTextLength(hwnd); 166 171 if (len) 167 s = malloc(len + 1);172 s = xmalloc(len + 1,pszSrcFile,__LINE__); 168 173 if (s) 169 174 { … … 756 761 else 757 762 ealen = sizeof(FEALIST) + 9; 758 if (!DosAllocMem((PPVOID) & pfealist, 759 ealen + 64L, 760 OBJ_TILE | PAG_COMMIT | PAG_READ | PAG_WRITE)) 761 { 763 rc = DosAllocMem((PPVOID) & pfealist,ealen + 64L, 764 OBJ_TILE | PAG_COMMIT | PAG_READ | PAG_WRITE); 765 if (rc) 766 Dos_Error(MB_CANCEL,rc,HWND_DESKTOP,pszSrcFile,__LINE__,GetPString(IDS_OUTOFMEMORY)); 767 else { 762 768 memset(pfealist, 0, ealen + 1); 763 769 pfealist -> cbList = ealen; … … 831 837 *p = 0; 832 838 bstrip(szData); 833 if (IsFullName(szData)) 839 if (!IsFullName(szData)) 840 Runtime_Error(pszSrcFile, __LINE__, "bad name"); 841 else 834 842 { 835 843 if (DosQueryPathInfo(szData, … … 853 861 return (MRESULT) FALSE; 854 862 } 855 if (!docopyf(MOVE, 856 szData, 857 "%s", 858 testname)) 859 { 860 863 if (docopyf(MOVE,szData,"%s",testname)) 864 Runtime_Error(pszSrcFile, __LINE__, "docopyf"); 865 else { 861 866 CHAR *filename; 862 867 863 filename = strdup(testname);868 filename = xstrdup(testname,pszSrcFile,__LINE__); 864 869 if (filename) 865 870 { … … 876 881 MPFROMLONG(-1), 877 882 MPFROMP(pci)); 878 filename = strdup(pci -> szFileName);883 filename = xstrdup(pci -> szFileName,pszSrcFile,__LINE__); 879 884 if (filename) 880 885 { … … 887 892 } 888 893 } 889 else890 DosBeep(100, 100);891 894 } 892 895 } 893 else894 DosBeep(250, 100);895 896 } 896 897 } … … 1447 1448 { 1448 1449 ULONG postcount; 1449 1450 if (!DosCreateEventSem(NULL, &CompactSem, 0L, FALSE)) 1450 APIRET rc; 1451 1452 rc = DosCreateEventSem(NULL, &CompactSem, 0L, FALSE); 1453 if (rc) 1454 Dos_Error(MB_CANCEL,rc,HWND_DESKTOP,pszSrcFile,__LINE__,"DosCreateEventSem"); 1455 else 1451 1456 { 1452 1457 priority_normal(); … … 1458 1463 DosResetEventSem(CompactSem, &postcount); 1459 1464 } 1460 }1461 else1462 {1463 DosBeep(250, 100);1464 DosBeep(1000, 100);1465 DosBeep(500, 100);1466 // DosExit(EXIT_PROCESS,1);1467 1465 } 1468 1466 } … … 2078 2076 *var = 0; 2079 2077 } 2080 fp = fopen(configsys, "r");2078 fp = xfopen(configsys, "r",pszSrcFile,__LINE__); 2081 2079 if (fp) 2082 2080 { … … 2118 2116 char *s = NULL; 2119 2117 2120 s = malloc(CCHMAXPATH);2118 s = xmalloc(CCHMAXPATH,pszSrcFile,__LINE__); 2121 2119 if (s) 2122 2120 { … … 2143 2141 char *s = NULL; 2144 2142 2145 s = malloc(CCHMAXPATH);2143 s = xmalloc(CCHMAXPATH,pszSrcFile,__LINE__); 2146 2144 if (s) 2147 2145 { … … 2163 2161 char *s = NULL; 2164 2162 2165 s = malloc(CCHMAXPATH * 2);2163 s = xmalloc(CCHMAXPATH * 2,pszSrcFile,__LINE__); 2166 2164 if (s) 2167 2165 { … … 2303 2301 (LONG) sizeof(SWENTRY); 2304 2302 /* Allocate memory for list */ 2305 if ((pswb = malloc((unsigned) ulSize)) != NULL)2306 {2303 pswb = xmalloc(ulSize,pszSrcFile,__LINE__); 2304 if (pswb) { 2307 2305 /* Put the info in the list */ 2308 2306 ulcEntries = WinQuerySwitchList(0, pswb,
Note:
See TracChangeset
for help on using the changeset viewer.