Some change in the organisation files

This commit is contained in:
Edouard Dupin 2012-04-23 13:03:55 +02:00
parent 5d1837eb69
commit 586cd62f44
18 changed files with 9 additions and 200 deletions

View File

@ -28,7 +28,6 @@
#include <etk/UString.h>
#include <etk/File.h>
#include <Display.h>
#include <etk/unicode.h>
#include <ewol/ewol.h>

View File

@ -26,7 +26,6 @@
#include <appl/Debug.h>
#include <tools_globals.h>
#include <BufferText.h>
#include <toolsMemory.h>
#include <etk/RegExp.h>
#include <etk/unicode.h>

View File

@ -25,7 +25,6 @@
#include <appl/Debug.h>
#include <tools_globals.h>
#include <Display.h>
#include <BufferView.h>
#include <BufferManager.h>
#include <ColorizeManager.h>

View File

@ -28,7 +28,6 @@
#include <appl/Debug.h>
#include <CodeView.h>
#include <BufferManager.h>
#include <Display.h>
#include <MsgBroadcast.h>
#include <ewol/widget/List.h>

View File

@ -28,7 +28,6 @@
#include <appl/Debug.h>
#include <tools_globals.h>
#include <Display.h>
#include <CodeView.h>
#include <BufferManager.h>
#include <ColorizeManager.h>

View File

@ -29,7 +29,6 @@
#include <appl/Debug.h>
#include <CodeView.h>
#include <BufferManager.h>
#include <Display.h>
#include <MsgBroadcast.h>
#include <etk/Types.h>

View File

@ -28,7 +28,6 @@
#include <etk/File.h>
#include <ewol/ewol.h>
#include <Gui/MainWindows.h>
#include <Display.h>
#include <BufferManager.h>
#include <ColorizeManager.h>
#include <HighlightManager.h>
@ -39,7 +38,7 @@
#include <etk/UString.h>
#include <ewol/EObject.h>
#include <ewol/WidgetManager.h>
#include <tools/MsgBroadcast/MsgBroadcast.h>
#include <tools/MsgBroadcast.h>
MainWindows * basicWindows = NULL;

View File

@ -1,45 +0,0 @@
/**
*******************************************************************************
* @file Display.cpp
* @brief Editeur De N'ours : Basic Pixbuf display function
* @author Edouard DUPIN
* @date 21/01/2010
* @par Project
* Edn
*
* @par Copyright
* Copyright 2010 Edouard DUPIN, all right reserved
*
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY.
*
* Licence summary :
* You can modify and redistribute the sources code and binaries.
* You can send me the bug-fix
* You can not earn money with this Software (if the source extract from Edn
* represent less than 50% of original Sources)
* Term of the licence in in the file licence.txt.
*
*******************************************************************************
*/
#include <appl/Debug.h>
#include <tools_globals.h>
#include <Display.h>
#include <ewol/ewol.h>
#undef __class__
#define __class__ "Display"
int32_t Display::GetFontHeight(void)
{
int32_t fontId = ewol::GetDefaultFontId();
return ewol::GetHeight(fontId);
}
int32_t Display::GetFontWidth(void)
{
int32_t fontId = ewol::GetDefaultFontId();
return ewol::GetWidth(fontId, "A");
}

View File

@ -1,43 +0,0 @@
/**
*******************************************************************************
* @file Display.h
* @brief Editeur De N'ours : Basic Pixbuf display function (header)
* @author Edouard DUPIN
* @date 21/01/2010
* @par Project
* Edn
*
* @par Copyright
* Copyright 2010 Edouard DUPIN, all right reserved
*
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY.
*
* Licence summary :
* You can modify and redistribute the sources code and binaries.
* You can send me the bug-fix
* You can not earn money with this Software (if the source extract from Edn
* represent less than 50% of original Sources)
* Term of the licence in in the file licence.txt.
*
*******************************************************************************
*/
#ifndef __TOOLS_DISPLAY_H__
#define __TOOLS_DISPLAY_H__
#include <appl/Debug.h>
/**
* Basic namespace for the font display system
*/
namespace Display
{
int32_t GetFontHeight(void);
int32_t GetFontWidth(void);
};
#endif

