bugAVR C Runtime Library - Bugs: bug #9704, suggested putc() behavior breaks...

 
 

bug #9704: suggested putc() behavior breaks binary transfer

Submitted by:  None
Submitted on:  Tue 20 Jul 2004 04:06:38 PM UTC  
 
Category: DocumentationSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPercent Complete: 0%
Assigned to: Joerg Wunsch <joerg_wunsch>Originator Email: -unavailable-
Open/Closed: ClosedRelease: None
Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 22 Jul 2004 11:13:37 AM UTC, comment #1:

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.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Tue 20 Jul 2004 04:06:38 PM UTC, 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.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 22 Jul 2004 11:13:37 AM UTCjoerg_wunschStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Tue 20 Jul 2004 09:44:35 PM UTCjoerg_wunschAssigned toNone=>joerg_wunsch

Back to the top


Powered by Savane 3.1-cleanup1