Diffstat (limited to 'core/apps/embeddedkonsole/TEHistory.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/apps/embeddedkonsole/TEHistory.h | 42 |
1 files changed, 12 insertions, 30 deletions
diff --git a/core/apps/embeddedkonsole/TEHistory.h b/core/apps/embeddedkonsole/TEHistory.h index 11eb150..fcf6496 100644 --- a/core/apps/embeddedkonsole/TEHistory.h +++ b/core/apps/embeddedkonsole/TEHistory.h @@ -22,27 +22,4 @@ #include "TECommon.h" -/* - An extendable tmpfile(1) based buffer. -*/ -class HistoryBuffer -{ -public: - HistoryBuffer(); - ~HistoryBuffer(); - -public: - void setScroll(bool on); - bool hasScroll(); - -public: - void add(const unsigned char* bytes, int len); - void get(unsigned char* bytes, int len, int loc); - int len(); - -private: - int ion; - int length; -}; - class HistoryScroll { @@ -52,23 +29,28 @@ public: public: + void setSize(int lines, int cells); void setScroll(bool on); bool hasScroll(); -public: // access to history int getLines(); int getLineLen(int lineno); - void getCells(int lineno, int colno, int count, ca res[]); + void getCells(int lineno, int colno, int count, ca *res); -public: // backward compatibility (obsolete) ca getCell(int lineno, int colno) { ca res; getCells(lineno,colno,1,&res); return res; } -public: // adding lines. - void addCells(ca a[], int count); + void addCells(ca *text, int count); void addLine(); private: int startOfLine(int lineno); - HistoryBuffer index; // lines Row(int) - HistoryBuffer cells; // text Row(ca) + + int m_max_lines; + int *m_lines; + int m_max_cells; + ca *m_cells; + int m_first_line; + int m_last_cell; + int m_num_lines; + int m_start_line; }; |