From 357a8baa9a14c220e8ecb278eea7411534f478c2 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Wed, 27 Nov 2013 21:33:34 +0100 Subject: [PATCH] [DEV] add extra compilation flags & correct warning --- sources/appl/Buffer.cpp | 16 +-- sources/appl/Buffer.h | 6 +- sources/appl/BufferManager.cpp | 10 +- sources/appl/BufferManager.h | 4 +- sources/appl/GlyphPainting.cpp | 8 +- sources/appl/GlyphPainting.h | 6 +- sources/appl/Gui/BufferView.cpp | 4 +- sources/appl/Gui/BufferView.h | 10 +- sources/appl/Gui/TextViewer.h | 14 +-- sources/appl/Highlight.cpp | 2 +- sources/appl/HighlightManager.cpp | 10 +- sources/appl/HighlightPattern.h | 2 +- sources/appl/TextPluginManager.cpp | 20 ++-- sources/appl/TextPluginMultiLineTab.cpp | 6 +- todo.txt | 132 ++++++++++++++++++++++++ 15 files changed, 191 insertions(+), 59 deletions(-) create mode 100644 todo.txt diff --git a/sources/appl/Buffer.cpp b/sources/appl/Buffer.cpp index 0512090..7dda4d5 100644 --- a/sources/appl/Buffer.cpp +++ b/sources/appl/Buffer.cpp @@ -248,7 +248,7 @@ bool appl::Buffer::searchBack(const appl::Buffer::Iterator& _pos, const char32_t --it) { //APPL_DEBUG("compare : " << *it << " ?= " << _search); if (*it == _search) { - //APPL_DEBUG("find : " << (esize_t)it); + //APPL_DEBUG("find : " << (int32_t)it); _result = it; return true; } @@ -525,7 +525,7 @@ static const char *ControlCodeTable[32] = { "NUL", "soh", "stx", "etx", "eot", "enq", "ack", "bel", "bs", "ht", "nl", "vt", "np", "cr", "so", "si", "dle", "dc1", "dc2", "dc3", "dc4", "nak", "syn", "etb", "can", "em", "sub", "esc", "fs", "gs", "rs", "us"}; -void appl::Buffer::expand(esize_t& _indent, const char32_t& _value, std::u32string& _out) const { +void appl::Buffer::expand(int32_t& _indent, const char32_t& _value, std::u32string& _out) const { _out.clear(); int32_t tabDist = 4; if (_value == etk::UChar::Tabulation) { @@ -609,8 +609,8 @@ appl::Buffer::Iterator appl::Buffer::countBackwardNLines(const appl::Buffer::Ite bool appl::Buffer::copy(std::string& _data) { _data.clear(); if (hasTextSelected() == true) { - esize_t startPos = getStartSelectionPos(); - esize_t endPos = getStopSelectionPos(); + int32_t startPos = getStartSelectionPos(); + int32_t endPos = getStopSelectionPos(); for (Iterator it = position(startPos); it != position(endPos) && (bool)it == true; @@ -830,7 +830,7 @@ void appl::Buffer::findMainHighLightPosition(int64_t _startPos, ------------ ------------- ---------- S=-1 *************** E */ - for (esize_t iii = 0; iii < m_HLDataPass1.size(); ++iii) { + for (int32_t iii = 0; iii < m_HLDataPass1.size(); ++iii) { if (m_HLDataPass1[iii].endStop > _startPos) { break; } @@ -851,7 +851,7 @@ void appl::Buffer::findMainHighLightPosition(int64_t _startPos, } else { elemStart = _startId+1; } - for (esize_t iii = elemStart; iii < m_HLDataPass1.size(); ++iii) { + for (int32_t iii = elemStart; iii < m_HLDataPass1.size(); ++iii) { if (m_HLDataPass1[iii].beginStart > _endPos) { _stopId = iii; break; @@ -875,7 +875,7 @@ void appl::Buffer::cleanHighLight(void) { appl::HighlightInfo* appl::Buffer::getElementColorAtPosition(int64_t _pos, int64_t &_starPos) { int32_t start = etk_max(0, _starPos-1); - for (esize_t iii = start; iii < m_HLDataPass1.size(); ++iii) { + for (int32_t iii = start; iii < m_HLDataPass1.size(); ++iii) { _starPos = iii; if ( m_HLDataPass1[iii].beginStart <= _pos && m_HLDataPass1[iii].endStop > _pos) { @@ -897,7 +897,7 @@ void appl::Buffer::hightlightGenerateLines(appl::DisplayHLData& _MData, int64_t } //GTimeVal timeStart; //g_get_current_time(&timeStart); - _HLStart = (esize_t)getStartLine(position(_HLStart)); + _HLStart = (int32_t)getStartLine(position(_HLStart)); _MData.HLData.clear(); int64_t HLStop = countForwardNLines(position(_HLStart), _nbLines); int64_t startId = 0; diff --git a/sources/appl/Buffer.h b/sources/appl/Buffer.h index c316a27..20808f9 100644 --- a/sources/appl/Buffer.h +++ b/sources/appl/Buffer.h @@ -440,7 +440,7 @@ namespace appl { * @param[in] _value Current value to transform * @param[out] _out String that represent the curent value to display */ - void expand(esize_t& _indent, const char32_t& _value, std::u32string& _out) const; + void expand(int32_t& _indent, const char32_t& _value, std::u32string& _out) const; /** * @brief get the start of a line with the position in the buffer. * @param[in] _pos position in the buffer. @@ -567,13 +567,13 @@ namespace appl { */ Iterator selectStop(void); protected: - esize_t m_nbLines; //!< number of line in the buffer + int32_t m_nbLines; //!< number of line in the buffer public: /** * @brief Get the number of line in the buffer. * @return number of line in the Buffer. */ - esize_t getNumberOfLines(void) { + int32_t getNumberOfLines(void) { return m_nbLines; } /** diff --git a/sources/appl/BufferManager.cpp b/sources/appl/BufferManager.cpp index 4efceca..35c41ba 100644 --- a/sources/appl/BufferManager.cpp +++ b/sources/appl/BufferManager.cpp @@ -22,8 +22,8 @@ appl::BufferManager::BufferManager(void) : } appl::BufferManager::~BufferManager(void) { - esize_t previousCount = m_list.size(); - for (esize_t iii = m_list.size()-1; iii >= 0 ; --iii) { + int32_t previousCount = m_list.size(); + for (int32_t iii = m_list.size()-1; iii >= 0 ; --iii) { if (m_list[iii] == NULL) { continue; } @@ -49,7 +49,7 @@ appl::Buffer* appl::BufferManager::createNewBuffer(void) { } appl::Buffer* appl::BufferManager::get(const std::string& _fileName, bool _createIfNeeded) { - for (esize_t iii = 0; iii < m_list.size(); ++iii) { + for (int32_t iii = 0; iii < m_list.size(); ++iii) { if (m_list[iii] == NULL) { continue; } @@ -82,7 +82,7 @@ void appl::BufferManager::onObjectRemove(ewol::EObject * _removeObject) { if (m_bufferSelected == _removeObject) { setBufferSelected(NULL); } - for (esize_t iii = 0; iii < m_list.size(); ++iii) { + for (int32_t iii = 0; iii < m_list.size(); ++iii) { if (m_list[iii] != _removeObject) { continue; } @@ -93,7 +93,7 @@ void appl::BufferManager::onObjectRemove(ewol::EObject * _removeObject) { } bool appl::BufferManager::exist(const std::string& _fileName) { - for (esize_t iii = 0; iii < m_list.size(); ++iii) { + for (int32_t iii = 0; iii < m_list.size(); ++iii) { if (m_list[iii] == NULL) { continue; } diff --git a/sources/appl/BufferManager.h b/sources/appl/BufferManager.h index 7a37b0e..581b0c0 100644 --- a/sources/appl/BufferManager.h +++ b/sources/appl/BufferManager.h @@ -44,7 +44,7 @@ namespace appl { * @brief Get count of all buffer availlable. * @return Number of buffer */ - esize_t size(void) const { + int32_t size(void) const { return m_list.size(); } /** @@ -52,7 +52,7 @@ namespace appl { * @param[in] _id Number of buffer * @return pointer on the buffer */ - appl::Buffer* get(esize_t _id) { + appl::Buffer* get(int32_t _id) { return m_list[_id]; } /** diff --git a/sources/appl/GlyphPainting.cpp b/sources/appl/GlyphPainting.cpp index b0df4d0..4d6959c 100644 --- a/sources/appl/GlyphPainting.cpp +++ b/sources/appl/GlyphPainting.cpp @@ -47,7 +47,7 @@ void appl::GlyphPainting::reload(void) { APPL_ERROR("Can not get basic array : 'ednColor'"); return; } - for (esize_t iii = 0; iii < baseArray->size(); ++iii) { + for (int32_t iii = 0; iii < baseArray->size(); ++iii) { ejson::Object* tmpObj = baseArray->getObject(iii); if (tmpObj == NULL) { APPL_DEBUG(" can not get object in 'ednColor' id=" << iii); @@ -60,7 +60,7 @@ void appl::GlyphPainting::reload(void) { bool bold = tmpObj->getBooleanValue("bold", false); APPL_VERBOSE("find new color : '" << name << "' fg='" << foreground << "' bg='" << background << "' italic='" << italic << "' bold='" << bold << "'"); bool findElement = false; - for (esize_t jjj=0; jjjgetBufferSelected(); } if (tmpBuffer != NULL) { - for (esize_t iii=0; iii list = myFile.folderGetSubList(false, true, false,false); - for (esize_t iii = 0; iii < list.size(); ++iii) { + for (int32_t iii = 0; iii < list.size(); ++iii) { if (list[iii] == NULL) { continue; } @@ -48,7 +48,7 @@ void appl::highlightManager::init(void) { } // display : /* - for (esize_t iii = 0; iii < hlList.size(); ++iii) { + for (int32_t iii = 0; iii < hlList.size(); ++iii) { if (hlList[iii] == NULL) { continue; } @@ -64,7 +64,7 @@ void appl::highlightManager::unInit(void) { hlList.clear(); return; } - for (esize_t iii = 0; iii < hlList.size(); ++iii) { + for (int32_t iii = 0; iii < hlList.size(); ++iii) { if (hlList[iii] == NULL) { continue; } @@ -80,7 +80,7 @@ std::string appl::highlightManager::getTypeExtention(const std::string& _extenti } APPL_VERBOSE("Try to find type for extention : '" << _extention << "' in " << s_list().size() << " types"); std::vector& hlList = s_list(); - for (esize_t iii = 0; iii < hlList.size(); ++iii) { + for (int32_t iii = 0; iii < hlList.size(); ++iii) { if (hlList[iii] == NULL) { continue; } @@ -99,7 +99,7 @@ std::string appl::highlightManager::getFileWithTypeType(const std::string& _type return ""; } std::vector& hlList = s_list(); - for (esize_t iii = 0; iii < hlList.size(); ++iii) { + for (int32_t iii = 0; iii < hlList.size(); ++iii) { if (hlList[iii] == NULL) { continue; } diff --git a/sources/appl/HighlightPattern.h b/sources/appl/HighlightPattern.h index 5efde62..e3fee80 100644 --- a/sources/appl/HighlightPattern.h +++ b/sources/appl/HighlightPattern.h @@ -53,7 +53,7 @@ namespace appl { void setPaternStop(std::string& _regExp); private: std::string m_colorName; //!< Current color name - esize_t m_colorId; //!< Id of the the glyph painting + int32_t m_colorId; //!< Id of the the glyph painting public: void setColorGlyph(std::string& _colorName); const appl::GlyphDecoration& getColorGlyph(void) { diff --git a/sources/appl/TextPluginManager.cpp b/sources/appl/TextPluginManager.cpp index 52f5136..867676c 100644 --- a/sources/appl/TextPluginManager.cpp +++ b/sources/appl/TextPluginManager.cpp @@ -66,7 +66,7 @@ void appl::textPluginManager::unInit(void) { getListOnReceiveMessage().clear(); getListOnCursorMove().clear(); // remove all plugin: - for (esize_t iii=0; iii& list = getListOnEventEntry(); - for (esize_t iii=0; iii& list = getListOnEventInput(); - for (esize_t iii=0; iii& list = getListOnWrite(); - for (esize_t iii=0; iii& list = getListOnReplace(); - for (esize_t iii=0; iii& list = getListOnRemove(); - for (esize_t iii=0; iii& list = getListOnReceiveMessage(); - for (esize_t iii=0; iii& list = getListOnCursorMove(); - for (esize_t iii=0; iii call to save file not saved + - Close windows ==> when multiple file confirm close + - Speed optimisation when select... + - List of function in file in + - c + - c++ + - python + - lua + - c++ + - java + ... + +-------+------------+ + | | | + | | | + | | | + +-------+ | + |aaa() | | + |plop() | | + | | | + +-------+------------+ + - Undo / Redo modification position event (now undo but the windows is not update ...) + - Add workspace + - Add hexadecimal editor + - Add a cocillage + - Goto Line + - Buffer view : update display position when change buffer + - Add a real stable version number + - word moving and word removing (ctrl+ '->' && ctrl+ '<-') && (ctrl+ 'del' && ctrl+ 'suppr') + etk : + - path : Remove /./ + ewol : + - A spliter of windows (increase siaze of the buffer list & have multiple windows: + +-------+------------+ + | | | + | | | + | | | + | <-|-> | + | | | + | | | + | | | + +-------+------------+ + +-------+------------+ + | | | + | | n | + | | | | + | +------------+ + | | | | + | | v | + | | | + +-------+------------+ + - File chooser update: + - Click on folder to select the requested folder (+ctrl) + - write a path on the path folder name (call to create a new folder if needed) + - Help with a sub path list + - Scrool in the list of file when writing a new one (same as path...) + - Config and property of all element (==> not easy ...) + - separate the graphyc theme and the color theme + - set the checkbow display correct again + - Reverse remove eObject ?? je sais plus ce que c'est ... ??? + - Remove a eObject from a specific event + - Remove a eObject from a global event + - Show if it is possible to create a variant type for message + - Ephemere windows message: + 1: + +-------+------------+ + | | | + | | | + | | | + | | | + | | | + | | | + | | | + +-------+------------+ + 2: + +-------+------------+ + | | | + | | +--- + | | | He + | | +--- + | | | + | | | + | | | + +-------+------------+ + 3: + +-------+------------+ + | | | + | | +------+ + | | | Hello| + | | +------+ + | | | + | | | + | | | + +-------+------------+ + 4: + +-------+------------+ + | | | + | | +--- + | | | He + | | +--- + | | | + | | | + | | | + +-------+------------+ + 5: + +-------+------------+ + | | | + | | | + | | | + | | | + | | | + | | | + | | | + +-------+------------+ + +-Wsign-compare +-Wreturn-type +-Wunused-but-set-variable +-Wint-to-pointer-cast + +- must cp data/edn.desktop /usr/share/applications/edn.desktop + + +