minor cleanup

This commit is contained in:
charras 2009-05-24 13:40:23 +00:00
parent 654045f2de
commit 8d6044563a
3 changed files with 7 additions and 19 deletions

View File

@ -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 )
{

View File

@ -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 */

View File

@ -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
*/