Changeset 107 for trunk/lib/Gnuplot.cc


Ignore:
Timestamp:
Jun 28, 2006, 11:12:38 AM (15 years ago)
Author:
Peter Johansson
Message:

Gnuplot functions returning int and utilizing that in the test. However the warning sent from Gnuplot ref #37 is not caught since there is no problem with the pipe there.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Gnuplot.cc

    r101 r107  
    7979  int Gnuplot::command(const std::string& cmdstr)
    8080  {
     81    std::cout << cmdstr << std::endl;
    8182    int r = fputs(cmdstr.c_str(),pipe_);
    82     if (*(cmdstr.rbegin())!='\n')
    83       fputc('\n',pipe_);
    84     fflush(pipe_);
    85     return r;
     83    if (!r && *(cmdstr.rbegin())!='\n')
     84      r=fputc('\n',pipe_);
     85    return (r ? r : fflush(pipe_));
    8686  }
    8787
Note: See TracChangeset for help on using the changeset viewer.