diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 44f6837571..c48526e12f 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -40,9 +40,10 @@ bool g_TwoSegmentTrackBuild = TRUE; bool g_HightLigt_Status; extern PARAM_CFG_BASE* ParamCfgList[]; -char* buf_work = NULL; /* pointeur sur le buffer de travail */ -char* adr_lowmem = NULL; /* adresse de base memoire de calcul disponible*/ -char* adr_max = NULL; /* adresse haute maxi utilisee pour la memoire */ +/* A buffer used in some computations (will be removed in next cleanup code, + * DO NOT use) */ +#define BUFMEMSIZE 256000 /* buffer size (in bytes) */ +char* adr_lowmem = NULL; int Angle_Rot_Module; int ModuleSegmentWidth; @@ -141,8 +142,7 @@ Changing extension to .brd." ), /* allocation de la memoire pour le fichier et autres buffers: */ /* On reserve BUFMEMSIZE octets de ram pour calcul */ - buf_work = adr_lowmem = (char*) MyZMalloc( BUFMEMSIZE ); /* adresse de la zone de calcul */ - adr_max = adr_lowmem; + adr_lowmem = (char*) MyZMalloc( BUFMEMSIZE ); /* adresse de la zone de calcul */ if( adr_lowmem == NULL ) { diff --git a/pcbnew/pcbnew.h b/pcbnew/pcbnew.h index cf1a21158c..2b734c5857 100644 --- a/pcbnew/pcbnew.h +++ b/pcbnew/pcbnew.h @@ -82,14 +82,6 @@ extern bool Segments_45_Only; extern wxString g_Shapes3DExtBuffer; extern wxString g_DocModulesFileName; -/* A buffer used in some computations (will be removed in next cleanup code, - * do not use) */ -#define BUFMEMSIZE 256000 /* buffer size (in bytes) */ -extern char* buf_work; /* pointeur sur le buffer de travail */ -extern char* adr_lowmem; /* adresse de base memoire de calcul disponible*/ -extern char* adr_himem; /* adresse haute limite de la memoire disponible*/ -extern char* adr_max; /* adresse haute maxi utilisee pour la memoire */ - /* Variables used in footprint handling */ extern int Angle_Rot_Module; extern wxSize ModuleTextSize; /* Default footprint texts size */ diff --git a/pcbnew/ratsnest.cpp b/pcbnew/ratsnest.cpp index 4374fd5cd1..fb2bb6b083 100644 --- a/pcbnew/ratsnest.cpp +++ b/pcbnew/ratsnest.cpp @@ -13,6 +13,8 @@ #include "protos.h" +extern char* adr_lowmem; /* adresse de base memoire de calcul disponible */ + /* exported variables */ CHEVELU* g_pt_chevelu; CHEVELU* local_liste_chevelu; // Buffer address for local ratsnest @@ -566,7 +568,6 @@ void WinEDA_BasePcbFrame::Build_Board_Ratsnest( wxDC* DC ) m_Pcb->m_NbNoconnect = noconn; m_Pcb->m_Status_Pcb |= LISTE_CHEVELU_OK; - adr_lowmem = buf_work; // erase the ratsnest displayed on screen if needed CHEVELU* Chevelu = (CHEVELU*) m_Pcb->m_Ratsnest; @@ -1002,8 +1003,6 @@ void WinEDA_BasePcbFrame::build_liste_pads() } } - adr_lowmem = buf_work; - if( m_Pcb->m_Ratsnest ) { MyFree( m_Pcb->m_Ratsnest ); @@ -1247,9 +1246,6 @@ calcul_chevelu_ext: local_chevelu++; } - /* return the new free memory buffer address, in the general buffer */ - adr_max = MAX( adr_max, (char*) (local_chevelu + 1) ); - return (char*) (local_chevelu + 1); /* the struct pointed by local_chevelu is used in temporary computations, so we skip it */