Article View: comp.sys.amiga.tech
Article #6003Help! Scanf() problems in Manx 5.0D!
From: Dan Zerkle
Date: Sun, 21 Oct 1990 04:35
Date: Sun, 21 Oct 1990 04:35
66 lines
2814 bytes
2814 bytes
Using A3000 with 2.0 KS36.141 WB36.68
Manx's Aztec C version 5.0d (the newest).
I just installed Aztec C 5.0d and I am having MAJOR difficulties.
Please help if you can, since I need to turn in an assignment on
the 23rd, and this is really getting in my way.
To get a virgin update, I removed my old installation and installed
5.0a from scratch. Then, I unarchived the 5.0d stuff from the first
two disks (not the 2.0 includes) over the old files. I had to set an
option in zoo to get it to over-write the old files.
1. Less serious problem: I can't tell the compiler or linker where
the Aztec directories are. When compiling, I have to throw in an
option like "-i a:Aztec/Include" for it to find the include files.
When linking, I have to type "-la:Aztec/Lib/m8" instead of just a
simple "-lm8".
The set commands in the aztec.sh sequence didn't seem to be working
because they had quotes around parts. I removed the quotes and now
the set command by itself gives:
CCTEMP ram:
CLIB a:Aztec/Lib
INCLUDE a:Aztec/Include
According to the 5.0b readme, the proprietary Aztec "set"
environment command is no longer used, and indeed gives no better
results. So, what am I doing wrong here?
2. Critical problem: I STILL can't get scanf() to work properly.
According to the one person who responded (thanks!), there is a
documented bug in 5.0a such that the 68881 version of scanf messes
up when reading doubles.
Example code:
#include <stdio.h>
main()
{
double dval;
scanf("%lf",&dval);
printf("%lf\n",dval);
}
cc -i a:Aztec/Include testprg.c
ln testprg.o -la:Aztec/Lib/m -la:Aztec/Lib/c
testprg
5.6 <- I typed input to program
<no output, prompt returns>
or worse:
cc -f8 -i a:Aztec/Include testprg.c
ln testprg.o -la:Aztec/Lib/m8 -la:Aztec/Lib/c
testprg
5.6 <- I typed input to program
<big, ugly, fat, hairy guru>
Help! What the ^%&(* is going on here? The scanf bug is gone in
5.0d, right????
Dan Zerkle zerkle@iris.ucdavis.edu (916) 754-0240
Amiga... Because life is too short for boring computers.
Technical Details
Message-ID:
<7851@ucdavis.ucdavis.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!usc!nic.csu.net!csus.edu!ucdavis!iris!zerkleShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!usc!nic.csu.net!csus.edu!ucdavis!iris!zerkle From: zerkle@iris.ucdavis.edu (Dan Zerkle) Newsgroups: comp.sys.amiga.tech Subject: Help! Scanf() problems in Manx 5.0D! Summary: Gurus the machine when it should work Keywords: scanf manx aztec bugs Message-ID: <7851@ucdavis.ucdavis.edu> Date: 21 Oct 90 04:35:30 GMT Sender: usenet@ucdavis.ucdavis.edu Reply-To: zerkle@iris.ucdavis.edu (Dan Zerkle) Organization: U.C. Davis - Department of Electrical Engineering and Computer Science Lines: 66