
//
// VT100 emulator for nonVT100 terminals
//


class Hardcopy_from_VT100 : public VT100emulator
{
  char scr[26][81];
  int  CurV =1,     // cursor line   [1-25]
       CurH =1;     //        column [1-80]
  int  nextV =1,    // place next write is expected
       nextH =1;

  char     nlcr_check_char =NULL;         // check for \n\r pairs.
  void     move_to   (int cv, int ch);

  void     scroll_up();

 public:
           Hardcopy_from_VT100() { initialize(); };
  void     initialize();
  void          ED (int);
  void          EL (int);
  virtual void  CUP(int x,int y);

  int IncrementalWrite(char*buf,int nchars);

  virtual int      write (char*,int);
  virtual void     insert(char);

  void     flush();
  void     refresh();
};
typedef Hardcopy_from_VT100 VT100_Hardcopy;

// Documentation in hardbart.cc file.
class Hardcopy_from_VT100barton : public Hardcopy_from_VT100
{
  bool    maybe_doing_clearing_wsp =0;
 public:
  virtual void     CUP(int x, int y);
  virtual void     insert(char);
};
typedef Hardcopy_from_VT100barton VT100_Hardcopy_Barton;
