Article View: comp.sys.amiga.tech
Article #3468Bug in Lattice 5.02?
From: Kevin Goroway
Date: Sun, 06 May 1990 04:25
Date: Sun, 06 May 1990 04:25
47 lines
1613 bytes
1613 bytes
Can anyone tell me what is wrong with the code that follows?
It compiles fine on my 2500/20, but crashes for some reason...
/*begin program */
#include <stdio.h>
#include <math.h>
#include <m68881.h>
main()
{
FILE *fp;
float tmp1;
fp=fopen("prog4.dat","r");
if(fp == 0) {
printf("couldn't open file\n");
exit(1);
}
fscanf(fp,"%f",&tmp1); /*this works just fine... */
printf("it was %f\n",tmp1);
fscanf(fp,"%f",&tmp1); /* this crashes the machine... */
printf("it was %f\n",tmp1);
}
/* end program...*/
The data file simply looks like this...
2.
0. 1. 0.
etc....
It was compiled like this:
lc -m2 -f8 test
blink from lib:c.o+test.o to test lib lib:lcm881.lib+lib:amiga.lib+lib:lc.lib
I think I've done everything that I need to, to utilize the 881...
Anyone care to explain why this is crashing?
thanks...
--
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
| Worcester Polytechnic Institute | "It happens sometimes, people just |
| Pawn@wpi.wpi.edu Pawn@wpi.bitnet | explode, natural causes."-Repo Man |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Technical Details
Message-ID:
<12707@wpi.wpi.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!usc!snorkelwacker!husc6!m2c!wpi!pawnShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!usc!snorkelwacker!husc6!m2c!wpi!pawn From: pawn@wpi.wpi.edu (Kevin Goroway) Newsgroups: comp.sys.amiga.tech Subject: Bug in Lattice 5.02? Keywords: 68881 bug? Message-ID: <12707@wpi.wpi.edu> Date: 6 May 90 04:25:29 GMT Organization: Worcester Polytechnic Institute, Worcester, Mass. Lines: 47