Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 13 additions & 25 deletions src/util/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Author: Daniel Kroening, kroening@kroening.com
#include "std_expr.h"
#include "cprover_prefix.h"
#include "string2int.h"
#include "string_utils.h"

configt config;

Expand Down Expand Up @@ -1286,31 +1287,18 @@ irep_idt configt::this_architecture()

void configt::set_classpath(const std::string &cp)
{
std::string current;
for(std::size_t pos=0; pos<cp.size(); pos++)
{
// These are separated by colons on Unix, and semicolons on
// Windows.
#ifdef _WIN32
const char cp_separator=';';
#else
const char cp_separator=':';
#endif

if(cp[pos]==cp_separator)
{
if(!current.empty())
{
java.classpath.push_back(current);
current.clear();
}
}
else
current+=cp[pos];
}

if(!current.empty())
java.classpath.push_back(current);
// These are separated by colons on Unix, and semicolons on
// Windows.
#ifdef _WIN32
const char cp_separator = ';';
#else
const char cp_separator = ':';
#endif

std::vector<std::string> class_path;
split_string(cp, cp_separator, class_path);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit pick: typo in commit message (it currently says "string_split")

java.classpath.insert(
java.classpath.end(), class_path.begin(), class_path.end());
}

irep_idt configt::this_operating_system()
Expand Down