Changeset 1029 for trunk/dll/newview.c


Ignore:
Timestamp:
Jun 23, 2008, 3:30:16 AM (17 years ago)
Author:
Gregg Young
Message:

Fixed early memory free; Added free_... functions to make fortify checking easier; Added fortify scopes; Delete now moves to trash can on systems with the xworkplace trash can installed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/newview.c

    r1009 r1029  
    5353#include "notebook.h"                   // httprun etc
    5454#include "fm3dll.h"
     55#include "fortify.h"
    5556
    5657#pragma data_seg(DATA2)
     
    648649    ad->markedlines = NULL;
    649650    DosPostEventSem(CompactSem);
     651# ifdef FORTIFY
     652  Fortify_LeaveScope();
     653# endif
    650654  }
    651655}
     
    10891093      WinCancelShutdown(hmq2, TRUE);
    10901094      IncrThreadUsage();
     1095# ifdef FORTIFY
     1096  Fortify_EnterScope();
     1097# endif
    10911098      ad = WinQueryWindowPtr(hwnd, QWL_USER);
    10921099      if (ad) {
     
    12041211            xfree(ad->lines, pszSrcFile, __LINE__);
    12051212            xfree(ad->markedlines, pszSrcFile, __LINE__);
     1213# ifdef FORTIFY
     1214  Fortify_LeaveScope();
     1215# endif
    12061216            ad->lines = NULL;
    12071217            ad->markedlines = NULL;
     
    13721382            xfree(ad->lines, pszSrcFile, __LINE__);
    13731383            xfree(ad->markedlines, pszSrcFile, __LINE__);
     1384# ifdef FORTIFY
     1385  Fortify_LeaveScope();
     1386# endif
    13741387            ad->text = NULL;
    13751388            ad->lines = NULL;
     
    14211434                              GetPString(IDS_ERRORREADINGTEXT), ad->filename);
    14221435                    xfree(ad->text, pszSrcFile, __LINE__);
     1436# ifdef FORTIFY
     1437  Fortify_LeaveScope();
     1438# endif
    14231439                    ad->text = NULL;
    14241440                    ad->textsize = 0;
     
    23762392              case 0:
    23772393                xfree(urld, pszSrcFile, __LINE__);
     2394# ifdef FORTIFY
     2395  Fortify_LeaveScope();
     2396# endif
    23782397                goto NoAdd;
    23792398              case 1:
     
    24022421                }
    24032422                xfree(urld, pszSrcFile, __LINE__);
     2423# ifdef FORTIFY
     2424  Fortify_LeaveScope();
     2425# endif
    24042426                goto NoAdd;
    24052427              case 2:
     
    24282450                }
    24292451                xfree(urld, pszSrcFile, __LINE__);
     2452# ifdef FORTIFY
     2453  Fortify_LeaveScope();
     2454# endif
    24302455                goto NoAdd;
    24312456              case 3:
     
    24382463                }
    24392464                xfree(urld, pszSrcFile, __LINE__);
     2465# ifdef FORTIFY
     2466  Fortify_LeaveScope();
     2467# endif
    24402468                goto NoAdd;
    24412469              default:
     
    24432471              }
    24442472              xfree(urld, pszSrcFile, __LINE__);
     2473# ifdef FORTIFY
     2474  Fortify_LeaveScope();
     2475# endif
    24452476            }
    24462477          }
     
    25212552            }
    25222553            xfree(s, pszSrcFile, __LINE__);
     2554# ifdef FORTIFY
     2555  Fortify_LeaveScope();
     2556# endif
    25232557          }
    25242558        }
     
    39343968        WinSetWindowPtr(hwnd, QWL_USER, NULL);
    39353969        xfree(ad, pszSrcFile, __LINE__);
     3970# ifdef FORTIFY
     3971  Fortify_LeaveScope();
     3972# endif
    39363973      }
    39373974      if (hwndRestore && hwndRestore != HWND_DESKTOP) {
Note: See TracChangeset for help on using the changeset viewer.