gnupic: Re: [gnupic] building problem with YaPIDE on FC4


Previous by date: 15 Jan 2006 11:40:02 +0000 picp 0.6.8 beta 1, Jeff
Next by date: 15 Jan 2006 11:40:02 +0000 GPSIM / dsPIC, Andrew Nguyen
Previous in thread: 15 Jan 2006 11:40:02 +0000 Re: [gnupic] building problem with YaPIDE on FC4, Xiaofan Chen
Next in thread:

Subject: Re: [gnupic] building problem with YaPIDE on FC4
From: Xiaofan Chen ####@####.####
Date: 15 Jan 2006 11:40:02 +0000
Message-Id: <a276da400601150339o5c273af5s7d50cb31bf5ffdf6@mail.gmail.com>

On 12/18/05, Scott Dattalo ####@####.#### wrote:
> > YaPIDE is here:
> > http://www.mtoussaint.de/yapide.html
>
> Oh, and no, I can't tell why it's failing to compile. I suspect there's
> something with the newer release of gcc that is more strict...
>

Just an update on this again google helps me to "solve" the issue but
I am not so sure if it is correct C++ or not.

In src/cod.cpp:

int SymbolBlock::numSymbols() const
{
  char *ptr = m_data;
  int len=0;
  int numSymbols = 0;

  while (len<CodBlock::BlockSize)
  {
//    int off = ptr[SymbolLength] + Offset;
//  Xiaofan:  change the above to allow compiling with newer g++
    int off = static_cast<int>(ptr[SymbolLength]) + Offset;

    if (0 == ptr[SymbolLength]) return numSymbols;

    ptr += off;
    len += off;
    numSymbols++;

/*    std::cerr << "off=" << off << " len=" << len
              << " num=" << numSymbols << std::endl; */
  }
  return 0;
}

int
SymbolBlock::symbolOffset( int i ) const
{
  //int tmpi = i;
  char *data = m_data;
  int len = 0;

  while (i)
  {
//    int off = data[SymbolLength] + Offset;
//  Xiaofan: change the above to allow compiling with newer g++
    int off = static_cast<int>(data[SymbolLength]) + Offset;
    data += off;
    len += off;
    --i;

    if (len >= CodBlock::BlockSize) return -1;
  }

  //std::cerr << "offset " << tmpi << " = " << len << std::endl;
  return len;
}

In file src/ramview.cpp
void
RAMView::setPic( Pic * pic )
{
  m_pic = pic;
  if (!m_pic)
  {
    ui_table->setNumRows(0);
    return;
  }
//  m_condition = new HighlightCondition [6] ( m_pic->ram() );
// Xiaofan: change the above to allow compiling with new g++
// Xiaofan: Is this really correct way???
	for (int i=0; i<6; i++)
         m_condition[i]=HighlightCondition(m_pic->ram());

My C++ knowledge is next to none ( I only know a bit plain C), so
I am not so sure whether the above change is correct or not. Please
comment. Thanks.

I know gpsim is better though but the GUI interface of yapide is really
quite nice. ;-)

Regards,
Xiaofan

Previous by date: 15 Jan 2006 11:40:02 +0000 picp 0.6.8 beta 1, Jeff
Next by date: 15 Jan 2006 11:40:02 +0000 GPSIM / dsPIC, Andrew Nguyen
Previous in thread: 15 Jan 2006 11:40:02 +0000 Re: [gnupic] building problem with YaPIDE on FC4, Xiaofan Chen
Next in thread:


Powered by ezmlm-browse 0.20.