From owner-freebsd-current Fri Jun 21 0:11:30 2002 Delivered-To: freebsd-current@freebsd.org Received: from speechpro.com (crt-gw.infopro.spb.su [195.201.254.5]) by hub.freebsd.org (Postfix) with ESMTP id 1D60237B40E for ; Fri, 21 Jun 2002 00:11:25 -0700 (PDT) Received: from drweb by sysadm.stc with drweb-scanned (Exim 3.36 #1) id 17LIa3-0005PN-00 for freebsd-current@FreeBSD.ORG; Fri, 21 Jun 2002 11:11:39 +0400 Received: from igorr by sysadm.stc with local (Exim 3.36 #1) id 17LIa3-0005PE-00 for freebsd-current@FreeBSD.ORG; Fri, 21 Jun 2002 11:11:39 +0400 Date: Fri, 21 Jun 2002 11:11:39 +0400 From: Igor Roboul To: freebsd-current@FreeBSD.ORG Subject: Re: error in ncurses in 'make buildworld' Message-ID: <20020621071139.GA20615@sysadm.stc> Reply-To: ir@hotbox.ru Mail-Followup-To: Igor Roboul , freebsd-current@FreeBSD.ORG References: <20020619163321.A48809@dragon.nuxi.com> <20020620074657.11859.qmail@web14108.mail.yahoo.com> <20020620092649.GA10310@sysadm.stc> <20020620101611.B55653@dragon.nuxi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020620101611.B55653@dragon.nuxi.com> User-Agent: Mutt/1.3.99i X-Envelope-To: freebsd-current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Jun 20, 2002 at 10:16:11AM -0700, David O'Brien wrote: > > I have posted info about awk (which is nawk) incorrectly printing > > numbers between 10 and 15. It adds ascii '0' to value. > > This is *NOT* a fix. nawk builds world just fine on my systems. > Of course this leads one to wonder what is different about my systems and > yours. I'm trying to figure this too. Look at following program and it's output, and please tell me what's wrong. It works as expected on -STABLE and Linux. #include #include #include int main(int argc,char**argv) { double a; int b; char bb[100]; strcpy(bb,argv[1]); printf("%lf\n",strtod(bb,NULL)); sscanf(bb,"%lf",&a); printf("%lf\n",a); sscanf(bb,"%f",&a); printf("%f\n",a); sscanf(bb,"%d",&b); printf("%d\n",b); return 0; } igorr@sysadm~> gcc -Wall qq.c qq.c: In function `main': qq.c:16: warning: float format, double arg (arg 3) <--- I have expected this igorr@sysadm~> ./a.out 123 123.000000 0.124861 0.0<4861 <--- Pay attention 123 IIRC this worked fine in preGCC3.1 world. -- Igor Roboul, System administrator at Speech Technology Center http://www.speechpro.com http://www.speechpro.ru To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message