Changeset 1750 for trunk/dll/init.c


Ignore:
Timestamp:
Mar 1, 2014, 2:55:57 PM (11 years ago)
Author:
John Small
Message:

Ticket #524: Made "searchapath" thread-safe. Function names and signatures were changed.

So calls to these functions, direct and indirect, had to be changed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/init.c

    r1743 r1750  
    124124  23 Feb 14 JBS Ticket #515: Corrected a mis-coded call to strtol which was causing the traps
    125125                described in this ticket. (Also changed it to strtoul.)
     126  01 Mar 14 JBS Ticket #524: Made "searchapath" thread-safe. Function names and signatures were changed.
     127                So calls to these functions had to be changed.
    126128
    127129***********************************************************************/
     
    196198#include "strips.h"                     // bstrip
    197199#include "killproc.h"                   // GetDosPgmName
    198 #include "srchpath.h"                   // searchpath
     200#include "srchpath.h"                   // Search*Path*ForFile
    199201#include "fortify.h"
    200202#include "excputil.h"                   // xbeginthread
     
    898900    }
    899901    else {
    900       env = searchpath(profile);
    901       if (!env)
    902         env = profile;
    903       strcpy(inipath, env);
     902      CHAR szFullFilename[CCHMAXPATH];
     903      if (!SearchMultiplePathsForFile(profile, szFullFilename)) {
     904        strcpy(inipath, szFullFilename);
     905      } else {
     906        strcpy(inipath, profile);
     907      }
    904908    } //fixme the DosCopies probably fail if the INI isn't in the FM2 directory GKY 06 Aug 11
    905909    if (!*inipath)
     
    12111215  }
    12121216  { // Check for the existance of various partitioning tools to set up menu items
    1213     CHAR *FullPath;
    12141217    ULONG ulAppType;
    12151218
    1216     FullPath = searchapath(PCSZ_PATH, PCSZ_LVMGUICMD);
    1217     if (*FullPath)
     1219    if (!SearchPathForFile(PCSZ_PATH, PCSZ_LVMGUICMD, NULL))
    12181220      fLVMGui = TRUE;
    12191221    if (!xDosQueryAppType(PCSZ_DFSOS2EXE, &ulAppType))
Note: See TracChangeset for help on using the changeset viewer.