avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] [bugs #9704] suggested putc() behavior breaks binary tran


From: Joerg Wunsch
Subject: [avr-libc-dev] [bugs #9704] suggested putc() behavior breaks binary transfer
Date: Tue, 20 Jul 2004 17:48:10 -0400
User-agent: Mozilla/5.0 Galeon/1.2.6 (X11; FreeBSD i386; U;) Gecko/0

This mail is an automated notification from the bugs tracker
 of the project: AVR C Runtime Library.

/**************************************************************************/
[bugs #9704] Latest Modifications:

Changes by: 
                Joerg Wunsch <address@hidden>
'Date: 
                Tue 07/20/2004 at 21:44 (Europe/Berlin)

            What     | Removed                   | Added
---------------------------------------------------------------------------
         Assigned to | None                      | joerg_wunsch







/**************************************************************************/
[bugs #9704] Full Item Snapshot:

URL: <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=9704>
Project: AVR C Runtime Library
Submitted by: 0
On: Tue 07/20/2004 at 16:06

Category:  Documentation
Severity:  5 - Average
Item Group:  None
Resolution:  None
Assigned to:  joerg_wunsch
Originator Email:  address@hidden
Status:  Open


Summary:  suggested putc() behavior breaks binary transfer

Original Submission:  The description and sample code for putc() in stdio.h 
suggest that the developer should replace newline characters with a carriage 
return followed by a newline. In embedded environments, particularly for 
prototyping, it is common to use RS232 to transfer binary data. A putc() 
implemented as suggested would break any user code that expects values to be 
transmitted literally.

The documentation should clarify this.

The other issue here is that depending upon the terminal being used, if putc() 
doesn't mangle newlines, the user needs to provide a carriage return in his 
printf() strings. This looks ugly and is a hassle especially to people who are 
used to coding in a Unix environment. Perhaps one fix would be to provide a 
putascii() function which would be called by puts() and printf() and would 
mangle the newline (and possibly other) character(s) as necessary. Vanilla 
putc() would then behave as expected.











For detailed info, follow this link:
<http://savannah.nongnu.org/bugs/?func=detailitem&item_id=9704>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]