Skip to content
Permalink
Browse files

[GRASS] qtermwidget updated to github.com/qterminal/qtermwidget 72ffc262

  • Loading branch information
blazek committed Aug 26, 2015
1 parent 84a4036 commit 61a1121e97d8586d0558fa027f17f3b8062cf6aa
Showing with 16,332 additions and 14,236 deletions.
  1. +260 −242 src/plugins/grass/qtermwidget/BlockArray.cpp
  2. +88 −85 src/plugins/grass/qtermwidget/BlockArray.h
  3. +166 −152 src/plugins/grass/qtermwidget/Character.h
  4. +205 −208 src/plugins/grass/qtermwidget/CharacterColor.h
  5. +788 −0 src/plugins/grass/qtermwidget/ColorScheme.cpp
  6. +359 −0 src/plugins/grass/qtermwidget/ColorScheme.h
  7. +41 −69 src/plugins/grass/qtermwidget/ColorTables.h
  8. +0 −16 src/plugins/grass/qtermwidget/DefaultTranslatorText.h
  9. +206 −293 src/plugins/grass/qtermwidget/Emulation.cpp
  10. +411 −405 src/plugins/grass/qtermwidget/Emulation.h
  11. +0 −88 src/plugins/grass/qtermwidget/ExtendedDefaultTranslator.h
  12. +298 −304 src/plugins/grass/qtermwidget/Filter.cpp
  13. +339 −326 src/plugins/grass/qtermwidget/Filter.h
  14. +502 −216 src/plugins/grass/qtermwidget/History.cpp
  15. +377 −228 src/plugins/grass/qtermwidget/History.h
  16. +157 −0 src/plugins/grass/qtermwidget/HistorySearch.cpp
  17. +70 −0 src/plugins/grass/qtermwidget/HistorySearch.h
  18. +639 −646 src/plugins/grass/qtermwidget/KeyboardTranslator.cpp
  19. +483 −548 src/plugins/grass/qtermwidget/KeyboardTranslator.h
  20. +17 −18 src/plugins/grass/qtermwidget/LineFont.h
  21. +185 −168 src/plugins/grass/qtermwidget/Pty.cpp
  22. +185 −215 src/plugins/grass/qtermwidget/Pty.h
  23. +850 −1,068 src/plugins/grass/qtermwidget/Screen.cpp
  24. +626 −613 src/plugins/grass/qtermwidget/Screen.h
  25. +128 −131 src/plugins/grass/qtermwidget/ScreenWindow.cpp
  26. +225 −222 src/plugins/grass/qtermwidget/ScreenWindow.h
  27. +118 −0 src/plugins/grass/qtermwidget/SearchBar.cpp
  28. +60 −0 src/plugins/grass/qtermwidget/SearchBar.h
  29. +85 −0 src/plugins/grass/qtermwidget/SearchBar.ui
  30. +632 −580 src/plugins/grass/qtermwidget/Session.cpp
  31. +546 −528 src/plugins/grass/qtermwidget/Session.h
  32. +88 −93 src/plugins/grass/qtermwidget/ShellCommand.cpp
  33. +62 −64 src/plugins/grass/qtermwidget/ShellCommand.h
  34. +153 −129 src/plugins/grass/qtermwidget/TerminalCharacterDecoder.cpp
  35. +116 −105 src/plugins/grass/qtermwidget/TerminalCharacterDecoder.h
  36. +1,836 −1,474 src/plugins/grass/qtermwidget/TerminalDisplay.cpp
  37. +753 −645 src/plugins/grass/qtermwidget/TerminalDisplay.h
  38. +791 −827 src/plugins/grass/qtermwidget/Vt102Emulation.cpp
  39. +141 −142 src/plugins/grass/qtermwidget/Vt102Emulation.h
  40. +42 −0 src/plugins/grass/qtermwidget/color-schemes/BlackOnWhite.schema
  41. +0 −128 src/plugins/grass/qtermwidget/default.keytab
  42. +0 −1,123 src/plugins/grass/qtermwidget/k3process.cpp
  43. +0 −893 src/plugins/grass/qtermwidget/k3process.h
  44. +0 −343 src/plugins/grass/qtermwidget/k3processcontroller.cpp
  45. +0 −137 src/plugins/grass/qtermwidget/k3processcontroller.h
  46. +94 −58 src/plugins/grass/qtermwidget/kb-layouts/default.keytab
  47. +7 −2 src/plugins/grass/qtermwidget/kb-layouts/linux.keytab
  48. +7 −2 src/plugins/grass/qtermwidget/kb-layouts/vt420pc.keytab
  49. +158 −153 src/plugins/grass/qtermwidget/konsole_wcwidth.cpp
  50. +8 −7 src/plugins/grass/qtermwidget/konsole_wcwidth.h
  51. +412 −0 src/plugins/grass/qtermwidget/kprocess.cpp
  52. +372 −0 src/plugins/grass/qtermwidget/kprocess.h
  53. +357 −312 src/plugins/grass/qtermwidget/kpty.cpp
  54. +15 −15 src/plugins/grass/qtermwidget/kpty.h
  55. +15 −10 src/plugins/grass/qtermwidget/kpty_p.h
  56. +422 −0 src/plugins/grass/qtermwidget/kptydevice.cpp
  57. +361 −0 src/plugins/grass/qtermwidget/kptydevice.h
  58. +129 −0 src/plugins/grass/qtermwidget/kptyprocess.cpp
  59. +178 −0 src/plugins/grass/qtermwidget/kptyprocess.h
  60. +499 −146 src/plugins/grass/qtermwidget/qtermwidget.cpp
  61. +175 −59 src/plugins/grass/qtermwidget/qtermwidget.h
  62. +85 −0 src/plugins/grass/qtermwidget/tools.cpp
  63. +10 −0 src/plugins/grass/qtermwidget/tools.h

