RetroBSD

2.11BSD operating system for microcontrollers
It is currently Wed Jul 17, 2019 2:18 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sat Aug 27, 2011 2:23 pm 
Committer

Joined: Thu Nov 08, 2012 3:55 am
Posts: 177
Below is current definition of the macros in the source...

#define toupper(c) ((c)-'a'+'A')
#define tolower(c) ((c)-'A'+'a')

Interestingly, the remainder of the code uses them correctly (by testing before calling one of the macros), so I assume the definition of the macros was changed at some point. All modern code will assume the functions only change the value if it is appropriate. So, should this be considered a bug or a "works as designed" feature?

Unless some bit of code is doing something really weird it should be safe to change the behavior to the modern definition as the older code will still function correctly under the modern definition.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission