Changeset 1038
- Timestamp:
- Jul 4, 2008, 10:33:59 PM (17 years ago)
- Location:
- trunk/dll
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/arccnrs.c
r1037 r1038 337 337 psz = pai->pszFileName; 338 338 pai->pszFileName = NullStr; 339 free(psz); 339 340 # ifdef FORTIFY 340 xfree(psz, pszSrcFile, __LINE__); 341 # else 342 free(psz); 343 # endif 344 # ifdef FORTIFY 345 Fortify_LeaveScope(pszSrcFile, __LINE__); 341 Fortify_LeaveScope(); 346 342 # endif 347 343 } -
trunk/dll/autoview.c
r1036 r1038 638 638 hab2 = WinInitialize(0); 639 639 if (hab2) { 640 # ifdef FORTIFY 641 Fortify_EnterScope(); 642 # endif 640 643 hmq2 = WinCreateMsgQueue(hab2, 128); 641 644 if (hmq2) { … … 659 662 } 660 663 else { 661 # ifdef FORTIFY662 Fortify_EnterScope();663 # endif664 664 WinSetWindowULong(hwndAutoObj, QWL_USER, hwndParent); 665 665 priority_normal(); … … 674 674 WinTerminate(hab2); 675 675 # ifdef FORTIFY 676 Fortify_LeaveScope( pszSrcFile, __LINE__);676 Fortify_LeaveScope(); 677 677 # endif 678 678 } -
trunk/dll/comp.c
r1036 r1038 201 201 hab2 = WinInitialize(0); 202 202 if (hab2) { 203 hmq2 = WinCreateMsgQueue(hab2, 0);204 if (hmq2) {205 203 # ifdef FORTIFY 206 204 Fortify_EnterScope(); 207 205 # endif 206 hmq2 = WinCreateMsgQueue(hab2, 0); 207 if (hmq2) { 208 208 WinCancelShutdown(hmq2, TRUE); 209 209 IncrThreadUsage(); … … 316 316 WinTerminate(hab2); 317 317 # ifdef FORTIFY 318 Fortify_LeaveScope( pszSrcFile, __LINE__);318 Fortify_LeaveScope(); 319 319 # endif 320 320 } … … 408 408 hab = WinInitialize(0); 409 409 if (hab) { 410 hmq = WinCreateMsgQueue(hab, 0);411 if (hmq) {412 410 # ifdef FORTIFY 413 411 Fortify_EnterScope(); 414 412 # endif 413 hmq = WinCreateMsgQueue(hab, 0); 414 if (hmq) { 415 415 WinCancelShutdown(hmq, TRUE); 416 416 IncrThreadUsage(); … … 694 694 WinTerminate(hab); 695 695 # ifdef FORTIFY 696 Fortify_LeaveScope( pszSrcFile, __LINE__);696 Fortify_LeaveScope(); 697 697 # endif 698 698 } … … 720 720 hab = WinInitialize(0); 721 721 if (hab) { 722 hmq = WinCreateMsgQueue(hab, 0);723 if (hmq) {724 722 # ifdef FORTIFY 725 723 Fortify_EnterScope(); 726 724 # endif 725 hmq = WinCreateMsgQueue(hab, 0); 726 if (hmq) { 727 727 WinCancelShutdown(hmq, TRUE); 728 728 IncrThreadUsage(); … … 759 759 WinTerminate(hab); 760 760 # ifdef FORTIFY 761 Fortify_LeaveScope( pszSrcFile, __LINE__);761 Fortify_LeaveScope(); 762 762 # endif 763 763 } … … 1955 1955 1956 1956 if (x <= 0) { 1957 # ifdef FORTIFY1958 xfree(filesl[l++], pszSrcFile, __LINE__);1959 # else1960 1957 free(filesl[l++]); // Done with item on left 1961 # endif1962 1958 } 1963 1959 if (x >= 0) { 1964 # ifdef FORTIFY1965 xfree(filesr[r++], pszSrcFile, __LINE__);1966 # else1967 1960 free(filesr[r++]); // Done with item on right 1968 #endif1969 1961 } 1970 1962 // Ensure empty buffers point somewhere … … 2017 2009 if (filesl) { 2018 2010 for(; filesl[l]; l++) { 2019 # ifdef FORTIFY2020 xfree(filesl[l], pszSrcFile, __LINE__);2021 # else2022 2011 free(filesl[l]); 2023 # endif2024 2012 } 2025 2013 } … … 2033 2021 if (filesr) { 2034 2022 for (; filesr[r]; r++) { 2035 # ifdef FORTIFY2036 xfree(filesr[r], pszSrcFile, __LINE__);2037 # else2038 2023 free(filesr[r]); 2039 # endif2040 2024 } 2041 2025 } … … 2117 2101 2118 2102 # ifdef FORTIFY 2119 Fortify_LeaveScope( pszSrcFile, __LINE__);2103 Fortify_LeaveScope(); 2120 2104 # endif 2121 2105 -
trunk/dll/datamin.c
r1009 r1038 42 42 #include "strutil.h" // GetPString 43 43 #include "fm3dll.h" 44 #include "fortify.h" 44 45 45 46 #pragma data_seg(DATA2) … … 981 982 USHORT id; 982 983 984 # ifdef FORTIFY 985 Fortify_EnterScope(); 986 # endif 983 987 if (G_hevDataMin == NULLHANDLE) { 984 988 // Create just once for any thread that might use it … … 1074 1078 if (hab != NULLHANDLE) 1075 1079 WinTerminate(hab); 1076 1080 # ifdef FORTIFY 1081 Fortify_LeaveScope(); 1082 # endif 1077 1083 } // dataminThread 1078 1084 -
trunk/dll/dircnrs.c
r1037 r1038 2476 2476 LISTINFO *li; 2477 2477 ULONG action = UM_ACTION; 2478 # ifdef FORTIFY2479 Fortify_EnterScope();2480 # endif2481 2478 li = xmallocz(sizeof(LISTINFO), pszSrcFile, __LINE__); 2482 2479 if (li) { … … 2567 2564 else 2568 2565 xfree(li, pszSrcFile, __LINE__); 2569 # ifdef FORTIFY2570 Fortify_LeaveScope();2571 # endif2572 2566 } 2573 2567 } … … 3363 3357 FreeList(dcd->lastselection); 3364 3358 xfree(dcd, pszSrcFile, __LINE__); 3365 # ifdef FORTIFY3366 Fortify_LeaveScope(pszSrcFile, __LINE__);3367 # endif3368 3359 WinSetWindowPtr(hwnd, QWL_USER, NULL); 3369 3360 DosPostEventSem(CompactSem); -
trunk/dll/dirsize.c
r1036 r1038 463 463 464 464 xfree(dirsize, pszSrcFile, __LINE__); 465 # ifdef FORTIFY466 //Fortify_LeaveScope(pszSrcFile, __LINE__);467 # endif468 465 PostMsg(WinQueryWindow(hwndCnr, QW_PARENT), 469 466 UM_CONTAINER_FILLED, MPVOID, MPVOID); 467 # ifdef FORTIFY 468 Fortify_LeaveScope(); 469 # endif 470 470 } 471 471 -
trunk/dll/filldir.c
r1032 r1038 1585 1585 psz = pci->pszSubject; 1586 1586 pci->pszSubject = NullStr; 1587 # ifdef FORTIFY1588 xfree(psz, pszSrcFile, __LINE__);1589 # else1590 1587 free(psz); 1591 # endif1592 1588 } 1593 1589 … … 1600 1596 psz = pci->pszLongName; 1601 1597 pci->pszLongName = NullStr; 1602 # ifdef FORTIFY1603 xfree(psz, pszSrcFile, __LINE__);1604 # else1605 1598 free(psz); 1606 # endif1607 1599 } 1608 1600 … … 1610 1602 psz = pci->pszFileName; 1611 1603 pci->pszFileName = NullStr; 1612 # ifdef FORTIFY1613 xfree(psz, pszSrcFile, __LINE__);1614 # else1615 1604 free(psz); 1616 # endif1617 1605 } 1618 1606 … … 1620 1608 psz = pci->pszFmtFileSize; 1621 1609 pci->pszFmtFileSize = NullStr; 1622 # ifdef FORTIFY1623 xfree(psz, pszSrcFile, __LINE__);1624 # else1625 1610 free(psz); 1626 # endif1627 1611 } 1628 1612 } -
trunk/dll/grep.c
r1032 r1038 276 276 } 277 277 278 # ifdef FORTIFY 279 Fortify_EnterScope(); 280 # endif 278 281 grep = *(GREP *)arg; 279 282 *grep.stopflag = 0; // reset thread-killing flag … … 288 291 WinCancelShutdown(ghmq, TRUE); 289 292 IncrThreadUsage(); 290 # ifdef FORTIFY291 Fortify_EnterScope();292 # endif293 293 // DosSleep(100); //05 Aug 07 GKY 128 // 07 Feb 08 SHL 294 294 // hwndStatus does not exist for applet … … 412 412 FreeDupes(&grep); 413 413 if (grep.numlines && grep.matched) { 414 # ifdef FORTIFY415 xfree(grep.matched, pszSrcFile, __LINE__);416 # else417 414 free(grep.matched); 418 # endif419 415 } 420 416 // 07 Feb 08 SHL fixme to free grep here when not static … … 663 659 if (grep->insertffb) { 664 660 for (x = 0; grep->insertffb[x]; x++) { 665 # ifdef FORTIFY666 xfree(grep->insertffb[x], pszSrcFile, __LINE__);667 # else668 661 free(grep->insertffb[x]); 669 #endif670 662 } 671 663 xfree(grep->insertffb, pszSrcFile, __LINE__); … … 673 665 if (grep->dir) { 674 666 for (x = 0; grep->dir[x]; x++) { 675 # ifdef FORTIFY676 xfree(grep->dir[x], pszSrcFile, __LINE__);677 # else678 667 free(grep->dir[x]); 679 # endif680 668 } 681 669 xfree(grep->dir, pszSrcFile, __LINE__); … … 1163 1151 next = i->next; 1164 1152 if (i->name) { 1165 # ifdef FORTIFY1166 xfree(i->name, pszSrcFile, __LINE__);1167 # else1168 1153 free(i->name); 1169 # endif 1170 } 1171 # ifdef FORTIFY 1172 xfree(i, pszSrcFile, __LINE__); 1173 # else 1154 } 1174 1155 free(i); 1175 # endif1176 1156 i = next; 1177 1157 } -
trunk/dll/inis.c
r1014 r1038 47 47 #include "strutil.h" // GetPString 48 48 #include "fm3dll.h" 49 #include "fortify.h" 49 50 50 51 #pragma data_seg(DATA2) … … 126 127 127 128 if (inirec) { 129 # ifdef FORTIFY 130 Fortify_EnterScope(); 131 # endif 128 132 hab2 = WinInitialize(0); 129 133 if (hab2) { … … 293 297 MPVOID); 294 298 xfree(inirec, pszSrcFile, __LINE__); 299 # ifdef FORTIFY 300 Fortify_LeaveScope(); 301 # endif 295 302 } 296 303 } … … 335 342 336 343 if (prfp) { 344 # ifdef FORTIFY 345 Fortify_EnterScope(); 346 # endif 337 347 hab2 = WinInitialize(0); 338 348 if (hab2) { … … 434 444 xfree(prfp->pszSysName, pszSrcFile, __LINE__); 435 445 xfree(prfp, pszSrcFile, __LINE__); 446 # ifdef FORTIFY 447 Fortify_LeaveScope(); 448 # endif 436 449 } 437 450 } -
trunk/dll/killproc.c
r1036 r1038 84 84 MODINFO *pmi; 85 85 86 # ifdef FORTIFY 87 Fortify_EnterScope(); 88 # endif 86 89 thab = WinInitialize(0); 87 90 thmq = WinCreateMsgQueue(thab, 0); … … 134 137 DecrThreadUsage(); 135 138 WinTerminate(thab); 139 # ifdef FORTIFY 140 Fortify_LeaveScope(); 141 # endif 136 142 } 137 143 … … 147 153 QSLREC *pmi; 148 154 155 # ifdef FORTIFY 156 Fortify_EnterScope(); 157 # endif 149 158 thab = WinInitialize(0); 150 159 thmq = WinCreateMsgQueue(thab, 0); … … 197 206 DecrThreadUsage(); 198 207 WinTerminate(thab); 208 # ifdef FORTIFY 209 Fortify_LeaveScope(); 210 # endif 199 211 } 200 212 … … 215 227 DosError(FERR_DISABLEHARDERR); 216 228 229 # ifdef FORTIFY 230 Fortify_EnterScope(); 231 # endif 217 232 thab = WinInitialize(0); 218 233 thmq = WinCreateMsgQueue(thab, 0); 219 234 WinCancelShutdown(thmq, TRUE); 220 235 IncrThreadUsage(); 221 # ifdef FORTIFY222 Fortify_EnterScope();223 # endif224 236 225 237 WinSendDlgItemMsg(hwnd, KILL_LISTBOX, LM_DELETEALL, MPVOID, MPVOID); … … 289 301 } 290 302 fclose(fp); 291 # ifdef FORTIFY292 Fortify_LeaveScope(pszSrcFile, __LINE__);293 # endif294 303 } 295 304 Abort: … … 299 308 DecrThreadUsage(); 300 309 WinTerminate(thab); 310 # ifdef FORTIFY 311 Fortify_LeaveScope(); 312 # endif 301 313 } 302 314 -
trunk/dll/makelist.c
r1036 r1038 91 91 _heap_check(); 92 92 #endif 93 # ifdef FORTIFY94 xfree(list[x], pszSrcFile, __LINE__);95 # else96 93 free(list[x]); 97 # endif98 94 } 99 95 #ifdef __DEBUG_ALLOC__ … … 270 266 for (x = 0; list[x]; x++) { 271 267 if (item == list[x]) { 272 # ifdef FORTIFY273 xfree(list[x], pszSrcFile, __LINE__);274 # else275 268 free(list[x]); 276 # endif277 269 list[x] = NULL; 278 270 for (y = x;; y++) { -
trunk/dll/newview.c
r1036 r1038 649 649 ad->markedlines = NULL; 650 650 DosPostEventSem(CompactSem); 651 # ifdef FORTIFY652 Fortify_LeaveScope(pszSrcFile, __LINE__);653 # endif654 651 } 655 652 } … … 1072 1069 WinDestroyMsgQueue(hmq2); 1073 1070 # ifdef FORTIFY 1074 Fortify_LeaveScope( pszSrcFile, __LINE__);1071 Fortify_LeaveScope(); 1075 1072 # endif 1076 1073 } … … 1356 1353 WinTerminate(hab2); 1357 1354 # ifdef FORTIFY 1358 Fortify_LeaveScope( pszSrcFile, __LINE__);1355 Fortify_LeaveScope(); 1359 1356 # endif 1360 1357 } … … 1481 1478 WinTerminate(hab2); 1482 1479 # ifdef FORTIFY 1483 Fortify_LeaveScope( pszSrcFile, __LINE__);1480 Fortify_LeaveScope(); 1484 1481 # endif 1485 1482 } … … 2404 2401 case 0: 2405 2402 xfree(urld, pszSrcFile, __LINE__); 2406 # ifdef FORTIFY2407 Fortify_LeaveScope();2408 # endif2409 2403 goto NoAdd; 2410 2404 case 1: … … 2433 2427 } 2434 2428 xfree(urld, pszSrcFile, __LINE__); 2435 # ifdef FORTIFY2436 Fortify_LeaveScope();2437 # endif2438 2429 goto NoAdd; 2439 2430 case 2: … … 2462 2453 } 2463 2454 xfree(urld, pszSrcFile, __LINE__); 2464 # ifdef FORTIFY2465 Fortify_LeaveScope();2466 # endif2467 2455 goto NoAdd; 2468 2456 case 3: … … 2475 2463 } 2476 2464 xfree(urld, pszSrcFile, __LINE__); 2477 # ifdef FORTIFY2478 Fortify_LeaveScope();2479 # endif2480 2465 goto NoAdd; 2481 2466 default: … … 2483 2468 } 2484 2469 xfree(urld, pszSrcFile, __LINE__); 2485 # ifdef FORTIFY2486 Fortify_LeaveScope();2487 # endif2488 2470 } 2489 2471 } … … 2564 2546 } 2565 2547 xfree(s, pszSrcFile, __LINE__); 2566 # ifdef FORTIFY2567 Fortify_LeaveScope();2568 # endif2569 2548 } 2570 2549 } … … 3980 3959 WinSetWindowPtr(hwnd, QWL_USER, NULL); 3981 3960 xfree(ad, pszSrcFile, __LINE__); 3982 # ifdef FORTIFY3983 Fortify_LeaveScope(pszSrcFile, __LINE__);3984 # endif3985 3961 } 3986 3962 if (hwndRestore && hwndRestore != HWND_DESKTOP) { -
trunk/dll/notify.c
r1009 r1038 35 35 #include "strutil.h" // GetPString 36 36 #include "fm3dll.h" 37 #include "fortify.h" 37 38 38 39 #pragma data_seg(DATA1) … … 432 433 { 433 434 HAB hab = WinInitialize(0); 434 435 # ifdef FORTIFY 436 Fortify_EnterScope(); 437 # endif 435 438 if (hab) { 436 439 HMQ hmq = WinCreateMsgQueue(hab, 0); … … 444 447 WinTerminate(hab); 445 448 } 449 # ifdef FORTIFY 450 Fortify_LeaveScope(); 451 # endif 446 452 } 447 453 … … 544 550 } 545 551 546 #pragma alloc_text(NOTIFY,Notify,NotifyWndProc,StartNotify) 547 #pragma alloc_text(NOTIFY,NotifyThread,NotifyError) 552 #pragma alloc_text(NOTIFY,Notify,NotifyWndProc,StartNotify,NotifyError) 548 553 #pragma alloc_text(NOTIFY2,AddNote,NoteThread,NoteWndProc) 549 554 #pragma alloc_text(NOTIFY3,StartNotes,EndNote,HideNote,ShowNote) -
trunk/dll/objcnr.c
r1017 r1038 215 215 DIRSIZE *dirsize = (DIRSIZE *)args; 216 216 217 # ifdef FORTIFY 218 Fortify_EnterScope(); 219 # endif 217 220 if (!dirsize) { 218 221 Runtime_Error(pszSrcFile, __LINE__, "no data"); -
trunk/dll/objwin.c
r1036 r1038 91 91 } 92 92 # ifdef FORTIFY 93 Fortify_LeaveScope( pszSrcFile, __LINE__);93 Fortify_LeaveScope(); 94 94 # endif 95 95 WinTerminate(hab2); -
trunk/dll/printer.c
r1029 r1038 113 113 } 114 114 } 115 # ifdef FORTIFY 116 Fortify_EnterScope(); 117 # endif 115 118 priority_normal(); 116 119 hab2 = WinInitialize(0); … … 121 124 IncrThreadUsage(); 122 125 if (li && li->list && li->list[0]) { 123 # ifdef FORTIFY124 Fortify_EnterScope();125 # endif126 126 AddNote(GetPString(IDS_PRINTINGLISTTEXT)); 127 127 for (x = 0; li->list[x]; x++) { … … 324 324 if (li) 325 325 FreeListInfo(li); 326 # ifdef FORTIFY 327 Fortify_LeaveScope(); 328 # endif 326 329 } 327 330 -
trunk/dll/seeall.c
r1037 r1038 1132 1132 hab2 = WinInitialize(0); 1133 1133 if (hab2) { 1134 # ifdef FORTIFY 1135 Fortify_EnterScope(); 1136 # endif 1134 1137 hmq2 = WinCreateMsgQueue(hab2, 256); 1135 1138 if (hmq2) { … … 1163 1166 } 1164 1167 else 1165 WinTerminate(hab2); 1168 WinTerminate(hab2); 1169 # ifdef FORTIFY 1170 Fortify_LeaveScope(); 1171 # endif 1166 1172 } 1167 1173 } … … 1639 1645 ALLDATA *ad = WinQueryWindowPtr(hwnd, QWL_USER); 1640 1646 1647 # ifdef FORTIFY 1648 Fortify_EnterScope(); 1649 # endif 1641 1650 if (!DosRequestMutexSem(ad->hmtxScan, SEM_INDEFINITE_WAIT)) { 1642 1651 priority_normal(); … … 1750 1759 WinTerminate(hab2); 1751 1760 } 1761 # ifdef FORTIFY 1762 Fortify_LeaveScope(); 1763 # endif 1752 1764 } 1753 1765 … … 2043 2055 ALLDATA *ad = WinQueryWindowPtr(hwnd, QWL_USER); 2044 2056 2057 # ifdef FORTIFY 2058 Fortify_EnterScope(); 2059 # endif 2045 2060 if (!DosRequestMutexSem(ad->hmtxScan, SEM_INDEFINITE_WAIT)) { 2046 2061 priority_normal(); … … 2102 2117 WinTerminate(hab2); 2103 2118 } 2119 # ifdef FORTIFY 2120 Fortify_LeaveScope(); 2121 # endif 2104 2122 } 2105 2123 -
trunk/dll/undel.c
r1009 r1038 32 32 #include "strutil.h" // GetPString 33 33 #include "fm3dll.h" 34 #include "fortify.h" 34 35 35 36 #pragma data_seg(DATA2) … … 62 63 DosError(FERR_DISABLEHARDERR); 63 64 65 # ifdef FORTIFY 66 Fortify_EnterScope(); 67 # endif 64 68 thab = WinInitialize(0); 65 69 thmq = WinCreateMsgQueue(thab, 0); … … 158 162 WinTerminate(thab); 159 163 } 164 # ifdef FORTIFY 165 Fortify_LeaveScope(); 166 # endif 160 167 } 161 168
Note:
See TracChangeset
for help on using the changeset viewer.