Article View: gnu.g++
Article #22Two more patches for ET++
From: Tom Vijlbrief
Date: Thu, 29 Jun 1989 09:38
Date: Thu, 29 Jun 1989 09:38
78 lines
2751 bytes
2751 bytes
Here are two more patches to make ET++ work with g++:
In Object.C add the ifdef to solve a compiler bug:
Bug discovered when compiling miniedit and draw. These work
perfectly now!!
===========================
void Object::FlushChanges()
{
Collection *col= (Collection*) DelayedChanges.AtKey(this);
if (col) {
ObjInt *ref= (ObjInt*)col->At(0);
if (ref->GetValue() == 0) {
flags &= ~cObjDelayChanges;
ChangeMessage *cm;
Iter next(col);
next(); // overread reference count
while (cm= (ChangeMessage*) next())
ChangedWhat(cm->GetWhat());
col->FreeAll();
#ifdef __GNUG__
Collection *tmpcol= (Collection*)DelayedChanges.RemoveKey(this);
delete tmpcol;
#else
delete DelayedChanges.RemoveKey(this);
#endif
}
else
(*ref)--;
}
}
============================
In the 'C' file sunwindow.c a function is called
with the wrong number of parameters.
Isn't C++ great! :-)
=================================
static void PolyDot(port, pr, dx, dy, pts, n, pattern, mode, psz)
register struct SunWindowPort *port;
register struct pixrect *pr;
register int n;
int dx, dy, pattern, mode, psz;
register struct pr_pos *pts;
{
register int i, x, y;
register struct pr_pos *p;
register struct pixrect *patpr, *penpr= 0;
int oox, ooy, rop, Mode;
rop= PolyTab[mode][pat2ix(pattern)].rop;
if (psz <= 1)
Mode= PolyTab[mode][pat2ix(pattern)].mode11;
else {
if (psz > 2 && psz < MAXPENS) {
if (pens[psz] == 0)
pens[psz]= MakePen(psz);
penpr= pens[psz];
}
Mode= PolyTab[mode][pat2ix(pattern)].modeNN;
}
#ifdef __GNUC__
patpr= GetPattern(pattern,dx,dy);
#else
patpr= GetPattern(pattern);
#endif
if (pr) {
if (penpr)
=======================================
===============================================================================
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:
<467@tnosoes.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!hp4nl!tnosoes!tomShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!hp4nl!tnosoes!tom From: tom@tnosoes.UUCP (Tom Vijlbrief) Newsgroups: gnu.g++ Subject: Two more patches for ET++ Keywords: ET++ Message-ID: <467@tnosoes.UUCP> Date: 29 Jun 89 09:38:13 GMT Organization: TNO Institute for Perception, Soesterberg, The Netherlands Lines: 78