Changeset 1082 for trunk/dll/filter.c

Show
Ignore:
Timestamp:
07/20/08 00:37:36 (5 months ago)
Author:
gyoung
Message:

Changes so FM2 will use TMP/TEMP directory for all temp files; Replaced save_dir2 with global variable so BldFullPathName? could easily replace code that performed the same function; Added #ifdef FORTIFY to free_ function that are only used when fortified.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/dll/filter.c

    r1039 r1082  
    1515  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat 
    1616  29 Feb 08 GKY Use xfree where appropriate 
     17  19 Jul 08 GKY Replace save_dir2(dir) with pFM2SaveDirectory and use BldFullPathName 
    1718 
    1819***********************************************************************/ 
     
    3031#include "errutil.h"                    // Dos_Error... 
    3132#include "strutil.h"                    // GetPString 
     33#include "pathutil.h"                   // BldFullPathName 
    3234#include "fm3dll.h" 
    3335#include "fortify.h" 
     
    133135 
    134136  loadedmasks = TRUE; 
    135   save_dir2(s); 
     137  BldFullPathName(s, pFM2SaveDirectory, "FILTER.DAT"); 
     138  /*save_dir2(s); 
    136139  if (s[strlen(s) - 1] != '\\') 
    137140    strcat(s, "\\"); 
    138   strcat(s, "FILTERS.DAT"); 
     141  strcat(s, "FILTERS.DAT");*/ 
    139142  fp = _fsopen(s, "r", SH_DENYWR); 
    140143  if (fp) { 
     
    175178    return; 
    176179  if (maskhead) { 
    177     save_dir2(s); 
     180    BldFullPathName(s, pFM2SaveDirectory, "FILTER.DAT"); 
     181    /*save_dir2(s); 
    178182    if (s[strlen(s) - 1] != '\\') 
    179183      strcat(s, "\\"); 
    180     strcat(s, "FILTERS.DAT"); 
     184    strcat(s, "FILTERS.DAT");*/ 
    181185    fp = xfopen(s, "w", pszSrcFile, __LINE__); 
    182186    if (fp) {