Changeset 1032 for trunk/dll/wrappers.c


Ignore:
Timestamp:
Jun 30, 2008, 4:55:36 AM (17 years ago)
Author:
Gregg Young
Message:

Fortify updates including a leave scope wrapper which frees and in some cases reloads commands, archivers, association, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/wrappers.c

    r1011 r1032  
    3232#include "errutil.h"                    // Dos_Error...
    3333#include "strutil.h"                    // GetPString
     34#include "command.h"
     35#include "tools.h"
     36#include "avl.h"
    3437
    3538#include "fortify.h"                    // GetPString
     
    403406}
    404407
    405 #pragma alloc_text(WRAPPERS1,xfree,xfopen,xfsopen,xmalloc,xrealloc, xstrdup)
    406 #pragma alloc_text(WRAPPERS2,xDosSetPathInfo,xDosFindFirst,xDosFindNext)
     408# ifdef FORTIFY
     409unsigned char xFortify_LeaveScope(PCSZ pszSrcFile, UINT uiLineNumber)
     410{
     411  unsigned char ret;
     412
     413  free_commands();
     414  free_associations();
     415  free_udir();
     416  free_ldir();
     417  free_archivers();
     418  free_tools();
     419  ret = Fortify_LeaveScope(pszSrcFile, uiLineNumber);
     420  load_commands();
     421  load_udirs();
     422  return ret;
     423}
     424# endif
     425
     426#pragma alloc_text(WRAPPERS1,xfree,xfopen,xfsopen,xmalloc,xrealloc,xstrdup)
     427#pragma alloc_text(WRAPPERS2,xDosSetPathInfo,xDosFindFirst,xDosFindNext,xFortify_LeaveScope)
Note: See TracChangeset for help on using the changeset viewer.