Skip to content

Commit

Permalink
Per #1700, no code changes. Just removing commented out code.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnHalleyGotway committed Apr 23, 2021
1 parent 94279ac commit bf6e760
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 54 deletions.
File renamed without changes.
69 changes: 15 additions & 54 deletions met/src/basic/vx_util/data_line.cc
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,12 @@ out << prefix << "\n";

if ( N_items == 0 ) { out.flush(); return; }

// std::ostringstream sstream;
// sstream.width(2);

for (j=0; j<N_items; ++j) {

snprintf(junk, sizeof(junk), "Item[%2d] = \"", j);

out << prefix << junk << Items[j] << "\"\n";

// sstream << "Item[" << j << "] = \"";
// out << prefix << sstream.str() << Line.substr(j) << "\"\n";

if ( (j%5) == 4 ) out << prefix << '\n';

out.flush();
Expand All @@ -213,26 +207,18 @@ for (j=0; j<N_items; ++j) {

out << prefix << "\n";


// sstream.str("");
// sstream.clear();

for (j=0; j<N_items; ++j) {

snprintf(junk, sizeof(junk), "Offset[%2d] = ", j);

out << prefix << junk << Offset[j] << '\n';

// sstream << "Offset[" << j << "] = ";
// out << prefix << sstream.str() << Offset[j] << "\n";

if ( (j%5) == 4 ) out << prefix << '\n';

out.flush();

}


//
// done
//
Expand Down Expand Up @@ -276,7 +262,7 @@ const LineDataFile * DataLine::get_file() const

{

return File;
return File;

}

Expand Down Expand Up @@ -333,19 +319,15 @@ clear();

size_t pos, count;


pos = 0;
count = 0;


//
// get a line from the file
//


if ( ! read_single_text_line(ldf) ) { clear(); return ( 0 ); }


//
// parse the line with strtok
//
Expand Down Expand Up @@ -384,6 +366,7 @@ return ( 1 );
int DataLine::read_fwf_line(LineDataFile * ldf, const int *wdth, int n_wdth)

{

const char *method_name = "DataLine::read_fwf_line() -> ";

clear();
Expand Down Expand Up @@ -420,7 +403,6 @@ for( i=0; i<n_wdth; i++ ) {
if ( !f ) { clear(); return ( 0 ); }

++count;


//
// get the next entry
Expand Down Expand Up @@ -516,7 +498,6 @@ bool DataLine::is_header() const

{

// return ( false );
return ( IsHeader );

}
Expand All @@ -528,7 +509,9 @@ return ( IsHeader );
void DataLine::set_delimiter(const char *delimiter)

{
Delimiter.assign(delimiter);

Delimiter.assign(delimiter);

}


Expand All @@ -539,21 +522,19 @@ bool DataLine::read_single_text_line(LineDataFile * ldf)

{

////////////////////////////////////////////////////
#ifdef WITH_PYTHON

PyLineDataFile * pldf = dynamic_cast<PyLineDataFile *>(ldf);
PyLineDataFile * pldf = dynamic_cast<PyLineDataFile *>(ldf);

if ( pldf ) {
if ( pldf ) {

const bool status = read_py_single_text_line(pldf);
const bool status = read_py_single_text_line(pldf);

return ( status );
return ( status );

}
}

#endif /* WITH_PYTHON */
////////////////////////////////////////////////////

ifstream & f = *(ldf->in);

Expand Down Expand Up @@ -606,6 +587,7 @@ return ( true );

#endif /* WITH_PYTHON */


////////////////////////////////////////////////////////////////////////


Expand Down Expand Up @@ -848,6 +830,7 @@ for (j=0; j<a.n_items(); ++j) {

}


return;

}
Expand Down Expand Up @@ -907,6 +890,7 @@ out.put('\n');

out.flush();


return ( out );

}
Expand All @@ -921,41 +905,18 @@ Logger & operator<<(Logger & lgr, const DataLine & L)

if ( L.n_items() == 0 ) return ( lgr );

int j;

// k = L.N_items - 1; // last item
//
// N = L.Offset[k] + strlen(L[k]);
//
// for (j=0; j<N; ++j) {
//
// c = L.Line[j];
//
// //
// // patch the nul chars put there by strtok
// //
//
// if ( c == 0 ) lgr << ' ';
// else lgr << c;
//
// }

for (j = 0; j < L.Items.size(); j++) {
for (int j = 0; j < L.Items.size(); j++) {
lgr << L.Items[j];
if (j < (L.Items.size() - 1))
lgr << ' ';
}


lgr << '\n';


return ( lgr );

}


////////////////////////////////////////////////////////////////////////




0 comments on commit bf6e760

Please sign in to comment.