🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++
Article #23

Re: Two more patches for ET++ (4 more patches)

#23
From: Tom Vijlbrief
Date: Fri, 30 Jun 1989 12:32
98 lines
3036 bytes
Four more double expression evaluation compilerbugs.

System.C:
=============================================
static void RemoveDeleted(ObjList *ol)
{
    if (ol->Size() <= 0)
	return;
    Iter next(ol);
    register SysEvtHandler *eh;
    
    while (eh= (SysEvtHandler*) next())
	if (eh->ShouldRemove())
#ifdef __GNUG__
	    { ObjPtr tmpp= ol->RemovePtr(eh); delete tmpp; }
#else
	    delete ol->RemovePtr(eh);
#endif
}
=============================================
Alert.C
===========================================

int Alert::Show(char* fmt, ...)
{
    va_list ap;
    va_start(ap, fmt);
    int ret;

    if (image->IsKindOf(Cluster))
	((Cluster*)image)->SetModified();
    char *buf= strvprintf(fmt, ap);
    if (gWinInit) {
#ifdef __GNUG__
	{ Text *tmpp= ((StaticTextView*)text)->SetText(new StyledText(gSysFont, buf));
	  delete tmpp;
	}
#else
	delete ((StaticTextView*)text)->SetText(new StyledText(gSysFont, buf));
#endif
	// GetWindow()->contentRect.extent= gPoint0;
	CalcLayout(FALSE);
	ret= Dialog::Show();
    } else {
====================================================
Mark.C (near line 140)
=======================================================
	    else if (at < m->pos && at + n >= m->pos + m->len) {
		m->state = eStateDeleted;
		m->len = 0;
		m->pos = at;
		m->ChangedWhat((void*) eMarkDeleted);
		if (doRemove)
#ifdef __GNUG__
		    { ObjPtr tmpp= Remove(m); delete tmpp; }
#else
		    delete Remove(m);
#endif
	    }

	    // ^ | ^  |
	    else if (at < m->pos && at + n > m->pos) {
		m->len = m->pos+m->len - (at +n); 
===============================================================================
CodeTextView.C (two times)
=======================================================
	}
	prevCh= c;
    }
#ifdef __GNUG__
    TextRunArray *tmpp= stext->SetStyles(st); delete tmpp;
#else
    delete stext->SetStyles(st);
#endif
}

void CodeTextView::SetDefaultStyle()
{
    if (!text->IsKindOf(StyledText)) 
	return;
    StyledText *stext= (StyledText*)text;
    TextRunArray *st= new TextRunArray(stext);
    st->Insert(plainStyle, 0, 0, stext->Size());
#ifdef __GNUG__
    TextRunArray *tmpp= stext->SetStyles(st); delete tmpp;
#else
    delete stext->SetStyles(st);
#endif
}

=================================================
Tom Vijlbrief
TNO Institute for Perception
P.O. Box 23				Phone: +31 34 63 562 11
3769 ZG  Soesterberg			E-mail: tnosoes!tom@mcvax.cwi.nl
The Netherlands				    or:	uunet!mcvax!tnosoes!tom
===============================================================================
Technical Details
Message-ID: <468@tnosoes.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!mcvax!hp4nl!tnosoes!tom
References: <467@tnosoes.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!mcvax!hp4nl!tnosoes!tom
From: tom@tnosoes.UUCP (Tom Vijlbrief)
Newsgroups: gnu.g++
Subject: Re: Two more patches for ET++ (4 more patches)
Keywords: ET++
Message-ID: <468@tnosoes.UUCP>
Date: 30 Jun 89 12:32:31 GMT
References: <467@tnosoes.UUCP>
Organization: TNO Institute for Perception, Soesterberg, The Netherlands
Lines: 98