octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to break out of a computation?


From: Sebastien Loisel
Subject: Re: How to break out of a computation?
Date: Mon, 20 Feb 2006 23:58:47 +0100

On 2/20/06, Sebastien Loisel <address@hidden> wrote:
| Do you suggest a different approach?

If the code in pager.cc is close to what you want, but doesn't quite
do everything you need, then we can probably fix things so that it
will work for you.  You may have to suggest changes.  But I think that
would be better than duplicating much of that code on your own.

octave_pager_buf in initialization, which in my embedder gets overwritten by another streambuf implementation, which is what you're saying I shouldn't do.

Although, to put things in perspective, my entire code for the streambuf is

struct mybuf : streambuf
{
  QString buf;
  MainWindow *mw;
  mybuf(MainWindow *MW) : mw(MW) {}
  virtual int overflow(int c=EOF)
  {
    buf.append(QChar(c));
    if(c=='\n')
      {
        mw->append(buf);
        buf=QString();
      }
    return 0;
  }
};


so there's not that much code duplication anyway.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]