Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Thu, 6 Sep 2001 00:54:13 +0200 From: Kurt Roeckx To: cygwin AT cygwin DOT com Subject: Scanf with a long long. Message-ID: <20010906005413.A758@ping.be> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i I need use a 64 bit number, and int64_t is defined as a long long. The problem is that scanf doesn't like numbers bigger then 0xFFFFFFFF, and always returns that number in that case. printf works fine with them. An example is doing this: long long int i; sscanf("123456789", "%Lx", &i); printf("%llx\n%llx\n", i, i + 1); it will print: ffffffff 100000000 This problem seems to be reported once before in 1997, but still doesn't seem to be fixed. I'm using cygwin 1.3.2 on win98. Kurt -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/