Commit 795a694e authored by bonnell's avatar bonnell

merge from 2.9RC

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@25576 18c085ea-50e0-402c-830e-de6fd14e8384
parent 87e8a430
......@@ -50,6 +50,7 @@
#include <windows.h>
#include <userenv.h> // for GetProfilesDirectory
#include <direct.h>
#include <Shlwapi.h> // PathIsRelative
#else
#include <unistd.h>
#include <dirent.h>
......@@ -815,6 +816,9 @@ FileFunctions::Normalize(const std::string &path, const std::string &pathSep)
// VISIT_SLASH_STRING. Use of non-platform specific case my be needed if
// parsing internal database path-names.
//
// Kathleen Biagas, Thu Jan 29 15:53:12 MST 2015
// Some tweaks on windows to hanlde cwd_context of '.'.
//
// ****************************************************************************
const char *
......@@ -853,7 +857,24 @@ FileFunctions::Absname(const char *cwd_context, const char *path,
return StaticStringBuf;
}
if (cwd_context[0] != pathSep[0]) return StaticStringBuf;
#ifndef _WIN32
if (cwd_context[0] != pathSep[0])
{
return StaticStringBuf;
}
#else
if(cwd_context[0] == '.')
{
if (PathIsRelative(path))
{
if(_fullpath(StaticStringBuf, ".\\", _MAX_PATH) != NULL)
return StaticStringBuf;
else
return path;
}
return path;
}
#endif
// Catenate path to cwd_context and then Normalize the result
std::string path2 = std::string(cwd_context) + std::string(pathSep) + std::string(path);
......
......@@ -842,7 +842,11 @@ avtMFEMFileFormat::GetRefinedElementColoring(const std::string &mesh_name,
//
//srandom(time(0)); don't seed, may have side effects for other parts of visit
#ifdef _WIN32
double a = double(rand()) / (double(RAND_MAX) + 1.);
#else
double a = double(random()) / (double(RAND_MAX) + 1.);
#endif
int el0 = (int)floor(a * mesh->GetNE());
mesh->GetElementColoring(coloring, el0);
int ref_idx=0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment