[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    PATCH, konsole history, take 3
From:       Guillaume Laurent <glaurent () telegraph-road ! org>
Date:       2001-06-04 14:27:00
[Download RAW message or body]

The attached patch corrects all the previously mentionned problems, except 
for the saving of the settings which has to be explicitely done with the 
"Save settings" menu item. AFAICT, this is how all parameters in konsole are 
saved. Nothing is saved on shutdown.

-- 
					Guillaume.
					http://www.telegraph-road.org

["konsole_history_v3.patch" (text/x-c)]

Index: include/BlockArray.h
===================================================================
RCS file: /home/kde/kdebase/konsole/include/BlockArray.h,v
retrieving revision 1.2
diff -u -r1.2 BlockArray.h
--- include/BlockArray.h	2001/02/01 21:54:28	1.2
+++ include/BlockArray.h	2001/06/04 14:23:24
@@ -3,7 +3,7 @@
 
 #include <unistd.h>
 
-#error Dont use in KDE 2.1
+//#error Dont use in KDE 2.1
 
 #define BlockSize (1 << 12)
 #define ENTRIES   ((BlockSize - sizeof(size_t) ) / sizeof(unsigned char))
@@ -73,6 +73,8 @@
     size_t len() const { return length; }
 
     bool has(size_t index) const;
+
+    size_t getCurrent() const { return current; }
 
 private:
     void unmap();
Index: include/TEHistory.h
===================================================================
RCS file: /home/kde/kdebase/konsole/include/TEHistory.h,v
retrieving revision 1.4
diff -u -r1.4 TEHistory.h
--- include/TEHistory.h	2001/02/01 21:54:28	1.4
+++ include/TEHistory.h	2001/06/04 14:23:24
@@ -13,57 +13,240 @@
 #ifndef TEHISTORY_H
 #define TEHISTORY_H
 
+#include <qcstring.h>
+#include <qvector.h>
+
 #include "TECommon.h"
 
+#if 0
 /*
    An extendable tmpfile(1) based buffer.
 */
-class HistoryBuffer
-{
-public:
-  HistoryBuffer();
- ~HistoryBuffer();
 
+class HistoryFile
+{
 public:
-  void setScroll(bool on);
-  bool hasScroll();
+  HistoryFile();
+  virtual ~HistoryFile();
 
-public:
-  void add(const unsigned char* bytes, int len);
-  void get(unsigned char* bytes, int len, int loc);
-  int  len();
+  virtual void add(const unsigned char* bytes, int len);
+  virtual void get(unsigned char* bytes, int len, int loc);
+  virtual int  len();
 
 private:
   int  ion;
   int  length;
 };
+#endif
 
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// Abstract base class for file and buffer versions
+//////////////////////////////////////////////////////////////////////
+class HistoryType;
+
 class HistoryScroll
 {
 public:
-  HistoryScroll();
- ~HistoryScroll();
+  HistoryScroll(HistoryType*);
+ virtual ~HistoryScroll();
 
-public:
-  void setScroll(bool on);
-  bool hasScroll();
+  virtual bool hasScroll();
 
-public: // access to history
-  int  getLines();
-  int  getLineLen(int lineno);
-  void getCells(int lineno, int colno, int count, ca res[]);
+  // access to history
+  virtual int  getLines() = 0;
+  virtual int  getLineLen(int lineno) = 0;
+  virtual void getCells(int lineno, int colno, int count, ca res[]) = 0;
 
-public: // backward compatibility (obsolete)
+  // backward compatibility (obsolete)
   ca   getCell(int lineno, int colno) { ca res; getCells(lineno,colno,1,&res); \
return res; } +
+  // adding lines.
+  virtual void addCells(ca a[], int count) = 0;
+  virtual void addLine() = 0;
+
+  const HistoryType& getType() { return *m_histType; }
 
-public: // adding lines.
-  void addCells(ca a[], int count);
-  void addLine();
+protected:
+  HistoryType* m_histType;
 
+};
+
+#if 0
+
+//////////////////////////////////////////////////////////////////////
+// File-based history (e.g. file log, no limitation in length)
+//////////////////////////////////////////////////////////////////////
+
+class HistoryScrollFile : public HistoryScroll
+{
+public:
+  HistoryScrollFile(const QString &logFileName);
+  virtual ~HistoryScrollFile();
+
+  virtual int  getLines();
+  virtual int  getLineLen(int lineno);
+  virtual void getCells(int lineno, int colno, int count, ca res[]);
+
+  virtual void addCells(ca a[], int count);
+  virtual void addLine();
+
 private:
   int startOfLine(int lineno);
-  HistoryBuffer index; // lines Row(int)
-  HistoryBuffer cells; // text  Row(ca)
+
+  QString m_logFileName;
+  HistoryFile index; // lines Row(int)
+  HistoryFile cells; // text  Row(ca)
+};
+
+
+//////////////////////////////////////////////////////////////////////
+// Buffer-based history (limited to a fixed nb of lines)
+//////////////////////////////////////////////////////////////////////
+class HistoryScrollBuffer : public HistoryScroll
+{
+public:
+  typedef QArray<ca> histline;
+
+  HistoryScrollBuffer(unsigned int maxNbLines = 1000);
+  virtual ~HistoryScrollBuffer();
+
+  virtual int  getLines();
+  virtual int  getLineLen(int lineno);
+  virtual void getCells(int lineno, int colno, int count, ca res[]);
+
+  virtual void addCells(ca a[], int count);
+  virtual void addLine();
+
+  void setMaxNbLines(unsigned int nbLines);
+  unsigned int maxNbLines() { return m_maxNbLines; }
+
+private:
+
+  bool m_hasScroll;
+  QVector<histline> m_histBuffer;
+  unsigned int m_maxNbLines;
+  unsigned int m_nbLines;
+  unsigned int m_arrayIndex;
+  
+};
+
+#endif
+
+//////////////////////////////////////////////////////////////////////
+// Nothing-based history (no history :-)
+//////////////////////////////////////////////////////////////////////
+class HistoryScrollNone : public HistoryScroll
+{
+public:
+  HistoryScrollNone();
+  virtual ~HistoryScrollNone();
+
+  virtual bool hasScroll();
+
+  virtual int  getLines();
+  virtual int  getLineLen(int lineno);
+  virtual void getCells(int lineno, int colno, int count, ca res[]);
+
+  virtual void addCells(ca a[], int count);
+  virtual void addLine();
 };
+
+//////////////////////////////////////////////////////////////////////
+// BlockArray-based history
+//////////////////////////////////////////////////////////////////////
+#include "BlockArray.h"
+#include <qintdict.h>
+class HistoryScrollBlockArray : public HistoryScroll
+{
+public:
+  HistoryScrollBlockArray(size_t size);
+  virtual ~HistoryScrollBlockArray();
+
+  virtual int  getLines();
+  virtual int  getLineLen(int lineno);
+  virtual void getCells(int lineno, int colno, int count, ca res[]);
+
+  virtual void addCells(ca a[], int count);
+  virtual void addLine();
+
+protected:
+  BlockArray m_blockArray;
+  QIntDict<size_t> m_lineLengths;
+};
+
+//////////////////////////////////////////////////////////////////////
+// History type
+//////////////////////////////////////////////////////////////////////
+
+class HistoryType
+{
+public:
+  HistoryType();
+  virtual ~HistoryType();
+
+  virtual bool isOn()                const = 0;
+  virtual unsigned int getSize()     const = 0;
+
+  virtual HistoryScroll* getScroll() const = 0;
+};
+
+class HistoryTypeNone : public HistoryType
+{
+public:
+  HistoryTypeNone();
+
+  virtual bool isOn() const;
+  virtual unsigned int getSize() const;
+
+  virtual HistoryScroll* getScroll() const;
+};
+
+class HistoryTypeBlockArray : public HistoryType
+{
+public:
+  HistoryTypeBlockArray(size_t size);
+  
+  virtual bool isOn() const;
+  virtual unsigned int getSize() const;
+
+  virtual HistoryScroll* getScroll() const;
+
+protected:
+  size_t m_size;
+};
+
+#if 0 // Disabled for now 
+class HistoryTypeFile : public HistoryType
+{
+public:
+  HistoryTypeFile(const QString& fileName);
+
+  virtual bool isOn() const;
+  virtual const QString& getFileName() const;
+
+  virtual HistoryScroll* getScroll() const;
+
+protected:
+  QString m_fileName;
+};
+
+
+class HistoryTypeBuffer : public HistoryType
+{
+public:
+  HistoryTypeBuffer(unsigned int nbLines);
+  
+  virtual bool isOn() const;
+  virtual unsigned int getNbLines() const;
+
+  virtual HistoryScroll* getScroll() const;
+
+protected:
+  unsigned int m_nbLines;
+};
+
+#endif
 
 #endif // TEHISTORY_H
Index: include/TEScreen.h
===================================================================
RCS file: /home/kde/kdebase/konsole/include/TEScreen.h,v
retrieving revision 1.10
diff -u -r1.10 TEScreen.h
--- include/TEScreen.h	2000/01/29 01:47:35	1.10
+++ include/TEScreen.h	2001/06/04 14:23:25
@@ -143,7 +143,8 @@
     int  getHistCursor();
 
     int  getHistLines ();
-    void setScroll(bool on);
+    void setScroll(const HistoryType&);
+    const HistoryType& getScroll();
     bool hasScroll();
 
     //
@@ -192,7 +193,7 @@
     // history buffer ---------------
 
     int histCursor;   // display position relative to start of the history buffer
-    HistoryScroll hist;
+    HistoryScroll *hist;
     
     // cursor location
 
Index: include/TEmulation.h
===================================================================
RCS file: /home/kde/kdebase/konsole/include/TEmulation.h,v
retrieving revision 1.11
diff -u -r1.11 TEmulation.h
--- include/TEmulation.h	2001/03/19 14:34:01	1.11
+++ include/TEmulation.h	2001/06/04 14:23:25
@@ -29,8 +29,8 @@
   ~TEmulation();
 
 public:
-  virtual void setHistory(bool on);
-  virtual bool history();
+  virtual void setHistory(const HistoryType&);
+  virtual const HistoryType& history();
 
 public slots: // signals incoming from TEWidget
 
@@ -80,7 +80,6 @@
   void setCodec(int c); // codec number, 0 = locale, 1=utf8
 
   QTextCodec* codec;
-  QTextCodec* localeCodec;
   QTextDecoder* decoder;
 
   KeyTrans* keytrans;
@@ -101,7 +100,6 @@
 
   QTimer bulk_timer;
   int    bulk_nlcnt;   // bulk newline counter
-  char*  SelectedText;
   int    bulk_incnt;   // bulk counter
 
 
Index: include/konsole.h
===================================================================
RCS file: /home/kde/kdebase/konsole/include/konsole.h,v
retrieving revision 1.39
diff -u -r1.39 konsole.h
--- include/konsole.h	2001/05/20 20:41:28	1.39
+++ include/konsole.h	2001/06/04 14:23:25
@@ -98,6 +98,7 @@
   void slotToggleMenubar();
   void slotToggleFrame();
   void slotRenameSession();
+  void slotHistoryType();
   void slotWordSeps();
   void slotSelectSize();
   void slotSelectFont();
@@ -115,8 +116,6 @@
   void addSession(TESession* s);
   void setColorPixmaps();
 
-  void setHistory(bool);
-
   void setSchema(const QString & path);
   void setSchema(ColorSchema* s);
   void setFont(int fontno);
@@ -192,9 +191,38 @@
   bool        b_warnQuit:1;
   bool        alreadyNoticedBackgroundChange_:1;
 
+  unsigned int m_histSize;
+  bool         b_histEnabled:1;
+
 public:
 
   QString     title;
 };
+
+class QSpinBox;
+#include <kdialogbase.h>
+
+class HistoryTypeDialog : public KDialogBase 
+{
+    Q_OBJECT
+public:
+  HistoryTypeDialog(const HistoryType& histType,
+                    unsigned int histSize,
+                    QWidget *parent);
+
+public slots:
+
+  void slotHistEnable(bool);
+
+  unsigned int nbLines() const;
+
+  bool isOn()         { return m_isOn; }
+
+protected:
+  QSpinBox*  m_size;
+  bool m_isOn;
+};
+
+
 
 #endif
Index: include/session.h
===================================================================
RCS file: /home/kde/kdebase/konsole/include/session.h,v
retrieving revision 1.17
diff -u -r1.17 session.h
--- include/session.h	2001/03/10 21:13:43	1.17
+++ include/session.h	2001/06/04 14:23:26
@@ -40,10 +40,11 @@
   int fontNo();
   const char* emuName();
   const QString& Title();
-  bool history();
   int keymap();
 
-  void setHistory(bool on);
+  void setHistory(const HistoryType&);
+  const HistoryType& history();
+
   void setSchemaNo(int sn);
   void setKeymapNo(int kn);
   void setFontNo(int fn);
Index: src/BlockArray.C
===================================================================
RCS file: /home/kde/kdebase/konsole/src/BlockArray.C,v
retrieving revision 1.2
diff -u -r1.2 BlockArray.C
--- src/BlockArray.C	2000/10/29 23:34:07	1.2
+++ src/BlockArray.C	2001/06/04 14:23:26
@@ -9,14 +9,18 @@
 static int blocksize = 0;
 
 BlockArray::BlockArray()
-    : size(0), lastmap(0), lastblock(0), ion(-1), length(0)
+    : size(0),
+      current(-1),
+      index(-1),
+      lastmap(0),
+      lastmap_index(-1),
+      lastblock(0), ion(-1),
+      length(0)
 {
-    lastmap_index = index = current = size_t(-1);
+    // lastmap_index = index = current = size_t(-1);
     if (blocksize == 0)
         blocksize = ((sizeof(Block) / getpagesize()) + 1) * getpagesize();
 
-    if (!size)
-        return;
 }
 
 BlockArray::~BlockArray()
@@ -29,15 +33,19 @@
 {
     if (!size)
         return size_t(-1);
+
+    ++current;
+    if (current >= size) current = 0;
 
-    current = ++current % size;
     int rc;
     rc = lseek(ion, current * blocksize, SEEK_SET); if (rc < 0) { \
                perror("HistoryBuffer::add.seek"); setHistorySize(0); return \
                size_t(-1); }
     rc = write(ion, block, blocksize); if (rc < 0) { \
perror("HistoryBuffer::add.write"); setHistorySize(0); return size_t(-1); } +
     length++;
-    if (length>size)
-        length=size;
-    index++;
+    if (length > size) length = size;
+
+    ++index;
+
     delete block;
     return current;
 }
@@ -69,7 +77,7 @@
     return true;
 }
 