Large diffs are not rendered by default.

@@ -30,97 +30,100 @@
#define BlockSize (1 << 12)
#define ENTRIES ((BlockSize - sizeof(size_t) ) / sizeof(unsigned char))

namespace Konsole
{
namespace Konsole {

struct Block
{
Block() { size = 0; }
struct Block {
Block() {
size = 0;
}
unsigned char data[ENTRIES];
size_t size;
};
};

// ///////////////////////////////////////////////////////

class BlockArray
{
public:
/**
* Creates a history file for holding
* maximal size blocks. If more blocks
* are requested, then it drops earlier
* added ones.
*/
BlockArray();

/// destructor
~BlockArray();

/**
* adds the Block at the end of history.
* This may drop other blocks.
*
* The ownership on the block is transfered.
* An unique index number is returned for accessing
* it later (if not yet dropped then)
*
* Note, that the block may be dropped completely
* if history is turned off.
*/
size_t append( Block *block );

/**
* gets the block at the index. Function may return
* 0 if the block isn't available any more.
*
* The returned block is strictly readonly as only
* maped in memory - and will be invalid on the next
* operation on this class.
*/
const Block *at( size_t index );

/**
* reorders blocks as needed. If newsize is null,
* the history is emptied completely. The indices
* returned on append won't change their semantic,
* but they may not be valid after this call.
*/
bool setHistorySize( size_t newsize );

size_t newBlock();

Block *lastBlock() const;

/**
* Convenient function to set the size in KBytes
* instead of blocks
*/
bool setSize( size_t newsize );

size_t len() const { return length; }

bool has( size_t index ) const;

size_t getCurrent() const { return current; }

private:
void unmap();
void increaseBuffer();
void decreaseBuffer( size_t newsize );

size_t size;
// current always shows to the last inserted block
size_t current;
size_t index;

Block *lastmap;
size_t lastmap_index;
Block *lastblock;

int ion;
size_t length;

};
class BlockArray {
public:
/**
* Creates a history file for holding
* maximal size blocks. If more blocks
* are requested, then it drops earlier
* added ones.
*/
BlockArray();

/// destructor
~BlockArray();

/**
* adds the Block at the end of history.
* This may drop other blocks.
*
* The ownership on the block is transfered.
* An unique index number is returned for accessing
* it later (if not yet dropped then)
*
* Note, that the block may be dropped completely
* if history is turned off.
*/
size_t append(Block * block);

/**
* gets the block at the index. Function may return
* 0 if the block isn't available any more.
*
* The returned block is strictly readonly as only
* maped in memory - and will be invalid on the next
* operation on this class.
*/
const Block * at(size_t index);

/**
* reorders blocks as needed. If newsize is null,
* the history is emptied completely. The indices
* returned on append won't change their semantic,
* but they may not be valid after this call.
*/
bool setHistorySize(size_t newsize);

size_t newBlock();

Block * lastBlock() const;

/**
* Convenient function to set the size in KBytes
* instead of blocks
*/
bool setSize(size_t newsize);

size_t len() const {
return length;
}

bool has(size_t index) const;

size_t getCurrent() const {
return current;
}

private:
void unmap();
void increaseBuffer();
void decreaseBuffer(size_t newsize);

size_t size;
// current always shows to the last inserted block
size_t current;
size_t index;

Block * lastmap;
size_t lastmap_index;
Block * lastblock;

int ion;
size_t length;

};

}

0 comments on commit 61a1121

Please sign in to comment.
You can’t perform that action at this time.