[186] in mathematical software users group
MATCOM Patch for gcc/DJGPP
daemon@ATHENA.MIT.EDU (Keren Yaron)
Fri Apr 19 13:33:15 1996
Date: Fri, 19 Apr 1996 20:28:45 +0300 (IDT)
From: Keren Yaron <yak@techunix.technion.ac.il>
To: bc266@gre.ac.uk, jaydip@gg.iitkgp.ernet.in, msug@MIT.EDU,
netmho@netvision.net.il, richard.baltensperger@unifr.ch
Hi,
Here is a solution to segmentation failures when using MATCOM
with gcc. A patch for DJGPP is available on the MATCOM Home Page.
This patch is not needed with other compilers.
Install instructions
--------------------
cd to the matcom *source* directory.
Save the patch included at the end of this letter to a file named file_70.dif.
Run:
patch < file_70.dif
(patch is part of the gcc binutils)
That will modify the source file file_70.cxx.
Reinstall matcom.
You should now have a new matcom (executable). The new
translator produces different C++ code.
Source .m files will have to be recompiled. Since a file is
recompiled only if it is newer, use the force option:
matcom sample /force
Yaron
#################################cut here##################################
*** file_70.cxx Fri Mar 1 17:00:00 1996
--- file_70.new Wed Apr 17 01:38:14 1996
***************
*** 126,132 ****
l_1826=l_1992;
}
}
! else if (isalpha(c)) { while ( l_1866(c=l_1853.peek()) ) {
c=l_1871(l_1853, l_1854, echo);
*l_2081++=c;
if (l_1824(l_2081,l_2084,l_1800)) break;
--- 126,132 ----
l_1826=l_1992;
}
}
! else if (isalpha(c)) { while ( l_1866(c=l_1853.peek()) ) {
c=l_1871(l_1853, l_1854, echo);
*l_2081++=c;
if (l_1824(l_2081,l_2084,l_1800)) break;
***************
*** 529,539 ****
l_1820.set(l_1468,"\163\137\163",l_2002);
}
}
if (l_2118) {
! l_1820.l_1945(l_1468,"\050\115\051",l_1988);
! l_1468++;
}
l_1468=l_1831(l_1468);
if (l_1820.l_1947(l_1468,'\135')) break;
l_1468++;
}
--- 529,549 ----
l_1820.set(l_1468,"\163\137\163",l_2002);
}
}
+ char b[128];
if (l_2118) {
! sprintf(b,"(b_%d=",l_1809);
! l_1820.l_1945(l_1468,b,l_1992);
! sprintf(b,"b_%d",l_1809);
! l_1823.l_1918(b,l_1898,mode);
! l_1468++;
}
l_1468=l_1831(l_1468);
+ if (l_2118) {
+ sprintf(b,",b_%d)",l_1809);
+ l_1820.l_1945(l_1468,b,l_1992);
+ l_1468++;
+ l_1809++;
+ }
if (l_1820.l_1947(l_1468,'\135')) break;
l_1468++;
}
#################################cut here##################################