-const Block *BlockArray::at(size_t i)
+const Block* BlockArray::at(size_t i)
 {
     if (i == index + 1)
         return lastblock;
@@ -77,20 +85,28 @@
     if (i == lastmap_index)
         return lastmap;
 
-    if (i > index)
+    if (i > index) {
+        kdDebug() << "BlockArray::at() i > index\n";
         return 0;
-    if (index - i >= length)
-        return 0;
-    size_t j = (current - (index - i) + (index/size+1)*size) % size;
+    }
+    
+//     if (index - i >= length) {
+//         kdDebug() << "BlockArray::at() index - i >= length\n";
+//         return 0;
+//     }
 
+    size_t j = i; // (current - (index - i) + (index/size+1)*size) % size ;
+
     assert(j < size);
     unmap();
 
     Block *block = (Block*)mmap(0, blocksize, PROT_READ, MAP_PRIVATE, ion, j * \
blocksize);  
     if (block == (Block*)-1) { perror("mmap"); return 0; }
+
     lastmap = block;
     lastmap_index = i;
+
     return block;
 }
 
@@ -176,7 +192,7 @@
     res = fwrite(buffer2, blocksize, 1, fion);
     if (res != 1)
         perror("fwrite");
-    printf("moving block %d to %d\n", cursor, newpos);
+    //    printf("moving block %d to %d\n", cursor, newpos);
 }
 
 void BlockArray::decreaseBuffer(size_t newsize)
