Re: platform specific API or C standard API
- From: dj3vande@xxxxxxxxxxxxxxxxxxxxxxxxxxx
- Date: Mon, 12 Nov 2007 18:30:31 +0000 (UTC)
In article <w5-dnWjcBc13uqXaRVnzvQA@xxxxxxxxxxx>,
Tor Rustad <tor_rustad@xxxxxxxxxxx> wrote:
George2 wrote:
Hello everyone,
Are there any official site to check whether an API (like tolower or
toLower) is platform specific API (e.g. Microsoft platform specific,
Linux specific) or C common standard API?
The official document is the ISO C standard, which is not free.
However, platform specific API's are usually documented locally by the
implementation, just try to check the MSDN doc or man page.
Good platform-specific documentation will say which standards if any
define a particular function.
If you're reading man pages on a unix-ish system, look for a section
titled 'STANDARDS' or 'CONFORMING TO'. The (somewhat out of date)
version of the Microsoft documentation I use at work has a table in the
description of many non-Win32-specific functions that includes a
"compatibility" column that lists any standards that define the
function.
In the case of Microsoft, their lower-case API's, all have an underscore
prefix, so 'tolower' would be named '_tolower' by M$. Turn on the
compiler switch /Za, to get compiler in conforming mode.
Incorrect.
This compiles and runs perfectly fine with the default invocation of
MSVC6:
--------
#include <ctype.h>
#include <stdio.h>
int main(void)
{
printf("tolower('a'): %c\n",tolower('a'));
printf("tolower('A'): %c\n",tolower('A'));
return 0;
}
--------
dave
.
- Follow-Ups:
- Re: platform specific API or C standard API
- From: Kenny McCormack
- Re: platform specific API or C standard API
- From: Tor Rustad
- Re: platform specific API or C standard API
- References:
- platform specific API or C standard API
- From: George2
- Re: platform specific API or C standard API
- From: Tor Rustad
- platform specific API or C standard API
- Prev by Date: Re: Richard heathfields C programming article
- Next by Date: Re: Advanced reading from stdin with standard C
- Previous by thread: Re: platform specific API or C standard API
- Next by thread: Re: platform specific API or C standard API
- Index(es):
Relevant Pages
|