View File

@ -25,7 +25,6 @@
#include <appl/Debug.h>
#include <tools_globals.h>
#include <toolsMemory.h>
#include <EdnVectorBuf.h>
#undef __class__
@ -66,7 +65,7 @@ EdnVectorBuf::EdnVectorBuf(const EdnVectorBuf & Evb)
m_gapEnd = Evb.m_gapEnd;
// allocate all same data
APPL_MALLOC(m_data, m_allocated, int8_t);
m_data = (int8_t *)malloc( m_allocated * sizeof(int8_t) );
APPL_ASSERT(NULL!=m_data, "Error in data allocation");
// Copy all data ...
memcpy(m_data, Evb.m_data, m_allocated * sizeof(int8_t) );
@ -84,7 +83,7 @@ EdnVectorBuf::EdnVectorBuf(const EdnVectorBuf & Evb)
EdnVectorBuf::~EdnVectorBuf()
{
if (NULL!=m_data) {
APPL_FREE(m_data);
free(m_data);
m_data = NULL;
m_allocated = 0;
m_gapStart = 0;
@ -173,7 +172,7 @@ EdnVectorBuf& EdnVectorBuf::operator=(const EdnVectorBuf & Evb)
if( this != &Evb ) // avoid copy to itself
{
if (NULL!=m_data) {
APPL_FREE(m_data);
free(m_data);
m_data = NULL;
}
// Set the new value
@ -181,7 +180,7 @@ EdnVectorBuf& EdnVectorBuf::operator=(const EdnVectorBuf & Evb)
m_gapStart = Evb.m_gapStart;
m_gapEnd = Evb.m_gapEnd;
// allocate all same data
APPL_MALLOC(m_data, m_allocated, int8_t);
m_data = (int8_t *)malloc( m_allocated * sizeof(int8_t) );
APPL_ASSERT(NULL!=m_data, "Error in data allocation");
// Copy all data ...
memcpy(m_data, Evb.m_data, m_allocated * sizeof(int8_t) );
@ -340,10 +339,10 @@ void EdnVectorBuf::ChangeAllocation(int32_t newSize)
// check if something is allocated :
if (NULL == m_data) {
// no data allocated ==> request an allocation (might be the first)
APPL_MALLOC(m_data, newSize, int8_t);
m_data = (int8_t *)malloc( newSize * sizeof(int8_t) );
} else {
// move datas
APPL_REALLOC(m_data, newSize, int8_t);
m_data = (int8_t *)realloc( m_data, newSize* sizeof(int8_t) );
}
// Check result with assert :
APPL_ASSERT(NULL!=m_data, "Error in data allocation");

View File

@ -26,7 +26,6 @@
#ifndef __EDN_VECTOR_BUF_H__
#define __EDN_VECTOR_BUF_H__
#include <toolsMemory.h>
#include <etk/VectorType.h>
#undef __class__

View File

@ -1,92 +0,0 @@
/**
*******************************************************************************
* @file toolsMemory.h
* @brief Editeur De N'ours : Memory implementation (headers)
* @author Edouard DUPIN
* @date 12/01/2011
* @par Project
* Edn
*
* @par Copyright
* Copyright 2010 Edouard DUPIN, all right reserved
*
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY.
*
* Licence summary :
* You can modify and redistribute the sources code and binaries.
* You can send me the bug-fix
* You can not earn money with this Software (if the source extract from Edn
* represent less than 50% of original Sources)
* Term of the licence in in the file licence.txt.
*
*******************************************************************************
*/
#ifndef __TOOLS_MEMORY_H__
#define __TOOLS_MEMORY_H__
// General
#ifdef APPL_MEMORY_CHECKER
void APPL_MemFree( void * pointerData, const char * variableName, const char * functionName, int32_t line, const char * fileName );
void * APPL_MemMalloc( size_t num, size_t size, uint8_t init, const char * variableName, const char * functionName, int32_t line, const char * fileName );
void APPL_MemShowLogs( void );
# define APPL_MALLOC(pointerData, nbElements, dataType) do { \
pointerData = (dataType *)APPL_MemMalloc( (nbElements), sizeof(dataType), 0, #pointerData, __func__, __LINE__, __FILE__); \
}while(0)
# define APPL_MALLOC_CAST(pointerData, nbElements, dataType, cast) do { \
pointerData = (cast)APPL_MemMalloc( (nbElements), sizeof(dataType), 0, #pointerData, __func__, __LINE__, __FILE__); \
}while(0)
# define APPL_CALLOC(pointerData, nbElements, dataType) do { \
pointerData = (dataType *)APPL_MemMalloc( (nbElements), sizeof(dataType), 1, #pointerData, __func__, __LINE__, __FILE__); \
}while(0)
# define APPL_CALLOC_CAST(pointerData, nbElements, dataType, cast) do { \
pointerData = (cast)APPL_MemMalloc( (nbElements), sizeof(dataType), 1, #pointerData, __func__, __LINE__, __FILE__); \
}while(0)
# define APPL_FREE(pointerData) do { \
APPL_MemFree( (pointerData) , #pointerData, __func__, __LINE__, __FILE__); \
(pointerData) = NULL; \
}while(0)
# define APPL_MEM_SHOW_LOG() do { \
APPL_MemShowLogs(); \
}while(0)
#else
# define APPL_MALLOC(pointerData, nbElements, dataType) do { \
(pointerData) = (dataType *)malloc( (nbElements) * sizeof(dataType) ); \
}while(0)
# define APPL_MALLOC_CAST(pointerData, nbElements, dataType, cast) do { \
(pointerData) = (cast)malloc( (nbElements) * sizeof(dataType) ); \
}while(0)
# define APPL_CALLOC(pointerData, nbElements, dataType) do { \
(pointerData) = (dataType *)calloc( (nbElements), sizeof(dataType) ); \
}while(0)
# define APPL_CALLOC_CAST(pointerData, nbElements, dataType, cast) do { \
(pointerData) = (cast)calloc( (nbElements), sizeof(dataType) ); \
}while(0)
# define APPL_REALLOC(pointerData, nbElements, dataType) do { \
(pointerData) = (dataType *)realloc( (pointerData), (nbElements)* sizeof(dataType) ); \
}while(0)
# define APPL_REALLOC_CAST(pointerData, nbElements, dataType, cast) do { \
(pointerData) = (cast)realloc( (pointerData), (nbElements) * sizeof(dataType) ); \
}while(0)
# define APPL_FREE(pointerData) do { \
free( pointerData ); \
(pointerData) = NULL; \
}while(0)
# define APPL_MEM_SHOW_LOG() do { \
sup_system_diag("No Memory check availlable"); \
}while(0)
#endif
#endif

View File

@ -11,8 +11,7 @@ FILE_LIST+= appl/ctags/readtags.cpp \
# Globals debug tool:
FILE_LIST+= appl/Debug.cpp \
appl/tools/globals/tools_globals.cpp \
appl/tools/memory/toolsMemory.cpp
appl/tools/tools_globals.cpp
# Buffers internal:
FILE_LIST+= appl/tools/EdnTemplate/EdnVectorBuf.cpp \
@ -24,8 +23,7 @@ FILE_LIST+= appl/tools/EdnTemplate/EdnVectorBuf.cpp \
# Tools internal:
FILE_LIST+= appl/tools/Display/Display.cpp \
appl/tools/MsgBroadcast/MsgBroadcast.cpp
FILE_LIST+= appl/tools/MsgBroadcast.cpp
# Gui:
FILE_LIST+= appl/Gui/BufferView.cpp \