Skip to content
Snippets Groups Projects
Commit 6ffc0177 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

corr

parent 9555cc97
No related branches found
No related tags found
No related merge requests found
......@@ -230,8 +230,8 @@ void NFileIO::Load_01( FILE *F_in, string flong )
if (key=="fil ") {
if (val!=fshort) {
cout << "warning: file " << fshort <<
" renamed from " << val << "\n";
cout << "warning: file '" << fshort <<
"' renamed from '" << val << "'\n";
}
old.name = fshort;
} else if (key=="doc ") {
......@@ -332,8 +332,8 @@ void NFileIO::Load_96( FILE *F_in, string flong )
if ( mystd::freadln(F_in, &lin)<=0 || lin.length()<24 ||
lin.substr(0,3)!=string("fil") )
throw string( "tag 'fil' not found in block 2" );
if ( lin.substr(24)!=fshort ) {
cout << "warning: file '" << fshort <<
if ( mystd::strip(lin.substr(24))!=fshort ) {
cout << "warning: i96 file '" << fshort <<
"' renamed from '" << lin.substr(24) << "'\n";
}
......
File added
......@@ -80,6 +80,21 @@ string strg(const char& val)
}
//**************************************************************************//
//* string operations *//
//**************************************************************************//
string mystd::strip(
string const& str, ///< the original string
char const* sepSet ///< C string with characters to be dropped
)
{
string::size_type const first = str.find_first_not_of(sepSet);
return ( first==std::string::npos )
? std::string()
: str.substr(first, str.find_last_not_of(sepSet)-first+1);
}
//**************************************************************************//
//* yaml *//
//**************************************************************************//
......
......@@ -33,6 +33,9 @@ namespace mystd {
void string_extract_word( const string in, string *out1, string *out2 );
void string_extract_line( const string in, string *out1, string *out2 );
//! string operations
string strip( string const& str, char const* sepSet=" \n" );
//! improved libc calls
void system( string cmd );
......
#!/bin/bash
cd pub;make maintainer-clean;cd ..
git add .
git commit -a
git push ssh://wuttke@iffjcns.iff.kfa-juelich.de/~wuttke/public_html/frida2.git master
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment