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: Thu, 22 Jul 2004 07:17:13 -0400
User-agent: Mozilla/5.0 Galeon/1.2.13 (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: 
                Thu 07/22/2004 at 11:13 (Europe/Berlin)

            What     | Removed                   | Added
---------------------------------------------------------------------------
          Resolution | None                      | Fixed
              Status | Open                      | Closed


------------------ Additional Follow-up Comments ----------------------------
A better description has been added to rev 1.15 of
include/stdio.h (and rev. 1.11.2.4 as well).

Note that the updated documentation will only be reflected
on the web site once a new avr-libc release has been rolled,
as it always shows the docs for the most recent `stable'
release.






/**************************************************************************/
[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:  Fixed
Assigned to:  joerg_wunsch
Originator Email:  address@hidden
Status:  Closed


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.

Follow-up Comments
------------------


-------------------------------------------------------
Date: Thu 07/22/2004 at 11:13       By: joerg_wunsch
A better description has been added to rev 1.15 of
include/stdio.h (and rev. 1.11.2.4 as well).

Note that the updated documentation will only be reflected
on the web site once a new avr-libc release has been rolled,
as it always shows the docs for the most recent `stable'
release.












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]