Changeset 145 for trunk/lib/Gnuplot.cc


Ignore:
Timestamp:
Aug 9, 2006, 11:36:31 PM (15 years ago)
Author:
Jari Häkkinen
Message:

Removed test/parser.cc and test/stats.cc. These tests are an essential
part in the test/directory.cc and test/file.cc, and thus redundant.
Fixed the other tests to actually report success or failure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Gnuplot.cc

    r124 r145  
    7777
    7878 
    79   void Gnuplot::command(const std::string& cmdstr)
     79  int Gnuplot::command(const std::string& cmdstr)
    8080  {
    81     fputs(cmdstr.c_str(),pipe_);
    82     if (*(cmdstr.rbegin())!='\n')
    83       fputc('\n',pipe_);
    84     fflush(pipe_);
     81    if (fputs(cmdstr.c_str(),pipe_)==EOF)
     82      return EOF;
     83    if ((*(cmdstr.rbegin())!='\n') && (fputc('\n',pipe_)==EOF))
     84      return EOF;
     85    return fflush(pipe_);
    8586  }
    8687
Note: See TracChangeset for help on using the changeset viewer.