- Timestamp:
- Jun 23, 2008, 3:30:16 AM (17 years ago)
- Location:
- trunk/dll
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/assoc.c
r1012 r1029 979 979 } 980 980 981 #pragma alloc_text(ASSOC2,free_ commands,load_associations,save_associations,display_associations)981 #pragma alloc_text(ASSOC2,free_associations,load_associations,save_associations,display_associations) 982 982 #pragma alloc_text(ASSOC2,ExecAssociation,AssocTextProc) 983 983 #pragma alloc_text(ASSOC,add_association,kill_association,AssocDlgProc,EditAssociations) -
trunk/dll/autoview.c
r1009 r1029 44 44 #include "strutil.h" // GetPString 45 45 #include "fm3dll.h" 46 47 #include "fortify.h" 46 48 47 49 #pragma data_seg(DATA1) … … 194 196 break; 195 197 } 196 pfealist->list[0].cbValue = (ULONG)(eaval -198 pfealist->list[0].cbValue = /*(ULONG)*/ (eaval - 197 199 (pfealist->list[0].szName + 198 200 pfealist->list[0].cbName + 1)); … … 416 418 } 417 419 xfree(ibuff, pszSrcFile, __LINE__); 420 # ifdef FORTIFY 421 Fortify_LeaveScope(); 422 # endif 418 423 } 419 424 DosClose(handle); … … 509 514 WinSetWindowText(hwndAutoview, pszBuf); 510 515 xfree(pszBuf, pszSrcFile, __LINE__); 516 # ifdef FORTIFY 517 Fortify_LeaveScope(); 518 # endif 511 519 } 512 520 } … … 543 551 (PVOID) & eaop, (ULONG) sizeof(EAOP2)); 544 552 xfree(pgealist, pszSrcFile, __LINE__); 553 # ifdef FORTIFY 554 Fortify_LeaveScope(); 555 # endif 545 556 if (!rc) { 546 557 pfea = &eaop.fpFEA2List->list[0]; … … 612 623 } 613 624 xfree((CHAR *)mp1, pszSrcFile, __LINE__); 625 # ifdef FORTIFY 626 Fortify_LeaveScope(); 627 # endif 614 628 } 615 629 return 0; … … 788 802 PostMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_RESCAN, 0), MPVOID); 789 803 xfree(ea, pszSrcFile, __LINE__); 804 # ifdef FORTIFY 805 Fortify_LeaveScope(); 806 # endif 790 807 } 791 808 } … … 838 855 if (!PostMsg(hwndAutoObj, UM_LOADFILE, MPFROMP(cf), MPVOID)) 839 856 xfree(cf, pszSrcFile, __LINE__); 857 # ifdef FORTIFY 858 Fortify_LeaveScope(); 859 # endif 840 860 } 841 861 } … … 894 914 if (!PostMsg(hwndAutoObj, msg, mp1, mp2)) { 895 915 xfree((CHAR *)mp1, pszSrcFile, __LINE__); 916 # ifdef FORTIFY 917 Fortify_LeaveScope(); 918 # endif 896 919 } 897 920 return 0; -
trunk/dll/avl.c
r1009 r1029 31 31 25 Aug 07 SHL load_archivers: add missing close on error path 32 32 29 Feb 08 GKY Use xfree where appropriate 33 22 Jun 08 GKY Added free_archivers fot fortify checking 33 34 34 35 ***********************************************************************/ … … 53 54 static PSZ pszSrcFile = __FILE__; 54 55 55 static void free_arc_type(ARC_TYPE * pat);56 56 static void fill_listbox(HWND hwnd, BOOL fShowAll, SHORT sOldSelect); 57 57 … … 217 217 } 218 218 219 VOID free_archivers(VOID) 220 { 221 ARC_TYPE *pat, *next; 222 223 pat = arcsighead; 224 while (pat) { 225 next = pat->next; 226 xfree(pat->id, pszSrcFile, __LINE__); 227 xfree(pat->ext, pszSrcFile, __LINE__); 228 xfree(pat->list, pszSrcFile, __LINE__); 229 xfree(pat->extract, pszSrcFile, __LINE__); 230 xfree(pat->create, pszSrcFile, __LINE__); 231 xfree(pat->move, pszSrcFile, __LINE__); 232 xfree(pat->delete, pszSrcFile, __LINE__); 233 xfree(pat->signature, pszSrcFile, __LINE__); 234 xfree(pat->startlist, pszSrcFile, __LINE__); 235 xfree(pat->endlist, pszSrcFile, __LINE__); 236 xfree(pat->exwdirs, pszSrcFile, __LINE__); 237 xfree(pat->test, pszSrcFile, __LINE__); 238 xfree(pat->createrecurse, pszSrcFile, __LINE__); 239 xfree(pat->createwdirs, pszSrcFile, __LINE__); 240 xfree(pat->movewdirs, pszSrcFile, __LINE__); 241 xfree(pat, pszSrcFile, __LINE__); 242 pat = next; 243 } 244 arcsighead = NULL; 245 } 246 219 247 //=== free_arc_type() free allocated ARC_TYPE === 220 248 221 static voidfree_arc_type(ARC_TYPE * pat)249 VOID free_arc_type(ARC_TYPE * pat) 222 250 { 223 251 if (pat) { … … 1258 1286 1259 1287 #pragma alloc_text(MISC9,quick_find_type,find_type) 1260 #pragma alloc_text(AVL,load_archivers, get_line_strip_comments, get_line_strip_white )1288 #pragma alloc_text(AVL,load_archivers, get_line_strip_comments, get_line_strip_white, free_archivers) 1261 1289 #pragma alloc_text(FMARCHIVE,SBoxDlgProc,SDlgListboxSubclassProc) 1262 1290 #pragma alloc_text(ARCCNRS,ArcDateTime) -
trunk/dll/avl.h
r907 r1029 86 86 INT load_archivers(VOID); 87 87 BOOL ArcDateTime(CHAR * dt, INT type, CDATE * cdate, CTIME * ctime); 88 VOID free_arc_type(ARC_TYPE * pat); 89 VOID free_archivers(VOID); 88 90 89 91 // 05 Jan 08 SHL fixme for avl.c globals to be here -
trunk/dll/collect.c
r1018 r1029 785 785 } 786 786 xfree(mp1, pszSrcFile, __LINE__); 787 # ifdef FORTIFY 788 Fortify_LeaveScope(); 789 # endif 787 790 return 0; 788 791 … … 1464 1467 if (mp1) { 1465 1468 if (!dcd) { 1466 xfree(mp1, pszSrcFile, __LINE__); 1469 xfree(mp1, pszSrcFile, __LINE__); 1470 # ifdef FORTIFY 1471 Fortify_LeaveScope(); 1472 # endif 1467 1473 Runtime_Error2(pszSrcFile, __LINE__, IDS_NODATATEXT); 1468 1474 } … … 1471 1477 Runtime_Error(pszSrcFile, __LINE__, "PostMsg"); 1472 1478 xfree(mp1, pszSrcFile, __LINE__); 1479 # ifdef FORTIFY 1480 Fortify_LeaveScope(); 1481 # endif 1473 1482 } 1474 1483 } … … 1596 1605 if (p) { 1597 1606 if (!PostMsg(hwnd, UM_COLLECTFROMFILE, MPFROMP(p), MPVOID)) 1598 xfree(p, pszSrcFile, __LINE__); 1607 xfree(p, pszSrcFile, __LINE__); 1608 # ifdef FORTIFY 1609 Fortify_LeaveScope(); 1610 # endif 1599 1611 } 1600 1612 } … … 2675 2687 (INT) mp1, (CHAR *)mp2, dcd->hwndFrame); 2676 2688 xfree((CHAR *)mp2, pszSrcFile, __LINE__); 2689 # ifdef FORTIFY 2690 Fortify_LeaveScope(); 2691 # endif 2677 2692 return MRFROMLONG(ret); 2678 2693 } -
trunk/dll/command.h
r1015 r1029 10 10 11 11 01 Mar 08 GKY Move from fm3dll.h to here 12 22 Jun 08 GKY Moved free_commands here for fortify checking 12 13 13 14 ***********************************************************************/ … … 24 25 CHAR *command_title(INT cx); 25 26 VOID load_commands(VOID); 27 VOID free_commands(VOID); 26 28 27 29 typedef struct LINKCMDS -
trunk/dll/comp.c
r1017 r1029 2574 2574 } 2575 2575 if (fUpdateHideButton) { 2576 U SHORTstate = WinQueryButtonCheckstate(hwnd,COMP_HIDENOTSELECTED);2576 ULONG state = WinQueryButtonCheckstate(hwnd,COMP_HIDENOTSELECTED); 2577 2577 if (state == 1) { 2578 2578 WinCheckButton(hwnd, COMP_HIDENOTSELECTED, 2); … … 2723 2723 cmp = INSTDATA(hwnd); 2724 2724 if (cmp) { 2725 U SHORTwasHidden = WinQueryButtonCheckstate(hwnd,2725 ULONG wasHidden = WinQueryButtonCheckstate(hwnd, 2726 2726 COMP_HIDENOTSELECTED); 2727 2727 -
trunk/dll/dircnrs.c
r1028 r1029 39 39 11 May 08 SHL Add stale dcd sanity checks 40 40 21 Jun 08 GKY Fix columns to honor preferences on new container open. 41 22 Jun 08 GKY Included free_... functions for fortify checking 41 42 42 43 ***********************************************************************/ … … 64 65 #include "command.h" // RunCommand 65 66 #include "fm3dll.h" 67 #include "avl.h" // free_archivers 66 68 #include "fortify.h" 67 69 … … 3315 3317 (INT)mp1, (CHAR *)mp2, dcd->hwndFrame); 3316 3318 xfree((CHAR *)mp2, pszSrcFile, __LINE__); 3319 # ifdef FORTIFY 3320 Fortify_LeaveScope(); 3321 # endif 3317 3322 return MRFROMLONG(ret); 3318 3323 } … … 3356 3361 xfree(dcd, pszSrcFile, __LINE__); 3357 3362 # ifdef FORTIFY 3363 free_commands(); 3364 free_associations(); 3365 free_udir(); 3366 free_ldir(); 3367 free_archivers(); 3358 3368 Fortify_LeaveScope(); 3359 3369 # endif -
trunk/dll/eas.c
r1009 r1029 1147 1147 break; 1148 1148 } 1149 pfealist->list[0].cbValue = (ULONG)(eaval -1149 pfealist->list[0].cbValue = /*(ULONG)*/ (eaval - 1150 1150 (pfealist->list[0].szName + 1151 1151 pfealist->list[0].cbName + 1)); -
trunk/dll/fm3dll.h
r1009 r1029 79 79 14 Feb 08 SHL Refactor CfgDlgProc to notebook.h 80 80 29 Feb 08 GKY Refactor global command line variables to notebook.h 81 22 Jun 08 GKY Changed some variable types to fix compiler warnings 81 82 82 83 ***********************************************************************/ … … 384 385 { 385 386 USHORT size; 386 U SHORTflags;387 U SHORTcmd;387 ULONG flags; 388 ULONG cmd; 388 389 USHORT dummy; 389 390 CHAR *prompt; … … 801 802 BOOL remove_udir(PSZ path); 802 803 BOOL remove_ldir(PSZ path); 804 VOID free_udir(VOID); 805 VOID free_ldir(VOID); 803 806 VOID fill_setups_list(VOID); 804 807 VOID load_setups(VOID); … … 829 832 VOID load_associations(VOID); 830 833 VOID save_associations(VOID); 834 VOID free_associations(VOID); 831 835 832 836 /*draglist.c */ -
trunk/dll/grep.c
r1017 r1029 288 288 WinCancelShutdown(ghmq, TRUE); 289 289 IncrThreadUsage(); 290 # ifdef FORTIFY 291 Fortify_EnterScope(); 292 # endif 290 293 // DosSleep(100); //05 Aug 07 GKY 128 // 07 Feb 08 SHL 291 294 // hwndStatus does not exist for applet … … 411 414 free(grep.matched); 412 415 // 07 Feb 08 SHL fixme to free grep here when not static 416 # ifdef FORTIFY 417 Fortify_LeaveScope(); 418 # endif 413 419 DosPostEventSem(CompactSem); 414 420 } … … 610 616 DosFindClose(findHandle); 611 617 xfree(pffbArray, pszSrcFile, __LINE__); 618 # ifdef FORTIFY 619 Fortify_LeaveScope(); 620 # endif 612 621 return 1; 613 622 } … … 636 645 637 646 xfree(pffbArray, pszSrcFile, __LINE__); 647 # ifdef FORTIFY 648 Fortify_LeaveScope(); 649 # endif 638 650 return 0; 639 651 } … … 658 670 grep->toinsert = 0L; 659 671 grep->insertedbytes = 0L; 672 # ifdef FORTIFY 673 Fortify_LeaveScope(); 674 # endif 660 675 } 661 676 } … … 765 780 if (!grep->dir) { 766 781 xfree(grep->insertffb, pszSrcFile, __LINE__); 782 # ifdef FORTIFY 783 Fortify_LeaveScope(); 784 # endif 767 785 return FALSE; 768 786 } … … 777 795 grep->dir[grep->toinsert] = xstrdup(szDirectory, pszSrcFile, __LINE__); 778 796 if (!grep->dir) { 779 xfree(grep->insertffb[grep->toinsert], pszSrcFile, __LINE__); 797 xfree(grep->insertffb[grep->toinsert], pszSrcFile, __LINE__); 798 # ifdef FORTIFY 799 Fortify_LeaveScope(); 800 # endif 780 801 return FALSE; 781 802 } … … 995 1016 } 996 1017 xfree(input, pszSrcFile, __LINE__); 1018 # ifdef FORTIFY 1019 Fortify_LeaveScope(); 1020 # endif 997 1021 // DosSleep(1); // 07 Feb 08 SHL 998 1022 } … … 1109 1133 } 1110 1134 xfree(buffer, pszSrcFile, __LINE__); 1135 # ifdef FORTIFY 1136 Fortify_LeaveScope(); 1137 # endif 1111 1138 } 1112 1139 return CRC; … … 1129 1156 xfree(grep->dupesizes, pszSrcFile, __LINE__); 1130 1157 grep->dupesizes = grep->dupenames = NULL; 1158 # ifdef FORTIFY 1159 Fortify_LeaveScope(); 1160 # endif 1131 1161 } 1132 1162 … … 1478 1508 xfree(grep->dupesizes, pszSrcFile, __LINE__); 1479 1509 grep->dupesizes = NULL; 1510 # ifdef FORTIFY 1511 Fortify_LeaveScope(); 1512 # endif 1480 1513 1481 1514 InitITimer(pitdSleep, 0); // Reset rate estimator … … 1592 1625 if (!info->name) { 1593 1626 xfree(info, pszSrcFile, __LINE__); 1627 # ifdef FORTIFY 1628 Fortify_LeaveScope(); 1629 # endif 1594 1630 return FALSE; 1595 1631 } -
trunk/dll/grep2.c
r1009 r1029 44 44 #include "strutil.h" // GetPString 45 45 #include "fm3dll.h" 46 #include "fortify.h" 46 47 47 48 #pragma data_seg(DATA1) … … 825 826 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, GREP_MASK)); 826 827 xfree(p, pszSrcFile, __LINE__); 828 # ifdef FORTIFY 829 Fortify_LeaveScope(); 830 # endif 827 831 break; 828 832 } … … 924 928 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 925 929 xfree(p, pszSrcFile, __LINE__); 930 # ifdef FORTIFY 931 Fortify_LeaveScope(); 932 # endif 926 933 WinDismissDlg(hwnd, 0); 927 934 break; … … 929 936 DosSleep(100); //05 Aug 07 GKY 128 930 937 xfree(p, pszSrcFile, __LINE__); 938 # ifdef FORTIFY 939 Fortify_LeaveScope(); 940 # endif 931 941 } 932 942 if (changed) { -
trunk/dll/mainwnd.c
r1027 r1029 56 56 29 Feb 08 GKY Use xfree where appropriate 57 57 19 Jun 08 JBS Ticket 227: Allow temporary saving/deleting of the shutdown state of directory containers 58 22 Jun 08 GKY Use free_... functions for fortify checking 58 59 59 60 ***********************************************************************/ … … 76 77 #include "comp.h" 77 78 #include "datamin.h" 78 #include "pathutil.h" 79 #include "pathutil.h" // BldQuotedFileName 79 80 #include "errutil.h" // Dos_Error... 80 81 #include "strutil.h" // GetPString 81 #include "notebook.h" 82 #include "notebook.h" // CfgDlgProc CfgMenuInit 82 83 #include "command.h" // LINKCMDS 83 84 #include "fm3dll.h" 85 #include "avl.h" // free_archivers 84 86 85 87 #include "fortify.h" … … 6355 6357 WinSendMsg((HWND) 0, WM_QUIT, MPVOID, MPVOID); 6356 6358 # ifdef FORTIFY 6359 free_commands(); 6360 free_associations(); 6361 free_udir(); 6362 free_ldir(); 6363 free_archivers(); 6357 6364 Fortify_LeaveScope(); 6358 6365 # endif -
trunk/dll/makelist.c
r1018 r1029 116 116 // Use plain realloc for speed 117 117 // 06 Aug 07 SHL fixme to know why + 6 118 # ifdef FORTIFY 119 Fortify_EnterScope(); 120 # endif 118 121 pflArray = realloc(*list, (*pnumalloced + 6) * sizeof(FILELIST *)); 119 122 if (!pflArray) { … … 167 170 if (((*pnumfiles) + 3) > *pnumalloced) { 168 171 // Use plain realloc for speed 172 # ifdef FORTIFY 173 Fortify_EnterScope(); 174 # endif 169 175 ppsz = realloc(*list, (*pnumalloced + 6) * sizeof(CHAR *)); 170 176 if (!ppsz) { … … 216 222 if (numalloc > numfiles + 1) { 217 223 // Use plain realloc for speed 224 225 # ifdef FORTIFY 226 Fortify_EnterScope(); 227 # endif 218 228 test = realloc(list, sizeof(CHAR *) * (numfiles + 1)); 219 229 if (!test) … … 267 277 list = NULL; 268 278 } 279 # ifdef FORTIFY 280 Fortify_LeaveScope(); 281 # endif 269 282 break; 270 283 } -
trunk/dll/makelist.h
r907 r1029 10 10 11 11 05 Jan 08 SHL Move makelist.c definitions here 12 22 Jun 08 GKY Change variable type to fix compiler warning 12 13 13 14 ***********************************************************************/ … … 59 60 HWND hwnd; 60 61 HWND hwndS; 61 U SHORTtype;62 ULONG type; 62 63 USHORT id; 63 64 INT flags; -
trunk/dll/mle.c
r1009 r1029 20 20 29 Feb 08 GKY Refactor global command line variables to notebook.h 21 21 29 Feb 08 GKY Use xfree where appropriate 22 22 Jun 08 GKY Fixed memory buffer access after it had been freed 22 23 23 24 ***********************************************************************/ … … 40 41 #include "notebook.h" // httprun etc 41 42 #include "fm3dll.h" 43 #include "fortify.h" 42 44 43 45 static PSZ pszSrcFile = __FILE__; … … 251 253 GetPString(IDS_OUTOFMEMORY)); 252 254 xfree(sel, pszSrcFile, __LINE__); 255 # ifdef FORTIFY 256 Fortify_LeaveScope(); 257 # endif 253 258 DosPostEventSem(CompactSem); 254 259 return FALSE; … … 268 273 Runtime_Error(pszSrcFile, __LINE__, "len < 1"); 269 274 xfree(sel, pszSrcFile, __LINE__); 275 # ifdef FORTIFY 276 Fortify_LeaveScope(); 277 # endif 270 278 DosPostEventSem(CompactSem); 271 279 return FALSE; … … 282 290 DosFreeMem(temp); 283 291 xfree(sel, pszSrcFile, __LINE__); 292 # ifdef FORTIFY 293 Fortify_LeaveScope(); 294 # endif 284 295 MLEenable(h); 285 296 DosPostEventSem(CompactSem); … … 303 314 DosFreeMem(temp); 304 315 xfree(sel, pszSrcFile, __LINE__); 316 # ifdef FORTIFY 317 Fortify_LeaveScope(); 318 # endif 305 319 MLEenable(h); 306 320 DosPostEventSem(CompactSem); … … 376 390 DosFreeMem(temp); 377 391 xfree(sel, pszSrcFile, __LINE__); 392 # ifdef FORTIFY 393 Fortify_LeaveScope(); 394 # endif 378 395 DosPostEventSem(CompactSem); 379 396 MLEenable(h); … … 409 426 DosFreeMem(temp); 410 427 xfree(sel, pszSrcFile, __LINE__); 428 # ifdef FORTIFY 429 Fortify_LeaveScope(); 430 # endif 411 431 DosPostEventSem(CompactSem); 412 432 return TRUE; … … 575 595 ret = FALSE; 576 596 xfree(buffer, pszSrcFile, __LINE__); 597 # ifdef FORTIFY 598 Fortify_LeaveScope(); 599 # endif 577 600 } 578 601 DosFreeMem(hexbuff); … … 756 779 WinCancelShutdown(thmq, TRUE); 757 780 IncrThreadUsage(); 781 # ifdef FORTIFY 782 Fortify_EnterScope(); 783 # endif 758 784 priority_normal(); 759 785 if (bkg->hex == 1) … … 770 796 _heap_check(); 771 797 #endif 772 798 //xfree(bkg, pszSrcFile, __LINE__); 773 799 WinDestroyMsgQueue(thmq); 774 800 } 775 801 DecrThreadUsage(); 776 802 WinTerminate(thab); 803 xfree(bkg, pszSrcFile, __LINE__); 804 bkg = NULL; 805 # ifdef FORTIFY 806 Fortify_LeaveScope(); 807 # endif 777 808 _endthread(); 778 809 } 779 810 // fixme to be gone? 780 PostMsg(bkg->hwndReport, bkg->msg, MPVOID, MPVOID); 811 if (bkg) { 812 PostMsg(bkg->hwndReport, bkg->msg, MPVOID, MPVOID); 813 xfree(bkg, pszSrcFile, __LINE__); 814 # ifdef FORTIFY 815 Fortify_LeaveScope(); 816 # endif 817 } 781 818 } 782 819 } -
trunk/dll/newview.c
r1009 r1029 53 53 #include "notebook.h" // httprun etc 54 54 #include "fm3dll.h" 55 #include "fortify.h" 55 56 56 57 #pragma data_seg(DATA2) … … 648 649 ad->markedlines = NULL; 649 650 DosPostEventSem(CompactSem); 651 # ifdef FORTIFY 652 Fortify_LeaveScope(); 653 # endif 650 654 } 651 655 } … … 1089 1093 WinCancelShutdown(hmq2, TRUE); 1090 1094 IncrThreadUsage(); 1095 # ifdef FORTIFY 1096 Fortify_EnterScope(); 1097 # endif 1091 1098 ad = WinQueryWindowPtr(hwnd, QWL_USER); 1092 1099 if (ad) { … … 1204 1211 xfree(ad->lines, pszSrcFile, __LINE__); 1205 1212 xfree(ad->markedlines, pszSrcFile, __LINE__); 1213 # ifdef FORTIFY 1214 Fortify_LeaveScope(); 1215 # endif 1206 1216 ad->lines = NULL; 1207 1217 ad->markedlines = NULL; … … 1372 1382 xfree(ad->lines, pszSrcFile, __LINE__); 1373 1383 xfree(ad->markedlines, pszSrcFile, __LINE__); 1384 # ifdef FORTIFY 1385 Fortify_LeaveScope(); 1386 # endif 1374 1387 ad->text = NULL; 1375 1388 ad->lines = NULL; … … 1421 1434 GetPString(IDS_ERRORREADINGTEXT), ad->filename); 1422 1435 xfree(ad->text, pszSrcFile, __LINE__); 1436 # ifdef FORTIFY 1437 Fortify_LeaveScope(); 1438 # endif 1423 1439 ad->text = NULL; 1424 1440 ad->textsize = 0; … … 2376 2392 case 0: 2377 2393 xfree(urld, pszSrcFile, __LINE__); 2394 # ifdef FORTIFY 2395 Fortify_LeaveScope(); 2396 # endif 2378 2397 goto NoAdd; 2379 2398 case 1: … … 2402 2421 } 2403 2422 xfree(urld, pszSrcFile, __LINE__); 2423 # ifdef FORTIFY 2424 Fortify_LeaveScope(); 2425 # endif 2404 2426 goto NoAdd; 2405 2427 case 2: … … 2428 2450 } 2429 2451 xfree(urld, pszSrcFile, __LINE__); 2452 # ifdef FORTIFY 2453 Fortify_LeaveScope(); 2454 # endif 2430 2455 goto NoAdd; 2431 2456 case 3: … … 2438 2463 } 2439 2464 xfree(urld, pszSrcFile, __LINE__); 2465 # ifdef FORTIFY 2466 Fortify_LeaveScope(); 2467 # endif 2440 2468 goto NoAdd; 2441 2469 default: … … 2443 2471 } 2444 2472 xfree(urld, pszSrcFile, __LINE__); 2473 # ifdef FORTIFY 2474 Fortify_LeaveScope(); 2475 # endif 2445 2476 } 2446 2477 } … … 2521 2552 } 2522 2553 xfree(s, pszSrcFile, __LINE__); 2554 # ifdef FORTIFY 2555 Fortify_LeaveScope(); 2556 # endif 2523 2557 } 2524 2558 } … … 3934 3968 WinSetWindowPtr(hwnd, QWL_USER, NULL); 3935 3969 xfree(ad, pszSrcFile, __LINE__); 3970 # ifdef FORTIFY 3971 Fortify_LeaveScope(); 3972 # endif 3936 3973 } 3937 3974 if (hwndRestore && hwndRestore != HWND_DESKTOP) { -
trunk/dll/printer.c
r907 r1029 33 33 #include "strutil.h" // GetPString 34 34 #include "fm3dll.h" 35 #include "fortify.h" 35 36 36 37 #pragma data_seg(DATA1) … … 120 121 IncrThreadUsage(); 121 122 if (li && li->list && li->list[0]) { 123 # ifdef FORTIFY 124 Fortify_EnterScope(); 125 # endif 122 126 AddNote(GetPString(IDS_PRINTINGLISTTEXT)); 123 127 for (x = 0; li->list[x]; x++) { -
trunk/dll/viewer.c
r1009 r1029 36 36 #include "notebook.h" // External viewers 37 37 #include "fm3dll.h" 38 #include "fortify.h" 38 39 39 40 #pragma data_seg(DATA1) … … 99 100 } 100 101 } 101 102 # ifdef FORTIFY 103 Fortify_EnterScope(); 104 # endif 102 105 vw = xmallocz(sizeof(XMLEWNDPTR), pszSrcFile, __LINE__); 103 106 if (!vw) … … 891 894 } 892 895 } 896 //printf("%s %s %d\n ",vw->exportfilename, __FILE__, __LINE__); fflush(stdout); 893 897 if (!MLEexportfile(hwndMLE, 894 898 vw->exportfilename, … … 1254 1258 } 1255 1259 xfree(vw, pszSrcFile, __LINE__); 1260 # ifdef FORTIFY 1261 Fortify_LeaveScope(); 1262 # endif 1256 1263 } 1257 1264 if (!dontclose && -
trunk/dll/viewinf.c
r1009 r1029 34 34 #include "strutil.h" // GetPString 35 35 #include "fm3dll.h" 36 #include "fortify.h" 36 37 37 38 #pragma data_seg(DATA1) … … 57 58 if (!dummy) 58 59 return; 60 # ifdef FORTIFY 61 Fortify_EnterScope(); 62 # endif 59 63 hwnd = dummy->hwnd; 60 64 hab2 = WinInitialize(0); … … 190 194 } 191 195 xfree(dummy, pszSrcFile, __LINE__); 196 # ifdef FORTIFY 197 Fortify_LeaveScope(); 198 # endif 192 199 } 193 200 -
trunk/dll/walkem.c
r1027 r1029 28 28 29 Feb 08 GKY Refactor global command line variables to notebook.h 29 29 19 Jun 08 JBS Ticket 227: Allow temporary saving/deleting of the shutdown state of directory containers 30 22 Jun 08 GKY Add free_?dir for fortify testing 30 31 31 32 ***********************************************************************/ … … 534 535 } 535 536 537 VOID free_ldir(VOID) 538 { 539 LINKDIRS *info, *next; 540 541 info = ldirhead; 542 while (info) { 543 next = info->next; 544 xfree(info->path, pszSrcFile, __LINE__); 545 xfree(info, pszSrcFile, __LINE__); 546 info = next; 547 } 548 ldirhead = NULL; 549 } 550 551 VOID free_udir(VOID) 552 { 553 LINKDIRS *info, *next; 554 555 info = udirhead; 556 while (info) { 557 next = info->next; 558 xfree(info->path, pszSrcFile, __LINE__); 559 xfree(info, pszSrcFile, __LINE__); 560 info = next; 561 } 562 udirhead = NULL; 563 } 564 536 565 VOID FillPathListBox(HWND hwnd, HWND hwnddrive, HWND hwnddir, CHAR * pszPath, 537 566 BOOL nounwriteable) -
trunk/dll/worker.c
r1018 r1029 26 26 29 Feb 08 GKY Use xfree where appropriate 27 27 29 Feb 08 GKY Refactor global command line variables to notebook.h 28 22 Jun 08 GKY Made Felete move to xworkplace trash can on systems that have it 28 29 29 30 ***********************************************************************/ … … 41 42 #define INCL_LONGLONG 42 43 #define INCL_WINPOINTERS 44 #define INCL_WINWORKPLACE 43 45 44 46 #include "fm3dlg.h" … … 134 136 135 137 if (wk) { 138 # ifdef FORTIFY 139 Fortify_EnterScope(); 140 # endif 136 141 if (wk->li && wk->li->list && wk->li->list[0]) { 137 142 hab2 = WinInitialize(0); … … 265 270 UM_COLLECTFROMFILE, MPFROMP(temp), MPVOID)) 266 271 xfree(temp, pszSrcFile, __LINE__); 272 # ifdef FORTIFY 273 Fortify_LeaveScope(); 274 # endif 267 275 } 268 276 } … … 990 998 991 999 if (wk) { 1000 # ifdef FORTIFY 1001 Fortify_EnterScope(); 1002 # endif 992 1003 if (wk->li && wk->li->list && wk->li->list[0]) { 993 1004 hab2 = WinInitialize(0); … … 1131 1142 strcpy(p, wk->li->list[x]); 1132 1143 xfree(wk->li->list[x], pszSrcFile, __LINE__); 1144 # ifdef FORTIFY 1145 Fortify_LeaveScope(); 1146 # endif 1133 1147 wk->li->list[x] = xstrdup(szBuffer, pszSrcFile, __LINE__); 1134 1148 } … … 1311 1325 MPFROMLONG(5 + viewtype), MPFROMP(temp))) 1312 1326 xfree(temp, pszSrcFile, __LINE__); 1327 # ifdef FORTIFY 1328 Fortify_LeaveScope(); 1329 # endif 1313 1330 } 1314 1331 DosSleep(1); … … 1356 1373 MPFROMLONG(4 + viewtype), MPFROMP(temp))) 1357 1374 xfree(temp, pszSrcFile, __LINE__); 1375 # ifdef FORTIFY 1376 Fortify_LeaveScope(); 1377 # endif 1358 1378 } 1359 1379 DosSleep(1); … … 1433 1453 CHAR prompt[CCHMAXPATH * 3]; 1434 1454 APIRET error; 1455 HOBJECT hObjectdest, hObjectofObject; 1435 1456 1436 1457 for (x = 0; wk->li->list[x]; x++) { … … 1556 1577 AddNote(prompt); 1557 1578 DosError(FERR_DISABLEHARDERR); 1558 if (wk->li->type == IDM_DELETE) 1559 error = DosDelete(wk->li->list[x]); 1579 if (wk->li->type == IDM_DELETE){ 1580 hObjectdest = WinQueryObject("<XWP_TRASHCAN>"); 1581 if (hObjectdest != NULLHANDLE){ 1582 hObjectofObject = WinQueryObject(wk->li->list[x]); 1583 error = WinMoveObject(hObjectofObject, hObjectdest, 0); 1584 } 1585 else 1586 error = DosDelete(wk->li->list[x]); 1587 } 1560 1588 else 1561 1589 error = DosForceDelete(wk->li->list[x]); … … 1563 1591 DosError(FERR_DISABLEHARDERR); 1564 1592 make_deleteable(wk->li->list[x]); 1565 if (wk->li->type == IDM_DELETE) 1566 error = DosDelete(wk->li->list[x]); 1593 if (wk->li->type == IDM_DELETE){ 1594 hObjectdest = WinQueryObject("<XWP_TRASHCAN>"); 1595 if (hObjectdest != NULLHANDLE){ 1596 hObjectofObject = WinQueryObject(wk->li->list[x]); 1597 error = WinMoveObject(hObjectofObject, hObjectdest, 0); 1598 } 1599 else 1600 error = DosDelete(wk->li->list[x]); 1601 } 1567 1602 else 1568 1603 error = DosForceDelete(wk->li->list[x]);
Note:
See TracChangeset
for help on using the changeset viewer.