mexStream.cpp 366 B

123456789101112131415161718
  1. #include "mexStream.h"
  2. #include "mex.h"
  3. std::streamsize igl::mexStream::xsputn(const char *s, std::streamsize n)
  4. {
  5. mexPrintf("%.*s",n,s);
  6. mexEvalString("drawnow;"); // to dump string.
  7. return n;
  8. }
  9. int igl::mexStream::overflow(int c)
  10. {
  11. if (c != EOF) {
  12. mexPrintf("%.1s",&c);
  13. mexEvalString("drawnow;"); // to dump string.
  14. }
  15. return 1;
  16. }