Index: src/Makefile.am
===================================================================
RCS file: /home/kde/kdebase/konsole/src/Makefile.am,v
retrieving revision 1.65
diff -u -r1.65 Makefile.am
--- src/Makefile.am	2001/03/23 01:05:09	1.65
+++ src/Makefile.am	2001/06/04 14:23:26
@@ -20,7 +20,7 @@
 # libkonsolepart is a part, but konsole.la links directly to it, so we can't
 # install it under kde_module
 
-libkonsolepart_la_SOURCES = TEPty.C \
+libkonsolepart_la_SOURCES = BlockArray.C TEPty.C \
 	schema.C \
 	session.C \
 	TEWidget.C \
@@ -50,7 +50,7 @@
 konsole_la_LDFLAGS = $(all_libraries) -module -avoid-version
 
 # konsole executable - has all the sources, doesn't link kparts, saves startup time
-konsole_SOURCES	= TEPty.C main.C konsole.C schema.C session.C TEWidget.C TEmuVt102.C \
\ +konsole_SOURCES	= BlockArray.C TEPty.C main.C konsole.C schema.C session.C \
TEWidget.C TEmuVt102.C \  TEScreen.C TEmulation.C TEHistory.C keytrans.C 
 konsole_LDADD = $(LIB_KDEUI) $(LIB_KSYCOCA) $(LIBUTEMPTER) $(LIBUTIL)
 konsole_LDFLAGS = $(all_libraries) $(KDE_RPATH)
Index: src/TEHistory.C
===================================================================
RCS file: /home/kde/kdebase/konsole/src/TEHistory.C,v
retrieving revision 1.12
diff -u -r1.12 TEHistory.C
--- src/TEHistory.C	2001/03/17 14:30:42	1.12
+++ src/TEHistory.C	2001/06/04 14:23:27
@@ -17,6 +17,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 #include <errno.h>
+#include <kdebug.h>
 
 #ifndef HERE
 #define HERE printf("%s(%d): here\n",__FILE__,__LINE__)
@@ -58,6 +59,8 @@
 
 //#define tmpfile xTmpFile
 
+#if 0
+
 FILE* xTmpFile()
 {
   static int fid = 0;
@@ -67,72 +70,72 @@
 }
 
 
-// History Buffer ///////////////////////////////////////////
+// History File ///////////////////////////////////////////
 
 /*
-   A Row(X) data type which allows adding elements to the end.
+  A Row(X) data type which allows adding elements to the end.
 */
 
-HistoryBuffer::HistoryBuffer()
+HistoryFile::HistoryFile()
+  : ion(-1),
+    length(0)
 {
-  ion    = -1;
-  length = 0;
+  FILE* tmp = tmpfile(); if (!tmp) { perror("konsole: cannot open temp file.\n"); \
return; } +  ion = dup(fileno(tmp)); if (ion<0) perror("konsole: cannot dup temp \
file.\n"); +  fclose(tmp);
 }
 
