Changeset 1082 for trunk/dll/remap.c


Ignore:
Timestamp:
Jul 20, 2008, 12:37:36 AM (17 years ago)
Author:
Gregg Young
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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/remap.c

    r1039 r1082  
    55
    66  Copyright (c) 1993, 1998 M. Kimes
    7   Copyright (c) 2004, 2006 Steven H.Levine
     7  Copyright (c) 2004, 2008 Steven H.Levine
    88
    99  01 Aug 04 SHL Rework lstrip/rstrip usage
     
    1414  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
    1515  29 Feb 08 GKY Use xfree where appropriate
     16  19 Jul 08 GKY Replace save_dir2(dir) with pFM2SaveDirectory and use BldFullPathName
    1617
    1718***********************************************************************/
     
    3031#include "errutil.h"                    // Dos_Error...
    3132#include "strutil.h"                    // GetPString
     33#include "pathutil.h"                   // BldFullPathName
    3234#include "fm3dll.h"
    3335#include "fortify.h"
     
    7173
    7274  loadedres = TRUE;
    73   save_dir2(s);
     75  BldFullPathName(s, pFM2SaveDirectory, "RESOURCE.DAT");
     76  /*save_dir2(s);
    7477  if (s[strlen(s) - 1] != '\\')
    7578    strcat(s, "\\");
    76   strcat(s, "RESOURCE.DAT");
     79  strcat(s, "RESOURCE.DAT");*/
    7780  fp = _fsopen(s, "r", SH_DENYWR);
    7881  if (fp) {
     
    112115  if (!loadedres)
    113116    return;
    114   save_dir2(s);
     117  BldFullPathName(s, pFM2SaveDirectory, "RESOURCE.DAT");
     118  /*save_dir2(s);
    115119  if (s[strlen(s) - 1] != '\\')
    116120    strcat(s, "\\");
    117   strcat(s, "RESOURCE.DAT");
     121  strcat(s, "RESOURCE.DAT");*/
    118122  if (reshead) {
    119123    fp = xfopen(s, "w", pszSrcFile, __LINE__);
Note: See TracChangeset for help on using the changeset viewer.