[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] [support #102994] problems using scanf and fgets, perhaps
From: |
Joerg Wunsch |
Subject: |
[avr-libc-dev] [support #102994] problems using scanf and fgets, perhaps because of malfuncton of malloc? |
Date: |
Mon, 19 Jul 2004 16:53:31 -0400 |
User-agent: |
Mozilla/5.0 Galeon/1.2.13 (X11; FreeBSD i386; U;) Gecko/0 |
This mail is an automated notification from the support tracker
of the project: AVR C Runtime Library.
/**************************************************************************/
[support #102994] Latest Modifications:
Changes by:
Joerg Wunsch <address@hidden>
'Date:
Mon 07/19/04 at 20:50 (Europe/Berlin)
------------------ Additional Follow-up Comments ----------------------------
No further response to email sent on 2004-04-13. The
problem can't be all that serious then.
/**************************************************************************/
[support #102994] Full Item Snapshot:
URL: <http://savannah.nongnu.org/support/?func=detailitem&item_id=102994>
Project: AVR C Runtime Library
Submitted by: Markus Altmann
On: Sat 04/10/04 at 15:36
Category: None
Priority: 5 - Normal
Severity: 1 - None
Resolution: None
Assigned to: None
Originator Email:
Status: Open
Summary: problems using scanf and fgets, perhaps because of malfuncton of
malloc?
Original Submission: Hello all,
First of all I want to say I´m relatively new to all that stuff concerning
programming with linux tools and avr, somehow a greenhorn, and so I would like
you to forgive me if I do some beginner failures (perhaps in using the
homepage, I´d surely aprecitate some help).
I have been using avr-libc-1.0 since months successfully without problems. I´ve
tried version 1.0.3 as well. I want to use scanf() on the m16 and m162, but it
doesnot work properly, getc() works pretty fine.
What I´ve found out is that the function scanf and also fgets return values
none-EOF even though no character was entered.
When calling ferror() it returns always value 16, since registering the device
with fdevopen() but I don´t know if this function is already implemented.
Even clearing the error flag with function clearerr() doesn´t help. Does anyone
know what this errorvalue of decimal 16 means? Perhaps this may help.
As I said printf works fine but when printing out a string read in with scanf,
it seems that no NULL terminator is provided since printf prints out nonsense
till ' ' is found.
As said in Summary it could be possible that malloc has something to do with
that, because I have recognized, that downloading a new software (clearing
section data and bss) into the chip, doesnot clean the input data scanf
returns, of course I know that malloc doesnot clean the requested data but it
is some kind of suspect that scanf returns the same data entered before
downloading, perhaps it is a problem between malloc and scanf.
Can anyone help me?
Follow-up Comments
------------------
-------------------------------------------------------
Date: Mon 07/19/04 at 20:50 By: joerg_wunsch
No further response to email sent on 2004-04-13. The
problem can't be all that serious then.
For detailed info, follow this link:
<http://savannah.nongnu.org/support/?func=detailitem&item_id=102994>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [avr-libc-dev] [support #102994] problems using scanf and fgets, perhaps because of malfuncton of malloc?,
Joerg Wunsch <=