-HistoryBuffer::~HistoryBuffer()
+HistoryFile::~HistoryFile()
 {
-  setScroll(FALSE);
+  close(ion);
 }
 
-void HistoryBuffer::setScroll(bool on)
+void HistoryFile::add(const unsigned char* bytes, int len)
 {
-  if (on == hasScroll()) return;
+  int rc = 0;
 
-  if (on)
-  {
-    assert( ion < 0 );
-    assert( length == 0);
-    FILE* tmp = tmpfile(); if (!tmp) { perror("konsole: cannot open temp file.\n"); \
                return; }
-    ion = dup(fileno(tmp)); if (ion<0) perror("konsole: cannot dup temp file.\n");
-    fclose(tmp);
-  }
-  else
-  {
-    assert( ion >= 0 );
-    close(ion);
-    ion    = -1;
-    length = 0;
-  }
+  rc = lseek(ion,length,SEEK_SET); if (rc < 0) { perror("HistoryFile::add.seek"); \
return; } +  rc = write(ion,bytes,len);       if (rc < 0) { \
perror("HistoryFile::add.write"); return; } +  length += rc;
 }
 
-bool HistoryBuffer::hasScroll()
+void HistoryFile::get(unsigned char* bytes, int len, int loc)
 {
-  return ion >= 0;
-}
-
-void HistoryBuffer::add(const unsigned char* bytes, int len)
-{ int rc;
-  assert(hasScroll());
-  rc = lseek(ion,length,SEEK_SET); if (rc < 0) { perror("HistoryBuffer::add.seek"); \
                setScroll(FALSE); return; }
-  rc = write(ion,bytes,len);       if (rc < 0) { perror("HistoryBuffer::add.write"); \
                setScroll(FALSE); return; }
-  length += rc;
-}
+  int rc = 0;
 
-void HistoryBuffer::get(unsigned char* bytes, int len, int loc)
-{ int rc;
-  assert(hasScroll());
   if (loc < 0 || len < 0 || loc + len > length)
     fprintf(stderr,"getHist(...,%d,%d): invalid args.\n",len,loc);
-  rc = lseek(ion,loc,SEEK_SET); if (rc < 0) { perror("HistoryBuffer::get.seek"); \
                setScroll(FALSE); return; }
-  rc = read(ion,bytes,len);     if (rc < 0) { perror("HistoryBuffer::get.read"); \
setScroll(FALSE); return; } +  rc = lseek(ion,loc,SEEK_SET); if (rc < 0) { \
perror("HistoryFile::get.seek"); return; } +  rc = read(ion,bytes,len);     if (rc < \
0) { perror("HistoryFile::get.read"); return; }  }
 
-int HistoryBuffer::len()
+int HistoryFile::len()
 {
   return length;
 }
+
+#endif
+
+// History Scroll abstract base class //////////////////////////////////////
+
+
+HistoryScroll::HistoryScroll(HistoryType* t)
+  : m_histType(t)
+{
+}
+
+HistoryScroll::~HistoryScroll()
+{
+  delete m_histType;
+}
+
+bool HistoryScroll::hasScroll()
+{
+  return true;
+}
 
-// History Scroll //////////////////////////////////////
+#if 0
+// History Scroll File //////////////////////////////////////
 
 /* 
    The history scroll makes a Row(Row(Cell)) from
@@ -145,64 +148,343 @@
    at 0 in cells.
 */
 
-HistoryScroll::HistoryScroll()
+HistoryScrollFile::HistoryScrollFile(const QString &logFileName)
+  : HistoryScroll(new HistoryTypeFile(logFileName)),
+  m_logFileName(logFileName)
 {
 }
 
-HistoryScroll::~HistoryScroll()
+HistoryScrollFile::~HistoryScrollFile()
 {
 }
  
-void HistoryScroll::setScroll(bool on)
+int HistoryScrollFile::getLines()
 {
-  index.setScroll(on);
-  cells.setScroll(on);
-}
- 
-bool HistoryScroll::hasScroll()
-{
-  return index.hasScroll() && cells.hasScroll();
-}
-
-int HistoryScroll::getLines()
-{
-  if (!hasScroll()) return 0;
   return index.len() / sizeof(int);
 }
 
-int HistoryScroll::getLineLen(int lineno)
+int HistoryScrollFile::getLineLen(int lineno)
 {
-  if (!hasScroll()) return 0;
   return (startOfLine(lineno+1) - startOfLine(lineno)) / sizeof(ca);
 }
 
-int HistoryScroll::startOfLine(int lineno)
+int HistoryScrollFile::startOfLine(int lineno)
 {
   if (lineno <= 0) return 0;
-  if (!hasScroll()) return 0;
   if (lineno <= getLines())
-  { int res;
+    { int res;
     index.get((unsigned char*)&res,sizeof(int),(lineno-1)*sizeof(int));
     return res;
-  }
+    }
   return cells.len();
 }
 
-void HistoryScroll::getCells(int lineno, int colno, int count, ca res[])
+void HistoryScrollFile::getCells(int lineno, int colno, int count, ca res[])
 {
-  assert(hasScroll());
   cells.get((unsigned \
char*)res,count*sizeof(ca),startOfLine(lineno)+colno*sizeof(ca));  }
 
-void HistoryScroll::addCells(ca text[], int count)
+void HistoryScrollFile::addCells(ca text[], int count)
 {
-  if (!hasScroll()) return;
   cells.add((unsigned char*)text,count*sizeof(ca));
 }
 
-void HistoryScroll::addLine()
+void HistoryScrollFile::addLine()
 {
-  if (!hasScroll()) return;
   int locn = cells.len();
   index.add((unsigned char*)&locn,sizeof(int));
 }
