Commit b5f7bb93 authored by bonnell's avatar bonnell

For better namespace behavior, renames some visit-config defines with 'VISIT_'...

For better namespace behavior, renames some visit-config defines with 'VISIT_' prepended, namely: SLASH_CHAR, SLASH_STRING, SVN_REVISION, PLUGIN_EXTENSION, USE_PTY.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@7178 18c085ea-50e0-402c-830e-de6fd14e8384
parent 40587061
......@@ -2242,7 +2242,7 @@ avtDatabase::GetFileListFromTextFile(const char *textfile,
char dir[1024];
const char *p = textfile, *q = NULL;
while ((q = strstr(p, SLASH_STRING)) != NULL)
while ((q = strstr(p, VISIT_SLASH_STRING)) != NULL)
{
p = q+1;
}
......@@ -2267,7 +2267,7 @@ avtDatabase::GetFileListFromTextFile(const char *textfile,
{
ConvertSlashes(str_auto);
if (str_auto[0] == SLASH_CHAR || str_auto[0] == '!')
if (str_auto[0] == VISIT_SLASH_CHAR || str_auto[0] == '!')
{
strcpy(str_with_dir, str_auto);
}
......
......@@ -181,7 +181,7 @@ avtDebugDumpOptions::SetDumpDirectory(const string &odir)
if(res_dir != "")
{
// make sure it has a "/" or "\" (windows) suffix
string slash = string(SLASH_STRING);
string slash = string(VISIT_SLASH_STRING);
if (res_dir[res_dir.length()-1] != slash[0] )
res_dir += slash;
// make sure the dir exists!
......
......@@ -43,7 +43,6 @@
#include <VisWinPathTracker.h>
#include <VisWindow.h>
#include <visit-config.h> // for SLASH_CHAR, SLASH_STRING
#include <string>
#include <vector>
......
......@@ -2043,7 +2043,7 @@ RemoteProcess::LaunchRemote(const stringVector &args)
remoteProgramPid = _spawnvp(_P_NOWAIT, SecureShell(), argv);
#else
// Start the program in UNIX
#ifdef USE_PTY
#ifdef VISIT_USE_PTY
debug5 << mName << "Starting child process using pty_fork" << endl;
int ptyFileDescriptor;
if (!disablePTY)
......@@ -2084,7 +2084,7 @@ RemoteProcess::LaunchRemote(const stringVector &args)
break;
}
#ifdef USE_PTY
#ifdef VISIT_USE_PTY
if (!disablePTY && getAuthentication)
{
TRY
......
......@@ -120,7 +120,7 @@ GetDefaultConfigFile(const char *filename, const char *home)
// If the filename has an absolute path, do not prepend the home
// directory.
if (filename != NULL && filename[0] == SLASH_CHAR)
if (filename != NULL && filename[0] == VISIT_SLASH_CHAR)
{
// Must make a copy because the caller will delete this.
retval = new char[strlen(filename)+1];
......@@ -286,8 +286,8 @@ GetUserVisItDirectory()
homedir = home + "/.visit";
#endif
if(homedir[homedir.size() - 1] != SLASH_CHAR)
homedir += SLASH_STRING;
if(homedir[homedir.size() - 1] != VISIT_SLASH_CHAR)
homedir += VISIT_SLASH_STRING;
}
return homedir;
......
......@@ -38,7 +38,7 @@
#include "PTY.h"
#ifdef USE_PTY
#ifdef VISIT_USE_PTY
#include <signal.h>
#include <stdio.h>
......
......@@ -40,7 +40,7 @@
#define PTY_H
#include <visit-config.h>
#ifdef USE_PTY
#ifdef VISIT_USE_PTY
#include <stdlib.h>
#include <unistd.h>
......
......@@ -305,7 +305,7 @@ TimingsManager::SetFilename(const std::string &fname)
#if defined(_WIN32)
if (!(fname[0] == 'C' && fname[1] == ':'))
#else
if (fname[0] != SLASH_CHAR)
if (fname[0] != VISIT_SLASH_CHAR)
#endif
{
char currentDir[1024];
......@@ -316,8 +316,8 @@ TimingsManager::SetFilename(const std::string &fname)
#endif
currentDir[1023]='\0';
std::string filenameTmp(currentDir);
if(filenameTmp[filenameTmp.size()-1] != SLASH_CHAR)
filenameTmp += SLASH_STRING;
if(filenameTmp[filenameTmp.size()-1] != VISIT_SLASH_CHAR)
filenameTmp += VISIT_SLASH_STRING;
filename = filenameTmp + fname + ".timings";
}
else
......
......@@ -330,10 +330,10 @@ VisItInit::Initialize(int &argc, char *argv[], int r, int n, bool strip, bool si
}
else if (strcmp("-svn_revision", argv[i]) == 0)
{
if (strcmp(SVN_REVISION, "") == 0)
if (strcmp(VISIT_SVN_REVISION, "") == 0)
cerr << "SVN revision is unknown!" << endl;
else
cerr << "Built from revision " << SVN_REVISION << endl;
cerr << "Built from revision " << VISIT_SVN_REVISION << endl;
exit(0);
}
}
......@@ -350,8 +350,8 @@ VisItInit::Initialize(int &argc, char *argv[], int r, int n, bool strip, bool si
if(home != 0)
{
homedir = std::string(home);
if(homedir[homedir.size() - 1] != SLASH_CHAR)
homedir += SLASH_STRING;
if(homedir[homedir.size() - 1] != VISIT_SLASH_CHAR)
homedir += VISIT_SLASH_STRING;
homedir += executableName;
strcpy(progname_wo_dir, homedir.c_str());
}
......@@ -629,7 +629,7 @@ RemovePrependedDirs(const char *path, char *name)
//
int len = strlen(path);
int lastSlash;
for (lastSlash=len ; path[lastSlash]!=SLASH_CHAR && lastSlash>=0 ; lastSlash--)
for (lastSlash=len ; path[lastSlash]!=VISIT_SLASH_CHAR && lastSlash>=0 ; lastSlash--)
{
continue;
}
......@@ -644,7 +644,7 @@ RemovePrependedDirs(const char *path, char *name)
//
//
if (path[lastSlash] == SLASH_CHAR)
if (path[lastSlash] == VISIT_SLASH_CHAR)
{
strcpy(name, path + lastSlash + 1);
}
......
......@@ -503,7 +503,7 @@ DatabasePluginManager::GetMatchingPluginIds(const char *filename, bool searchAll
int lastSlash = -1;
for (i = len-1 ; i >= 0 ; i--)
{
if (fap[i] == SLASH_CHAR)
if (fap[i] == VISIT_SLASH_CHAR)
{
lastSlash = i;
break;
......
......@@ -49,19 +49,10 @@
#include <map>
#include <vector>
#include <visit-config.h>
#include <algorithm>
#include <cstdlib>
#include <string>
#include <map>
#include <vector>
#include <DebugStream.h>
#include <InvalidDirectoryException.h>
#include <InvalidPluginException.h>
#include <InstallationFunctions.h>
#include <Utility.h>
#include <visitstream.h>
#if __APPLE__
......@@ -514,7 +505,7 @@ PluginManager::GetPluginList(vector<pair<string,string> > &libs)
ReadPluginDir(files);
// Add each file that is a library to the list.
string ext(PLUGIN_EXTENSION);
string ext(VISIT_PLUGIN_EXTENSION);
int extLen = ext.size();
vector< vector<pair<string,string> > > tmp;
......@@ -627,7 +618,7 @@ PluginManager::ReadPluginInfo()
vector<string> pluginsWithNoVersion;
// Read the plugin info for each plugin in the libs list.
string ext(PLUGIN_EXTENSION);
string ext(VISIT_PLUGIN_EXTENSION);
vector<string> alreadyLoaded;
vector<string> alreadyLoadedDir;
for (size_t i=0; i<libs.size(); i++)
......@@ -685,7 +676,7 @@ PluginManager::ReadPluginInfo()
}
// We're okay, now try to open the plugin info.
string pluginFile(dirname + SLASH_STRING + filename);
string pluginFile(dirname + VISIT_SLASH_STRING + filename);
PluginOpen(pluginFile);
const char **VisItPluginVersion =
(const char**)PluginSymbol("VisItPluginVersion");
......@@ -712,7 +703,7 @@ PluginManager::ReadPluginInfo()
// that will be loaded later.
alreadyLoaded.push_back(filename);
alreadyLoadedDir.push_back(dirname);
libfiles.push_back(dirname + SLASH_STRING + str);
libfiles.push_back(dirname + VISIT_SLASH_STRING + str);
}
}
......@@ -727,7 +718,7 @@ PluginManager::ReadPluginInfo()
for (size_t i=0; i<pluginsWithWrongVersion.size(); i++)
{
string pluginFile(pluginsWithWrongVersion[i]);
string ext(PLUGIN_EXTENSION);
string ext(VISIT_PLUGIN_EXTENSION);
int slashPos = pluginFile.rfind("/");
string dirname = pluginFile.substr(0, slashPos);
int suffixLen = (pluginFile.find("_ser") != -1 ||
......@@ -761,7 +752,7 @@ PluginManager::ReadPluginInfo()
for (size_t i=0; i<pluginsWithNoVersion.size(); i++)
{
string pluginFile(pluginsWithNoVersion[i]);
string ext(PLUGIN_EXTENSION);
string ext(VISIT_PLUGIN_EXTENSION);
int slashPos = pluginFile.rfind("/");
string dirname = pluginFile.substr(0, slashPos);
int suffixLen = (pluginFile.find("_ser") != -1 ||
......@@ -1220,7 +1211,7 @@ PluginManager::SetPluginDir(const char *PluginDir)
{
PathAppend(tmp, "LLNL");
PathAppend(tmp, "VisIt");
pluginDirs.push_back(string(tmp) + SLASH_STRING +
pluginDirs.push_back(string(tmp) + VISIT_SLASH_STRING +
managerName + "s");
delete [] tmp;
return;
......@@ -1266,7 +1257,7 @@ PluginManager::SetPluginDir(const char *PluginDir)
}
if (!dir.empty())
{
pluginDirs.push_back(string(dir) + SLASH_STRING + managerName + "s");
pluginDirs.push_back(string(dir) + VISIT_SLASH_STRING + managerName + "s");
}
dir = "";
if (*c)
......@@ -1451,7 +1442,7 @@ PluginManager::PluginSymbol(const string &symbol, bool noError)
bool pluginVersion = (symbol == "VisItPluginVersion");
if(pluginVersion || symbol.substr(0,3) == "Get")
{
string ext(PLUGIN_EXTENSION);
string ext(VISIT_PLUGIN_EXTENSION);
int slashPos = openPlugin.rfind("/");
int suffixLen = (openPlugin.find("_ser") != -1 ||
openPlugin.find("_par") != -1) ? 4 : 0;
......
......@@ -314,7 +314,7 @@ ColorTableManager::ImportColorTable(const std::string &ctFileName)
if(node != 0)
{
std::string ctName;
std::string::size_type pos = ctFileName.rfind(SLASH_STRING);
std::string::size_type pos = ctFileName.rfind(VISIT_SLASH_STRING);
if(pos == std::string::npos)
ctName = ctFileName;
else
......
......@@ -538,21 +538,21 @@ basename(const char *path, int& start)
return StaticStringBuf;
}
// backup, skipping over all trailing SLASH_CHAR chars
// backup, skipping over all trailing VISIT_SLASH_CHAR chars
int j = n-1;
while ((j >= 0) && (path[j] == SLASH_CHAR))
while ((j >= 0) && (path[j] == VISIT_SLASH_CHAR))
j--;
// deal with string consisting of all SLASH_CHAR chars
// deal with string consisting of all VISIT_SLASH_CHAR chars
if (j == -1)
{
strcpy(StaticStringBuf, SLASH_STRING);
strcpy(StaticStringBuf, VISIT_SLASH_STRING);
return StaticStringBuf;
}
// backup to just after next SLASH_CHAR char
// backup to just after next VISIT_SLASH_CHAR char
int i = j-1;
while ((i >= 0) && (path[i] != SLASH_CHAR))
while ((i >= 0) && (path[i] != VISIT_SLASH_CHAR))
i--;
i++;
start = i;
......@@ -597,9 +597,9 @@ StringHelpers::Dirname(const char *path)
strcpy(StaticStringBuf, ".");
return StaticStringBuf;
}
else if ((path[0] == SLASH_CHAR) && (path[1] == '\0'))
else if ((path[0] == VISIT_SLASH_CHAR) && (path[1] == '\0'))
{
strcpy(StaticStringBuf, SLASH_STRING);
strcpy(StaticStringBuf, VISIT_SLASH_STRING);
return StaticStringBuf;
}
......@@ -608,7 +608,7 @@ StringHelpers::Dirname(const char *path)
if (start == -1)
{
strcpy(StaticStringBuf, SLASH_STRING);
strcpy(StaticStringBuf, VISIT_SLASH_STRING);
return StaticStringBuf;
}
else
......@@ -616,7 +616,7 @@ StringHelpers::Dirname(const char *path)
int i;
for (i = 0; i < start; i++)
StaticStringBuf[i] = path[i];
if (StaticStringBuf[i-1] == SLASH_CHAR)
if (StaticStringBuf[i-1] == VISIT_SLASH_CHAR)
StaticStringBuf[i-1] = '\0';
else
StaticStringBuf[i] = '\0';
......
......@@ -1460,32 +1460,32 @@ echo "${ECHO_T}$VERSION" >&6
# Get the SVN version number.
echo "$as_me:$LINENO: checking what subversion revision is" >&5
echo $ECHO_N "checking what subversion revision is... $ECHO_C" >&6
if test -r SVN_REVISION; then
SVN_REVISION=`cat SVN_REVISION`
if test -r VISIT_SVN_REVISION; then
VISIT_SVN_REVISION=`cat VISIT_SVN_REVISION`
else
if test -d .svn; then
SVN_REVISION=`svn info . 2>/dev/null | grep "Revision:" | cut -d' ' -f2`
VISIT_SVN_REVISION=`svn info . 2>/dev/null | grep "Revision:" | cut -d' ' -f2`
else
SVN_REVISION="unknown"
VISIT_SVN_REVISION="unknown"
fi
fi
cat >>confdefs.h <<_ACEOF
#define SVN_REVISION "$SVN_REVISION"
#define VISIT_SVN_REVISION "$VISIT_SVN_REVISION"
_ACEOF
echo "$as_me:$LINENO: result: $SVN_REVISION" >&5
echo "${ECHO_T}$SVN_REVISION" >&6
echo "$as_me:$LINENO: result: $VISIT_SVN_REVISION" >&5
echo "${ECHO_T}$VISIT_SVN_REVISION" >&6
# Set the slash characters used in filenames.
cat >>confdefs.h <<_ACEOF
#define SLASH_CHAR '/'
#define VISIT_SLASH_CHAR '/'
_ACEOF
cat >>confdefs.h <<_ACEOF
#define SLASH_STRING "/"
#define VISIT_SLASH_STRING "/"
_ACEOF
......@@ -6330,17 +6330,17 @@ echo $ECHO_N "checking whether to use PTYs... $ECHO_C" >&6
# Check whether --with-pty or --without-pty was given.
if test "${with_pty+set}" = set; then
withval="$with_pty"
USE_PTY=$withval
VISIT_USE_PTY=$withval
else
USE_PTY="yes"
VISIT_USE_PTY="yes"
fi;
echo "$as_me:$LINENO: result: $USE_PTY" >&5
echo "${ECHO_T}$USE_PTY" >&6
echo "$as_me:$LINENO: result: $VISIT_USE_PTY" >&5
echo "${ECHO_T}$VISIT_USE_PTY" >&6
if test "$USE_PTY" = "yes"; then
if test "$VISIT_USE_PTY" = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define USE_PTY 1
#define VISIT_USE_PTY 1
_ACEOF
......@@ -11143,7 +11143,7 @@ fi
rm -f junk.txt
cat >>confdefs.h <<_ACEOF
#define OSMESA_SIZE_LIMIT $OSMESA_SIZE_LIMIT
#define VISIT_RENDERING_SIZE_LIMIT $OSMESA_SIZE_LIMIT
_ACEOF
CXXFLAGS="$oldcxxflags"
......@@ -11951,7 +11951,7 @@ if test -z "$SHLIB_LIBEXT" ; then SHLIB_LIBEXT="so"; fi
cat >>confdefs.h <<_ACEOF
#define PLUGIN_EXTENSION ".${SHLIB_SOEXT}"
#define VISIT_PLUGIN_EXTENSION ".${SHLIB_SOEXT}"
_ACEOF
......
......@@ -947,6 +947,9 @@ dnl
dnl Eric Brugger, Fri May 1 12:58:34 PDT 2009
dnl Added tools/mcurvit.
dnl
dnl Brad Whitlock, Mon May 4 13:14:20 PDT 2009
dnl Added VISIT_ to several defines for better namespace behavior
dnl
dnl --------------------------------------------------------------------------
dnl
......@@ -1002,21 +1005,21 @@ AC_MSG_RESULT($VERSION)
# Get the SVN version number.
AC_MSG_CHECKING(what subversion revision is)
if test -r SVN_REVISION; then
SVN_REVISION=`cat SVN_REVISION`
if test -r VISIT_SVN_REVISION; then
VISIT_SVN_REVISION=`cat VISIT_SVN_REVISION`
else
if test -d .svn; then
SVN_REVISION=`svn info . 2>/dev/null | grep "Revision:" | cut -d' ' -f2`
VISIT_SVN_REVISION=`svn info . 2>/dev/null | grep "Revision:" | cut -d' ' -f2`
else
SVN_REVISION="unknown"
VISIT_SVN_REVISION="unknown"
fi
fi
AC_DEFINE_UNQUOTED(SVN_REVISION,"$SVN_REVISION",[Subversion revision])
AC_MSG_RESULT($SVN_REVISION)
AC_DEFINE_UNQUOTED(VISIT_SVN_REVISION,"$VISIT_SVN_REVISION",[Subversion revision])
AC_MSG_RESULT($VISIT_SVN_REVISION)
# Set the slash characters used in filenames.
AC_DEFINE_UNQUOTED(SLASH_CHAR,'/',[Define the slash character])
AC_DEFINE_UNQUOTED(SLASH_STRING,"/",[Define the slash string])
AC_DEFINE_UNQUOTED(VISIT_SLASH_CHAR,'/',[Define the slash character])
AC_DEFINE_UNQUOTED(VISIT_SLASH_STRING,"/",[Define the slash string])
# Load the site configuration file if present.
# Also check for hostnames where the first field is a node name.
......@@ -2000,12 +2003,12 @@ AC_LANG_C
AC_MSG_CHECKING(whether to use PTYs)
AC_ARG_WITH(pty,
[ --without-pty Disable PTY use],
USE_PTY=$withval,
USE_PTY="yes")
AC_MSG_RESULT($USE_PTY)
VISIT_USE_PTY=$withval,
VISIT_USE_PTY="yes")
AC_MSG_RESULT($VISIT_USE_PTY)
if test "$USE_PTY" = "yes"; then
AC_DEFINE(USE_PTY, [1], [Define USE_PTY if we want to use PTYs.])
if test "$VISIT_USE_PTY" = "yes"; then
AC_DEFINE(VISIT_USE_PTY, [1], [Define VISIT_USE_PTY if we want to use PTYs.])
# Check for SYSV versus BSD style pseudo-ttys
AC_MSG_CHECKING(for SYSV vs BSD style ptys)
......@@ -3470,7 +3473,7 @@ AC_TRY_RUN([
AC_MSG_RESULT(Cross-compiling... assuming $OSMESA_SIZE_LIMIT)
)
rm -f junk.txt
AC_DEFINE_UNQUOTED(OSMESA_SIZE_LIMIT, $OSMESA_SIZE_LIMIT,
AC_DEFINE_UNQUOTED(VISIT_RENDERING_SIZE_LIMIT, $OSMESA_SIZE_LIMIT,
[OSMesa Window Size Limit.])
CXXFLAGS="$oldcxxflags"
LDFLAGS="$oldldflags"
......@@ -3752,7 +3755,7 @@ AC_SUBST(SHLIB_POSTPROCESS_PAR)
AC_SUBST(SHLIB_TMPDIR)
AC_SUBST(PREBIND_LIBS)
AC_DEFINE_UNQUOTED(PLUGIN_EXTENSION, ".${SHLIB_SOEXT}", [Shared library extension])
AC_DEFINE_UNQUOTED(VISIT_PLUGIN_EXTENSION, ".${SHLIB_SOEXT}", [Shared library extension])
#
# Now that we know about shared libraries, specify the engine wrapper library.
......
......@@ -96,16 +96,16 @@ avtAugDecompFileFormat::avtAugDecompFileFormat(const char *augd_filename,
{
ifstream ifile(augd_filename);
ifile >> filename;
if (filename[0] != SLASH_CHAR)
if (filename[0] != VISIT_SLASH_CHAR)
{
int len = strlen(augd_filename);
const char *last = augd_filename + (len-1);
while (*last != SLASH_CHAR && last > augd_filename)
while (*last != VISIT_SLASH_CHAR && last > augd_filename)
{
last--;
}
if (*last == SLASH_CHAR)
if (*last == VISIT_SLASH_CHAR)
{
char str[1024];
strcpy(str, augd_filename);
......
......@@ -717,7 +717,7 @@ avtBoxlibFileFormat::ReadHeader(void)
ifstream in;
string double_tmp;
string headerFilename = rootPath + timestepPath + SLASH_STRING + "Header";
string headerFilename = rootPath + timestepPath + VISIT_SLASH_STRING + "Header";
if (iDoReading)
in.open(headerFilename.c_str());
......@@ -1455,7 +1455,7 @@ avtBoxlibFileFormat::GetVisMF(int index)
{
if (!mfReaders[index])
{
string filename(rootPath + timestepPath + SLASH_STRING +
string filename(rootPath + timestepPath + VISIT_SLASH_STRING +
multifabFilenames[index]);
#if defined(_WIN32)
// If we're on Windows then make some extra passes through the filename
......@@ -2213,12 +2213,12 @@ GetDirName(const char *path)
int len = strlen(path);
const char *last = path + (len-1);
while (*last != SLASH_CHAR && last > path)
while (*last != VISIT_SLASH_CHAR && last > path)
{
last--;
}
if (*last != SLASH_CHAR)
if (*last != VISIT_SLASH_CHAR)
{
return "";
}
......
......@@ -275,7 +275,7 @@ avtImageFileFormat::ReadImageVolumeHeader(void)
const char *filename = fname.c_str();
char dir[1024];
const char *p = filename, *q = NULL;
while ((q = strstr(p, SLASH_STRING)) != NULL)
while ((q = strstr(p, VISIT_SLASH_STRING)) != NULL)
{
p = q+1;
}
......@@ -301,7 +301,7 @@ avtImageFileFormat::ReadImageVolumeHeader(void)
else
{
char line_with_dir[1024];
if (line[0] == SLASH_CHAR)
if (line[0] == VISIT_SLASH_CHAR)
{
strcpy(line_with_dir, line);
}
......
......@@ -256,12 +256,12 @@ avtADAPTFileFormat::GetGridFileName()
// Get the path to the filename that we're opening.
std::string path(filename);
pos = path.rfind(SLASH_STRING);
pos = path.rfind(VISIT_SLASH_STRING);
if(pos != std::string::npos)
{
path = path.substr(0, pos);
if(path.size() > 0 && path[path.size()-1] != SLASH_CHAR)
path += SLASH_STRING;
if(path.size() > 0 && path[path.size()-1] != VISIT_SLASH_CHAR)
path += VISIT_SLASH_STRING;
}
else
path = "";
......
......@@ -270,7 +270,7 @@ avtFVCOM_MTMDFileFormat::Init()
// Find a directory prefix based on the name of the master file.
std::string prefix;
std::string::size_type index = fileObject->GetName().rfind(SLASH_STRING);
std::string::size_type index = fileObject->GetName().rfind(VISIT_SLASH_STRING);
if(index != std::string::npos)
{
prefix = fileObject->GetName().substr(0, index+1);
......@@ -326,7 +326,7 @@ avtFVCOM_MTMDFileFormat::Init()
delete fobj;
std::string filename(domainfilename);
index = filename.rfind(SLASH_STRING);
index = filename.rfind(VISIT_SLASH_STRING);
if(index != std::string::npos)
{
filename = filename.substr(index+1, filename.size()-1);
......
......@@ -746,14 +746,14 @@ PF3DFileFormat::FilenameForDomain(int realDomain)
<< f.c_str() << endl;
// Find the directory prefix based on the path of the first master file.
std::string::size_type index = f.rfind(SLASH_STRING);
std::string::size_type index = f.rfind(VISIT_SLASH_STRING);
std::string vizDir("viz");
if(index != std::string::npos)
{
std::string path(f.substr(0, index));
debug4 << mName << "path = " << path << endl;
std::string::size_type index2 = path.rfind(SLASH_STRING);
std::string::size_type index2 = path.rfind(VISIT_SLASH_STRING);
if(index2 != std::string::npos)
{
vizDir = path.substr(index2+1);
......@@ -772,26 +772,26 @@ PF3DFileFormat::FilenameForDomain(int realDomain)
// Look for "/viz/" in the visnam string for the specified domain and use
// anything to the right of it.
std::string vizStr(SLASH_STRING);
std::string vizStr(VISIT_SLASH_STRING);
vizStr += "viz";
vizStr += SLASH_STRING;
vizStr += VISIT_SLASH_STRING;
f = std::string(master.Get_visname_for_domain(realDomain, 0));
index = f.rfind(vizStr);
if(index != std::string::npos)
middle = f.substr(index, f.size() - index);
if(middle.size() > 1)
{
if(middle[0] != SLASH_CHAR)
middle = std::string(SLASH_STRING) + middle;
if(middle[middle.size()-1] != SLASH_CHAR)
middle += SLASH_STRING;
if(middle[0] != VISIT_SLASH_CHAR)
middle = std::string(VISIT_SLASH_STRING) + middle;
if(middle[middle.size()-1] != VISIT_SLASH_CHAR)
middle += VISIT_SLASH_STRING;
// Replace "viz" with something else, if required.
std::string rhs(middle.substr(1,middle.size()-1));
std::string::size_type nextSlash = rhs.find(SLASH_STRING);
std::string::size_type nextSlash = rhs.find(VISIT_SLASH_STRING);
if(rhs.substr(nextSlash) != vizDir)
{
middle = std::string(SLASH_STRING) + vizDir +
middle = std::string(VISIT_SLASH_STRING) + vizDir +
rhs.substr(nextSlash, rhs.size() - nextSlash);
}
}
......@@ -2695,9 +2695,9 @@ PF3DFileFormat::MasterInformation::Get_dom_prefix_for_domain(int dom) const
if(retval.size() > 0)
{
if(retval[0] != '/')
retval = std::string(SLASH_STRING) + retval;
retval = std::string(VISIT_SLASH_STRING) + retval;
if(retval[retval.size()-1] != '/')
retval = retval + std::string(SLASH_STRING);
retval = retval + std::string(VISIT_SLASH_STRING);
}
}
......
......@@ -639,7 +639,7 @@ void vtkVisItPLOT3DReader::CollectInfo(char *x_file, char *s_file)
int lastSlash = -1;
for (int i = len-1; i >= 0; i--)
{
if (fap[i] == SLASH_CHAR)
if (fap[i] == VISIT_SLASH_CHAR)
{
lastSlash = i;
break;
......
......@@ -382,7 +382,7 @@ avtS3DFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md,
string timestepDir = CreateStringFromDouble(fileTimes[timeState]);
char path[256];
SNPRINTF(path,256,"%s%s%s%sfield.00000",dir.c_str(),SLASH_STRING, timestepDir.c_str(), SLASH_STRING);
SNPRINTF(path,256,"%s%s%s%sfield.00000",dir.c_str(),VISIT_SLASH_STRING, timestepDir.c_str(), VISIT_SLASH_STRING);
NcError err(NcError::verbose_nonfatal);
......@@ -726,7 +726,7 @@ avtS3DFileFormat::GetVar(int timeState, int domain, const char *varname)
// Open up the NetCDF file.
char path[256];
SNPRINTF(path,256,"%s%s%s%sfield.%05d",dir.c_str(),SLASH_STRING, timestepDir.c_str(), SLASH_STRING, domain);
SNPRINTF(path,256,"%s%s%s%sfield.%05d",dir.c_str(),VISIT_SLASH_STRING, timestepDir.c_str(), VISIT_SLASH_STRING, domain);
debug5 << "avtS3DFileFormat::GetVar: Full path to data file is " << path << endl;
NcFile nf(path);
......
......@@ -4543,7 +4543,7 @@ avtSAMRAIFileFormat::ReadDataset(hid_t &hdfFile, const char *dsPath,
//
// Modifications:
// Kathleen Bonnell, Mon Nov 3 17:53:33 PST 2008
// Use SLASH_CHAR instead of '/' so that this works on Windows.
// Use VISIT_SLASH_CHAR instead of '/' so that this works on Windows.
//
// ****************************************************************************
string
......@@ -4553,12 +4553,12 @@ GetDirName(const char *path)
int len = strlen(path);
const char *last = path + (len-1);
while (*last != SLASH_CHAR && last > path)
while (*last != VISIT_SLASH_CHAR && last > path)
{
last--;
}
if (*last != SLASH_CHAR)
if (*last != VISIT_SLASH_CHAR)
{
return "";
}
......
......@@ -721,7 +721,7 @@ avtSiloFileFormat::GetTimeVaryingInformation(DBfile *dbfile,
//
// Modifications:
// Brad Whitlock, Thu May 22 14:23:14 PST 2003
// I made it use SLASH_STRING so it works better on Windows.