On Mon, 21 Mar 2011, NightStrike wrote:

On Sun, Mar 20, 2011 at 9:03 PM, Jim Michaels <[email protected]> wrote:
I don't know who to go to to make this change request to the c library
standard (ANSI C Library?).
it would not break any existing code, but it would make the function EVER
more useful!

Microsoft maintains the library.  We just consume it.  You'd have to
bring this up with MS.

And there is a C standard, and according to it, those macros are plain wrong. toupper() has to depend on the locale: see e.g.
http://pubs.opengroup.org/onlinepubs/009695399/functions/tolower.html



in ctype.h, these macros should be redefined.
http://msdn.microsoft.com/en-us/library/45119yx3%28VS.80%29.aspx
http://msdn.microsoft.com/en-us/library/8h19t214%28VS.71%29.aspx

#define toupper(ch) ((ch>='a'&&ch<='z')?ch-('a'-'A'):ch)
#define tolower(ch) ((ch>='A'&&ch<='Z')?ch+('a'-'A'):ch)

simple?

the old definition simply subtracts and thus requires an if statement to
properly work - so why did they bother to code this this way in the first
place if they didn't want to plan on it being useful:
if I am correct, the microsoft compiler does the same thing, and it was in
the msdn documentation - until someone took it out.

this is for the ascii definition version.  and I'm sure you can simply use a
regular function for the rest (and I thought about inline as a possibility
for the more complex stuff that needs real if statements).

I am having to code my own versions of these.

-------------
Jim Michaels
[email protected]
[email protected]
http://JimsComputerRepairandWebDesign.com
http://JesusnJim.com (my personal site, has software)
http://DoLifeComputers.JesusnJim.com (group which I lead)
---
Computer memory/disk size measurements:
[KB KiB] [MB MiB] [GB GiB] [TB TiB]
[10^3B=1,000B=1KB][2^10B=1,024B=1KiB]
[10^6B=1,000,000B=1MB][2^20B=1,048,576B=1MiB]
[10^9B=1,000,000,000B=1GB][2^30B=1,073,741,824B=1GiB]
[10^12B=1,000,000,000,000B=1TB][2^40B=1,099,511,627,776B=1TiB]
Note: disk size is measured in MB, GB, or TB, not in MiB, GiB, or TiB.
computer memory (RAM) is measured in MiB and GiB.




------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public



------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


--
Brian D. Ripley,                  [email protected]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to