+
+
+// History Scroll Buffer //////////////////////////////////////
+HistoryScrollBuffer::HistoryScrollBuffer(unsigned int maxNbLines)
+  : HistoryScroll(new HistoryTypeBuffer(maxNbLines)),
+    m_maxNbLines(maxNbLines),
+    m_nbLines(0),
+    m_arrayIndex(0)
+{
+  m_histBuffer.setAutoDelete(true);
+  m_histBuffer.resize(maxNbLines);
+}
+
+HistoryScrollBuffer::~HistoryScrollBuffer()
+{
+}
+
+void HistoryScrollBuffer::addCells(ca a[], int count)
+{
+  //unsigned int nbLines = countLines(bytes, len);
+
+  histline* newLine = new histline;
+
+  newLine->duplicate(a, count);
+  
+  ++m_arrayIndex;
+  if (m_arrayIndex >= m_maxNbLines) m_arrayIndex = 0;
+
+  if (m_nbLines < m_maxNbLines - 1) ++m_nbLines;
+
+  // m_histBuffer.remove(m_arrayIndex); // not necessary
+  m_histBuffer.insert(m_arrayIndex, newLine);
+}
+
+void HistoryScrollBuffer::addLine()
+{
+  // ? Do nothing
+}
+
+int HistoryScrollBuffer::getLines()
+{
+  return m_nbLines; // m_histBuffer.size();
+}
+
+int HistoryScrollBuffer::getLineLen(int lineno)
+{
+  if (lineno >= m_maxNbLines) return 0;
+  
+  histline *l = m_histBuffer[lineno];
+
+  return l ? l->size() : 0;
+}
+
+
+void HistoryScrollBuffer::getCells(int lineno, int colno, int count, ca res[])
+{
+  if (!count) return;
+
+  assert (lineno < m_maxNbLines);
+  
+  histline *l = m_histBuffer[lineno];
+
+  if (!l) {
+    memset(res, 0, count * sizeof(ca));
+    return;
+  }
+
+  assert(colno < l->size() || count == 0);
+    
+  memcpy(res, l->data() + colno, count * sizeof(ca));
+}
+
+void HistoryScrollBuffer::setMaxNbLines(unsigned int nbLines)
+{
+  m_maxNbLines = nbLines;
+  m_histBuffer.resize(m_maxNbLines);
+}
+
+#endif
+
+// History Scroll None //////////////////////////////////////
+
+HistoryScrollNone::HistoryScrollNone()
+  : HistoryScroll(new HistoryTypeNone())
+{
+}
+
+HistoryScrollNone::~HistoryScrollNone()
+{
+}
+
+bool HistoryScrollNone::hasScroll()
+{
+  return false;
+}
+
+int  HistoryScrollNone::getLines()
+{
+  return 0;
+}
+
+int  HistoryScrollNone::getLineLen(int lineno)
+{
+  return 0;
+}
+
+void HistoryScrollNone::getCells(int lineno, int colno, int count, ca res[])
+{
+}
+
+void HistoryScrollNone::addCells(ca a[], int count)
+{
+}
+
+void HistoryScrollNone::addLine()
+{
+}
+
+// History Scroll BlockArray //////////////////////////////////////
+
+HistoryScrollBlockArray::HistoryScrollBlockArray(size_t size)
+  : HistoryScroll(new HistoryTypeBlockArray(size))
+{
+  m_lineLengths.setAutoDelete(true);
+  m_blockArray.setHistorySize(size); // nb. of lines.
+}
+
+HistoryScrollBlockArray::~HistoryScrollBlockArray()
+{
+}
+
+int  HistoryScrollBlockArray::getLines()
+{
+//   kdDebug() << "HistoryScrollBlockArray::getLines() : "
+//             << m_lineLengths.count() << endl;
+
+  return m_lineLengths.count();
+}
+
+int  HistoryScrollBlockArray::getLineLen(int lineno)
+{
+  size_t *pLen = m_lineLengths[lineno];
+  size_t res = pLen ? *pLen : 0;
+
+  return res;
+}
+
+void HistoryScrollBlockArray::getCells(int lineno, int colno, int count, ca res[])
+{
+  if (!count) return;
+
+  const Block *b = m_blockArray.at(lineno);
+
+  if (!b) {
+    memset(res, 0, count * sizeof(ca)); // still better than random data
+    return;
+  }
+
+  assert(((colno + count) * sizeof(ca)) < ENTRIES);
+  memcpy(res, b->data + (colno * sizeof(ca)), count * sizeof(ca));
+}
+
+void HistoryScrollBlockArray::addCells(ca a[], int count)
+{
+  Block *b = m_blockArray.lastBlock();
+  
+  if (!b) return;
+
+  // put cells in block's data
+  assert((count * sizeof(ca)) < ENTRIES);
+
+  memset(b->data, 0, ENTRIES);
+
+  memcpy(b->data, a, count * sizeof(ca));
+  b->size = count * sizeof(ca);
+
+  size_t res = m_blockArray.newBlock();
+  assert (res > 0);
+
+  // store line length
+  size_t *pLen = new size_t;
+  *pLen = count;
+  
+  m_lineLengths.replace(m_blockArray.getCurrent(), pLen);
+
+}
+
+void HistoryScrollBlockArray::addLine()
+{
+}
+
+//////////////////////////////////////////////////////////////////////
+// History Types
+//////////////////////////////////////////////////////////////////////
+
+HistoryType::HistoryType()
+{
+}
+
+HistoryType::~HistoryType()
+{
+}
+
+//////////////////////////////
+
+HistoryTypeNone::HistoryTypeNone()
+{
+}
+
+bool HistoryTypeNone::isOn() const
+{
+  return false;
+}
+
+HistoryScroll* HistoryTypeNone::getScroll() const
+{
+  return new HistoryScrollNone();
+}
+
+unsigned int HistoryTypeNone::getSize() const
+{
+  return 0;
+}
+
+//////////////////////////////
+
+HistoryTypeBlockArray::HistoryTypeBlockArray(size_t size)
+  : m_size(size)
+{
+}
+
+bool HistoryTypeBlockArray::isOn() const
+{
+  return true;
+}
+
+unsigned int HistoryTypeBlockArray::getSize() const
+{
+  return m_size;
+}
+
+HistoryScroll* HistoryTypeBlockArray::getScroll() const
+{
+  return new HistoryScrollBlockArray(m_size);
+}
+
+
+#if 0 // Disabled for now 
+
+//////////////////////////////
+
+HistoryTypeBuffer::HistoryTypeBuffer(unsigned int nbLines)
+  : m_nbLines(nbLines)
+{
+}
+
+bool HistoryTypeBuffer::isOn() const
+{
+  return true;
+}
+
+unsigned int HistoryTypeBuffer::getNbLines() const
+{
+  return m_nbLines;
+}
+
+HistoryScroll* HistoryTypeBuffer::getScroll() const
+{
+  return new HistoryScrollBuffer(m_nbLines);
+}
+
+//////////////////////////////
+
+HistoryTypeFile::HistoryTypeFile(const QString& fileName)
+  : m_fileName(fileName)
+{
+}
+
+bool HistoryTypeFile::isOn() const
+{
+  return true;
+}
+
+const QString& HistoryTypeFile::getFileName() const
+{
+  return m_fileName;
+}
+
+HistoryScroll* HistoryTypeFile::getScroll() const
+{
+  return new HistoryScrollFile(m_fileName);
+}
+
+#endif
Index: src/TEScreen.C
===================================================================
RCS file: /home/kde/kdebase/konsole/src/TEScreen.C,v
retrieving revision 1.41
diff -u -r1.41 TEScreen.C
--- src/TEScreen.C	2001/03/17 14:30:42	1.41
+++ src/TEScreen.C	2001/06/04 14:23:29
@@ -61,20 +61,35 @@
 /*! creates a `TEScreen' of `lines' lines and `columns' columns.
 */
 
