patchAVR C Runtime Library - Patches: patch #2876, Extend pgmspace.h with...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #2876: Extend pgmspace.h with pgm_read_long()

Submitter:  None
Submitted:  Tue 30 Mar 2004 02:22:02 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  troth Originator Email:  -email is unavailable-
Open/Closed:  Closed

Fri 16 Apr 2004 06:26:04 PM UTC, comment #5: 

This has been committed to both HEAD and 1.0 branches.

Theodore A. Roth <troth>
Thu 08 Apr 2004 06:04:22 PM UTC, comment #4: 

I'm all right with that! Great idea! Wish I'd thought of it... :-)

Eric Weddington <arcanum>
Group administrator
Thu 08 Apr 2004 05:26:11 PM UTC, comment #3: 

I've updated the patch changing long to dword.

In the end, I think it would just be better to drop the word notation and just use these:

pgm_read_uint8()
pgm_read_uint16()
pgm_read_uint32()

There's absolutely no ambiguity with those names. Alas, this can't be done in the 1.0 branch since it would break compatibility. Although, we could have the old names as aliases for the proposed _uint names and mark the old as deprecated. That's a separate patch from this one though.

Theodore A. Roth <troth>
Wed 07 Apr 2004 05:11:04 PM UTC, comment #2: 

Should the naming of the macros be consistent? Right now, we have:
pgm_read_byte()
pgm_read_word()

Wouldn't the next logical name be: pgm_read_dword()?

Not pgm_read_long()? Since the meaning of "long" in C can change (or will change) with the use of -mint8.

Eric Weddington <arcanum>
Group administrator
Wed 07 Apr 2004 04:37:02 PM UTC, comment #1: 

There's a few copy/paste errors in the originally submitted patch.

Also, the original patch didn't include any context information. For future reference, please try to submit patches generated using diff's "-u" option. This makes the patch easier to read (most of the time) and allows the patch program to apply the patch to a file that may have been modified since the diff was generated.

I've attached an updated patch which fixes the copy/paste errors I noticed.

I don't have any objections to applying this patch to HEAD or 1.0 since it is a simple extension of the API.

I'll try to get it into 1.0.4, but I need to do a better review of the inline asm first. So far, from a quick review it looks ok to me.

Theodore A. Roth <troth>
Tue 30 Mar 2004 02:22:02 PM UTC, original submission:  

The header file pgmspace.h

/* $Id: pgmspace.h,v 1.16.2.2 2003/09/18 18:41:17 troth Exp $ */

does not support pgm_read_long(). I suggest to extend this
file by applying the attached patch.

Anonymous

 

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

Attached Files
file #7260:  avr-libc-patch-2876-2.diff added by troth (7KiB - text/plain - Change long to dword for consistency. Patch is against current cvs head.)
file #7249:  avr-libc-patch-2876.diff added by troth (7KiB - text/plain - Updated version of original patch. Fixes copy/paste errors and includes context.)
file #7224:  pgmspace.h.patch added by None (5KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 6 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-04-16 troth StatusNone Done
    Open/ClosedOpen Closed
2004-04-08 troth Attached File- Added avr-libc-patch-2876-2.diff, #3083
2004-04-07 troth Attached File- Added avr-libc-patch-2876.diff, #3071
2004-04-07 troth Assigned toNone troth
2004-03-30 None Attached File- Added pgmspace.h.patch, #3027

Back to the top

Powered by Savane 3.13-caa5.
Corresponding source code