Changeset 1082 for trunk/dll/inis.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/inis.c

    r1063 r1082  
    2626  09 Jan 08 SHL Use CloseProfile to avoid spurious system INI closes 
    2727  29 Feb 08 GKY Use xfree where appropriate 
     28  19 Jul 08 GKY Replace save_dir2(dir) with pFM2SaveDirectory or pTmpDir and use BldFullPathName 
    2829 
    2930***********************************************************************/ 
     
    4647#include "errutil.h"                    // Dos_Error... 
    4748#include "strutil.h"                    // GetPString 
     49#include "pathutil.h"                   // BldFullPathName 
    4850#include "fm3dll.h" 
    4951#include "fortify.h" 
     
    11341136        /* make copies of new inis */ 
    11351137        *tempuserini = 0; 
    1136         *tempsysini = 0; 
    1137         save_dir2(tempuserini); 
     1138        *tempsysini = 0; 
     1139        BldFullPathName(tempuserini, pTmpDir ? pTmpDir : pFM2SaveDirectory, "TEMPUSER.INI"); 
     1140        /*save_dir2(tempuserini); 
    11381141        if (tempuserini[strlen(tempuserini) - 1] != '\\') 
    11391142          strcat(tempuserini, "\\"); 
    1140         strcat(tempuserini, "TEMPUSER.INI"); 
     1143        strcat(tempuserini, "TEMPUSER.INI");*/ 
    11411144        rc = DosCopy(userini, tempuserini, DCPY_EXISTING); 
    11421145        if (rc) { 
     
    11481151                    GetPString(IDS_COMPCOPYFAILEDTEXT), userini, tempuserini); 
    11491152          break; 
    1150         } 
    1151         save_dir2(tempsysini); 
     1153        } 
     1154        BldFullPathName(tempsysini, pTmpDir ? pTmpDir : pFM2SaveDirectory, "TEMPSYS.INI"); 
     1155        /*save_dir2(tempsysini); 
    11521156        if (tempsysini[strlen(tempsysini) - 1] != '\\') 
    11531157          strcat(tempsysini, "\\"); 
    1154         strcat(tempsysini, "TEMPSYS.INI"); 
     1158        strcat(tempsysini, "TEMPSYS.INI");*/ 
    11551159        rc = DosCopy(sysini, tempsysini, DCPY_EXISTING); 
    11561160        if (rc) {