-TEScreen::TEScreen(int lines, int columns)
-{
-  this->lines   = lines;
-  this->columns = columns;
-
-  // we add +1 here as under some weired circumstances konsole crashes
-  // reading out of bound. As a crash is worse, we afford the minimum
-  // of added memory
-  image      = (ca*) malloc((lines+1)*columns*sizeof(ca));
-  tabstops   = NULL; initTabStops();
-  cuX = cuY = sa_cu_re = cu_re = sa_cu_fg = cu_fg = sa_cu_bg = cu_bg = 0;
+TEScreen::TEScreen(int l, int c)
+  : lines(l),
+    columns(c),
+    image(new ca[(lines+1)*columns]),
+    histCursor(0),
+    hist(new HistoryScrollNone()),
+    cuX(0), cuY(0),
+    cu_fg(0), cu_bg(0), cu_re(0),
+    tmargin(0), bmargin(0),
+    tabstops(0),
+    sel_begin(0), sel_TL(0), sel_BR(0),
+    ef_fg(0), ef_bg(0), ef_re(0),
+    sa_cuX(0), sa_cuY(0),
+    sa_cu_re(0), sa_cu_fg(0), sa_cu_bg(0)
+{
+  /*
+    this->lines   = lines;
+    this->columns = columns;
+
+    // we add +1 here as under some weired circumstances konsole crashes
+    // reading out of bound. As a crash is worse, we afford the minimum
+    // of added memory
+    image      = (ca*) malloc((lines+1)*columns*sizeof(ca));
+    tabstops   = NULL; initTabStops();
+    cuX = cuY = sa_cu_re = cu_re = sa_cu_fg = cu_fg = sa_cu_bg = cu_bg = 0;
 
-  histCursor = 0;
-
+    histCursor = 0;
+  */
+  initTabStops();
   clearSelection();
   reset();
 }
@@ -84,8 +99,9 @@
 
 TEScreen::~TEScreen()
 {
-  free(image);
-  if (tabstops) free(tabstops);
+  delete[] image;
+  delete[] tabstops;
+  delete hist;
 }
 
 /* ------------------------------------------------------------------------- */
@@ -421,7 +437,7 @@
     newimg[y*new_columns+x].b = image[loc(x,y)].b;
     newimg[y*new_columns+x].r = image[loc(x,y)].r;
   }
-  free(image);
+  delete[] image;
   image = newimg;
   lines = new_lines;
   columns = new_columns;
@@ -512,13 +528,13 @@
   ca* merged = (ca*)malloc(lines*columns*sizeof(ca));
   ca dft(' ',DEFAULT_FORE_COLOR,DEFAULT_BACK_COLOR,DEFAULT_RENDITION);
 
-  for (y = 0; (y < lines) && (y < (hist.getLines()-histCursor)); y++)
+  for (y = 0; (y < lines) && (y < (hist->getLines()-histCursor)); y++)
   {
-    int len = QMIN(columns,hist.getLineLen(y+histCursor));
+    int len = QMIN(columns,hist->getLineLen(y+histCursor));
     int yp  = y*columns;
     int yq  = (y+histCursor)*columns;
 
-    hist.getCells(y+histCursor,0,len,merged+yp);
+    hist->getCells(y+histCursor,0,len,merged+yp);
     for (x = len; x < columns; x++) merged[yp+x] = dft;
     for (x = 0; x < columns; x++)
     {   int p=x + yp; int q=x + yq;
@@ -526,13 +542,13 @@
           reverseRendition(&merged[p]); // for selection
     }
   }
-  if (lines >= hist.getLines()-histCursor)
+  if (lines >= hist->getLines()-histCursor)
   {
-    for (y = (hist.getLines()-histCursor); y < lines ; y++)
+    for (y = (hist->getLines()-histCursor); y < lines ; y++)
     {
        int yp  = y*columns;
        int yq  = (y+histCursor)*columns;
-       int yr =  (y-hist.getLines()+histCursor)*columns;
+       int yr =  (y-hist->getLines()+histCursor)*columns;
        for (x = 0; x < columns; x++)
        { int p = x + yp; int q = x + yq; int r = x + yr;
          merged[p] = image[r];
@@ -548,11 +564,11 @@
     for (i = 0; i < n; i++)
       reverseRendition(&merged[i]); // for reverse display
   }
-//  if (getMode(MODE_Cursor) && (cuY+(hist.getLines()-histCursor) < lines)) // \
cursor visible +//  if (getMode(MODE_Cursor) && (cuY+(hist->getLines()-histCursor) < \
lines)) // cursor visible  
-  int loc_ = loc(cuX, cuY+hist.getLines()-histCursor);
+  int loc_ = loc(cuX, cuY+hist->getLines()-histCursor);
   if(getMode(MODE_Cursor) && loc_ < columns*lines)
-    reverseRendition(&merged[loc(cuX,cuY+(hist.getLines()-histCursor))]);
+    reverseRendition(&merged[loc(cuX,cuY+(hist->getLines()-histCursor))]);
   return merged;
 }
 
