alalphabetized routines

git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@8640 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
Scott R Charlton 2014-04-09 05:34:21 +00:00
parent c097d609bd
commit 8bef87f09d
2 changed files with 857 additions and 851 deletions

50
R/R.cpp
View File

@ -408,7 +408,31 @@ getSelectedOutputFileName(void)
}
SEXP
getSelectedOutputStringLst(void)
getSelectedOutputStrings(void)
{
SEXP ans = R_NilValue;
const char* cstr = R::singleton().GetSelectedOutputString();
if (cstr && cstr[0]) {
std::string str(cstr);
std::istringstream iss(str);
std::string line;
std::vector< std::string > lines;
while (std::getline(iss, line))
{
lines.push_back(line);
}
PROTECT(ans = allocVector(STRSXP, lines.size()));
for (size_t i = 0; i < lines.size(); ++i)
{
SET_STRING_ELT(ans, i, mkChar(lines[i].c_str()));
}
UNPROTECT(1);
}
return ans;
}
SEXP
getSelectedOutputStringsLst(void)
{
SEXP list;
SEXP attr;
@ -440,30 +464,6 @@ getSelectedOutputStringLst(void)
return list;
}
SEXP
getSelectedOutputStrings(void)
{
SEXP ans = R_NilValue;
const char* cstr = R::singleton().GetSelectedOutputString();
if (cstr && cstr[0]) {
std::string str(cstr);
std::istringstream iss(str);
std::string line;
std::vector< std::string > lines;
while (std::getline(iss, line))
{
lines.push_back(line);
}
PROTECT(ans = allocVector(STRSXP, lines.size()));
for (size_t i = 0; i < lines.size(); ++i)
{
SET_STRING_ELT(ans, i, mkChar(lines[i].c_str()));
}
UNPROTECT(1);
}
return ans;
}
SEXP
getSelOut(void)
{

File diff suppressed because it is too large Load Diff