@@ -618,8 +634,9 @@
 
 void TEScreen::initTabStops()
 {
-  if (tabstops) free(tabstops);
-  tabstops = (bool*)malloc(columns*sizeof(bool));
+  delete[] tabstops;
+  tabstops = new bool[columns];
+
   // Arrg! The 1st tabstop has to be one longer than the other.
   // i.e. the kids start counting from 0 instead of 1.
   // Other programs might behave correctly. Be aware.
@@ -647,7 +664,7 @@
 void TEScreen::checkSelection(int from, int to)
 {
   if (sel_begin == -1) return;
-  int scr_TL = loc(0, hist.getLines());
+  int scr_TL = loc(0, hist->getLines());
   //Clear entire selection if it overlaps region [from, to]
   if ( (sel_BR > (from+scr_TL) )&&(sel_TL < (to+scr_TL)) )
   {
@@ -791,7 +808,7 @@
 
 void TEScreen::clearImage(int loca, int loce, char c)
 { int i;
-  int scr_TL=loc(0,hist.getLines());
+  int scr_TL=loc(0,hist->getLines());
   //FIXME: check positions
 
   //Clear entire selection if it overlaps region to be moved...
@@ -998,7 +1015,7 @@
 
   int *m;			// buffer to fill.
   int s, d;			// source index, dest. index.
-  int hist_BR = loc(0, hist.getLines());
+  int hist_BR = loc(0, hist->getLines());
   int hY = sel_TL / columns;
   int hX = sel_TL % columns;
   int eol;			// end of line
@@ -1015,9 +1032,9 @@
   while (s <= sel_BR)
     {
       if (s < hist_BR)
-	{			// get lines from hist.history
+	{			// get lines from hist->history
 				// buffer.
-	  eol = hist.getLineLen(hY);
+	  eol = hist->getLineLen(hY);
 
 	  if ((hY == (sel_BR / columns)) &&
 	      (eol >= (sel_BR % columns)))
@@ -1027,7 +1044,7 @@
 	  
 	  while (hX < eol)
 	    {
-	      m[d++] = hist.getCell(hY, hX++).c;
+	      m[d++] = hist->getCell(hY, hX++).c;
 	      s++;
 	    }
 
@@ -1176,11 +1193,11 @@
     while (end >= 0 && image[end] == dft)
       end -= 1;
 
-    hist.addCells(image,end+1);
-    hist.addLine();
+    hist->addCells(image,end+1);
+    hist->addLine();
 
     // adjust history cursor
-    histCursor += (hist.getLines()-1 == histCursor);
+    histCursor += (hist->getLines()-1 == histCursor);
   }
 
   if (!hasScroll()) histCursor = 0; //FIXME: a poor workaround
@@ -1198,17 +1215,23 @@
 
 int TEScreen::getHistLines()
 {
-  return hist.getLines();
+  return hist->getLines();
 }
 
-void TEScreen::setScroll(bool on)
+void TEScreen::setScroll(const HistoryType& t)
 {
   histCursor = 0;
   clearSelection();
-  hist.setScroll(on);
+  delete hist;
+  hist = t.getScroll();
 }
 
 bool TEScreen::hasScroll()
+{
+  return hist->hasScroll();
+}
+
+const HistoryType& TEScreen::getScroll()
 {
-  return hist.hasScroll();
+  return hist->getType();
 }
Index: src/TEmulation.C
===================================================================
RCS file: /home/kde/kdebase/konsole/src/TEmulation.C,v
retrieving revision 1.21
diff -u -r1.21 TEmulation.C
--- src/TEmulation.C	2001/03/19 14:37:37	1.21
+++ src/TEmulation.C	2001/06/04 14:23:29
@@ -92,19 +92,21 @@
 /*!
 */
 
-TEmulation::TEmulation(TEWidget* gui)
-: decoder(0)
+TEmulation::TEmulation(TEWidget* w)
+: gui(w),
+  scr(0),
+  connected(false),
+  codec(0),
+  decoder(0),
+  keytrans(0),
+  bulk_nlcnt(0),
+  bulk_incnt(0)
 {
-  this->gui = gui;
 
   screen[0] = new TEScreen(gui->Lines(),gui->Columns());
   screen[1] = new TEScreen(gui->Lines(),gui->Columns());
   scr = screen[0];
 
-  bulk_nlcnt = 0; // reset bulk newline counter
-  bulk_incnt = 0; // reset bulk counter
-  connected  = FALSE;
-
   QObject::connect(&bulk_timer, SIGNAL(timeout()), this, SLOT(showBulk()) );
   QObject::connect(gui,SIGNAL(changedImageSizeSignal(int,int)),
                    this,SLOT(onImageSizeChange(int,int)));
@@ -141,16 +143,17 @@
   scr = screen[n&1];
 }
 
-void TEmulation::setHistory(bool on)
+void TEmulation::setHistory(const HistoryType& t)
 {
-  screen[0]->setScroll(on);
+  screen[0]->setScroll(t);
+
   if (!connected) return;
   showBulk();
 }
 
-bool TEmulation::history()
+const HistoryType& TEmulation::history()
 {
-  return screen[0]->hasScroll();
+  return screen[0]->getScroll();
 }
 
 void TEmulation::setCodec(int c)
Index: src/konsole.C
===================================================================
RCS file: /home/kde/kdebase/konsole/src/konsole.C,v
retrieving revision 1.126
diff -u -r1.126 konsole.C
--- src/konsole.C	2001/05/23 00:24:38	1.126
+++ src/konsole.C	2001/06/04 14:23:33
@@ -80,6 +80,11 @@
 #include <qobjectlist.h>
 #include <ktoolbarbutton.h>
 
+#include <qspinbox.h>
+#include <qcheckbox.h>
+#include <qlayout.h>
+#include <qbuttongroup.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -204,6 +209,8 @@
 ,skip_exit_query(false) // used to skip the query when closed by the session \
management  ,b_warnQuit(false)
 ,alreadyNoticedBackgroundChange_(false)
+,m_histSize(0)
+,b_histEnabled(false)
 {
   //QTime time;
   //time.start();
@@ -272,6 +279,12 @@
   // activate and run first session //////////////////////////////////////////
   // FIXME: this slows it down if --type is given, but prevents a crash (malte)
   se = newSession(co);
+  if (b_histEnabled && m_histSize)
+    se->setHistory(HistoryTypeBlockArray(m_histSize));
+  else
+    se->setHistory(HistoryTypeNone());
+
+
   delete co;
   //kdDebug()<<"Konsole ctor(): runSession()"<<endl;
   te->currentSession = se;
@@ -434,8 +447,11 @@
    // Schema
    m_options->insertItem( SmallIconSet( "colorize" ), i18n( "Schema" ), m_schema);
    m_options->insertSeparator();
-   m_options->insertItem( i18n("&History"), 3 );
-   m_options->setItemEnabled(3, false);
+
+   KAction *historyType = new KAction(i18n("History..."), 0, this,
+                                      SLOT(slotHistoryType()), this);
+   historyType->plug(m_options);
+   
    m_options->insertSeparator();
    m_options->insertItem( SmallIconSet( "charset" ), i18n( "&Codec" ), m_codec);
    m_options->insertItem( SmallIconSet( "key_bindings" ), i18n( "&Keyboard" ), \
m_keytab ); @@ -699,6 +715,8 @@
   config->writeEntry("scrollbar",n_scroll);
   config->writeEntry("keytab",n_keytab);
   config->writeEntry("WarnQuit", b_warnQuit);
+  if (se)
+    config->writeEntry("history", se->history().getSize());
 
   if (args.count() > 0) config->writeEntry("konsolearguments", args);
   config->writeEntry("class",name());
@@ -772,6 +790,10 @@
    te->setFrameStyle( b_framevis?(QFrame::WinPanel|QFrame::Sunken):QFrame::NoFrame \
);  te->setColorTable(sch->table());
 
+   // History
+   m_histSize = config->readNumEntry("history",0);
+   b_histEnabled = config->readBoolEntry("historyenabled",false);
+   KONSOLEDEBUG << "Hist size : " << m_histSize << endl;
 
    if (m_menuCreated)
    {
@@ -988,18 +1010,10 @@
                      : QFrame::NoFrame );
 }
 
-void Konsole::setHistory(bool on)
-{
-  b_scroll = on;
-  m_options->setItemChecked(3,b_scroll);
-  if (se) se->setHistory( b_scroll );
-}
 
 void Konsole::opt_menu_activated(int item)
 {
   switch( item )  {
-    case 3: setHistory(!b_scroll);
-            break;
     case 5: setFullScreen(!b_fullscreen);
             break;
     case 8:
@@ -1357,8 +1371,9 @@
   s->setSchemaNo(schmno);
 //kdDebug()<<"setTitle Konsole 1319 "<< txt << endl;
   s->setTitle(txt);
-  s->setHistory(b_scroll); //FIXME: take from schema
 
+  //s->setHistory(b_scroll); //FIXME: take from schema
+
   addSession(s);
   runSession(s); // activate and run
   return s;
@@ -1633,6 +1648,95 @@
     toolBar()->updateRects();
 //  }
 }
+
+
+//////////////////////////////////////////////////////////////////////
+
+HistoryTypeDialog::HistoryTypeDialog(const HistoryType& histType,
+                                     unsigned int histSize,
+                                     QWidget *parent)
+  : KDialogBase(Plain, i18n("History Configuration"),
+                Help | Default | Ok | Cancel, Ok,
+                parent),
+    m_size(0),
+    m_isOn(true)
+{
+  QFrame *mainFrame = plainPage();
+  
+  QHBoxLayout *hb = new QHBoxLayout(mainFrame);
+
+  QCheckBox *btnEnable    = new QCheckBox(i18n("Enable"), mainFrame);
+
+  QObject::connect(btnEnable, SIGNAL(toggled(bool)),
+                   this,      SLOT(slotHistEnable(bool)));
+
+  m_size = new QSpinBox(0, 10 * 1000 * 1000, 1, mainFrame);
+  m_size->setValue(histSize);
+
+  hb->addWidget(btnEnable);
+  hb->addWidget(new QLabel(i18n("Number of lines : "), mainFrame));
+  hb->addWidget(m_size);
+
+  if ( ! histType.isOn()) {
+
+    kdDebug() << "HistoryTypeDialog() : hist type off \n";
+
+    btnEnable->setChecked(false);
+    slotHistEnable(false);
+
+  } else {
+
+    kdDebug() << "HistoryTypeDialog() : hist type true : " << histType.getSize() << \
endl; +
+    btnEnable->setChecked(true);
+    m_size->setValue(histType.getSize());
+    slotHistEnable(true);
+  }
+  
+}
+
+void HistoryTypeDialog::slotHistEnable(bool b)
+{
+  kdDebug() << "Konsole::slotHistEnable(" << b << ")\n";
+
+  m_isOn = b;
+  m_size->setEnabled(b);
+  if (b) m_size->setFocus();
+}
+
+unsigned int HistoryTypeDialog::nbLines() const
+{
+  return m_size->value();
+}
+
+
+
+
+void Konsole::slotHistoryType()
+{
+  kdDebug() << "Konsole::slotHistoryType()\n";
+  if (!se) return;
+  
+  HistoryTypeDialog dlg(se->history(), m_histSize, this);
+  if (dlg.exec()) {
+
+    if (dlg.isOn() && dlg.nbLines() > 0) {
+
+      se->setHistory(HistoryTypeBlockArray(dlg.nbLines()));
+      m_histSize = dlg.nbLines();
+      b_histEnabled = true;
+
+    } else {
+
+      se->setHistory(HistoryTypeNone());
+      m_histSize = dlg.nbLines();
+      b_histEnabled = false;
+
+    }
+  }
+}
+
+//////////////////////////////////////////////////////////////////////
 
 
 void Konsole::slotWordSeps() {
Index: src/konsole_part.C
===================================================================
RCS file: /home/kde/kdebase/konsole/src/konsole_part.C,v
retrieving revision 1.30
diff -u -r1.30 konsole_part.C
--- src/konsole_part.C	2001/05/07 02:17:30	1.30
+++ src/konsole_part.C	2001/06/04 14:23:33
@@ -141,7 +141,7 @@
       te->setColorTable(ctable); 
     }
   
-  initial->setHistory(true);
+  initial->setHistory(HistoryTypeBlockArray(1000));
 
   // setXMLFile("konsole_part.rc");
 
Index: src/session.C
===================================================================
RCS file: /home/kde/kdebase/konsole/src/session.C,v
retrieving revision 1.33
diff -u -r1.33 session.C
--- src/session.C	2001/05/12 13:26:34	1.33
+++ src/session.C	2001/06/04 14:23:33
@@ -146,12 +146,12 @@
   return title;
 }
 
-void TESession::setHistory(bool on)
+void TESession::setHistory(const HistoryType &hType)
 {
-  em->setHistory( on );
+  em->setHistory(hType);
 }
 
-bool TESession::history()
+const HistoryType& TESession::history()
 {
   return em->history();
 }



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic