473,586 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

platform specific API or C standard API

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?
thanks in advance,
George

Nov 12 '07 #1
10 1614
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?
Look it up in the standard!

--
Ian Collins.
Nov 12 '07 #2
Ian Collins wrote, On 12/11/07 08:04:
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?
Look it up in the standard!
You can find links to drafts of the standard at
http://clc-wiki.net/wiki/c_standard

Also a good text book such as K&R2 (see the bibliography of the FAQ at
http://c-faq.com/ )

If you have tried but cannot find the answer then you can ask here and
people will tell you whether a function is a standard C function or not.
--
Flash Gordon
Nov 12 '07 #3
On Nov 12, 2:01 am, George2 <george4acade.. .@yahoo.comwrot e:
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?

thanks in advance,
George
Any good, authoritative C reference (such as Kernighan & Ritchie's
"The C Programming Language" or Harbison & Steele's "C: A Reference
Manual" or P.J. Plauger's "The C Standard Library") will contain a
listing of all the C standard library functions; so, if you come
across a library call that isn't described in any of those references,
it's platform-specific.

Nov 12 '07 #4
In article <JK************ *********@telen or.com>,
Tor Rustad <to********@hot mail.comwrote:
>dj******@csclu b.uwaterloo.ca. invalid wrote:
>In article <w5************ *********@telen or.com>,
Tor Rustad <to********@hot mail.comwrote:

[...]
>>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.

Then please name a lower-case Microsoft specific API, which doesn't have
underscore prefix. Since 'tolower' hasn't, this shows OP by a glance,
that it's a C standard function.
Uhh... what? You claimed that Microsoft prefixes lower-case symbols
with a '_', and presented tolower as an example. Which is incorrect.

Perhaps your comment would have been clearer if you had used an example
of a lower-case symbol that does fit the pattern you're describing.
dave

Nov 12 '07 #5
dj******@csclub .uwaterloo.ca.i nvalid wrote:
In article <w5************ *********@telen or.com>,
Tor Rustad <to********@hot mail.comwrote:
[...]
>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.
Then please name a lower-case Microsoft specific API, which doesn't have
underscore prefix. Since 'tolower' hasn't, this shows OP by a glance,
that it's a C standard function.

FYI, the default VC++ 6.0 mode, isn't the C conforming mode:

cl /?
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

C/C++ COMPILER OPTIONS
....

/Za disable extensions (implies /Op)

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;
}
So? tolower() isn't a M$ specific function.

--
Tor <bw****@wvtqvm. vw | tr i-za-h a-z>
Nov 12 '07 #6
In article <fh**********@r umours.uwaterlo o.ca>,
<dj******@csclu b.uwaterloo.ca. invalidwrote:
....
>>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:
I think you misunderstand. In the patois of this NG, the phrase:
"to get compiler in conforming mode" means "cripple your compiler so
that only stricting conforming programs can be compiled". It doesn't
mean anything remotely resembling "enhance your compiler's performance
so that ...".

Nov 12 '07 #7
dj******@csclub .uwaterloo.ca.i nvalid wrote:
In article <JK************ *********@telen or.com>,
Tor Rustad <to********@hot mail.comwrote:
>dj******@csclub .uwaterloo.ca.i nvalid wrote:
>>In article <w5************ *********@telen or.com>,
Tor Rustad <to********@hot mail.comwrote:
[...]
>>>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.
Then please name a lower-case Microsoft specific API, which doesn't have
underscore prefix. Since 'tolower' hasn't, this shows OP by a glance,
that it's a C standard function.

Uhh... what? You claimed that Microsoft prefixes lower-case symbols
with a '_',
No, I said *their* lower-case API's. So context here was M$ specific API's.
and presented tolower as an example. Which is incorrect.
Well, it was OP's example. I just tried to tell OP about the M$ naming
conventions relevant for his case.
Perhaps your comment would have been clearer if you had used an example
of a lower-case symbol that does fit the pattern you're describing.
Perhaps, if some non-native speaker of English is unclear, it's better
to ask for a clarification, before jumping to some silly conclusion.

--
Tor <bw****@wvtqvm. vw | tr i-za-h a-z>
Nov 12 '07 #8
On Mon, 12 Nov 2007 20:38:07 +0100, Tor Rustad
<to********@hot mail.comwrote:
>dj******@csclu b.uwaterloo.ca. invalid wrote:
>In article <w5************ *********@telen or.com>,
Tor Rustad <to********@hot mail.comwrote:

[...]
>>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.

Then please name a lower-case Microsoft specific API, which doesn't have
underscore prefix.
strlwr, strnset, strrev, etc., in <string.h>?

--
jay
Nov 13 '07 #9
jaysome wrote:
On Mon, 12 Nov 2007 20:38:07 +0100, Tor Rustad
<to********@hot mail.comwrote:
>dj******@csclub .uwaterloo.ca.i nvalid wrote:
>>In article <w5************ *********@telen or.com>,
Tor Rustad <to********@hot mail.comwrote:
[...]
>>>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.
Then please name a lower-case Microsoft specific API, which doesn't have
underscore prefix.

strlwr, strnset, strrev, etc., in <string.h>?
Don't think so, those functions should not available when __STDC__ is
defined.

--
Tor <bw****@wvtqvm. vw | tr i-za-h a-z>
Nov 13 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
8023
by: Tom Rodman | last post by:
I want to embed a bash script inside the c program. How could you do the below bash snippet in "c"?: cat > /tmp/foo <<\__EOD_ all kinds of nasty stuff in here including single and double quotes and bashslashes .. (note that the here doc delimiter is preceded by a "\" __EOD_
14
1963
by: Champika Nirosh | last post by:
Hi All, We have a windows from application written in C#, there we have used Browser COM and other basic libraries present in standard .NET/C# SDK. So the next part is to make this appliaction available to Unix and Mac platform. I have couple of questions here 1. What are the possibilities we have of doing some thing like this? 2. What...
34
2373
by: Sachin Garg | last post by:
I know that language choices are more of a religious choice, rather than a logical decision for many of us. Anyway, here is my concern (which will hopefully not be considered a troll) :-) I have been told that C++ compilers are not available for all platforms and for many platforms they only support a basic subset of C++ features (like just...
16
3906
by: Andy | last post by:
Hi, I have read that 'C' is platform-independent and portable. I can'tsee much a difference between the two terms. Could anyone differentiate the two? Also is the statement actually true? Thanks Andy
3
8786
by: Lighter | last post by:
Why does Platform SDK define union LARGE_INTEGER in such a way? ntdef.h defines the union LARGE_INTEGER as follows: typedef union _LARGE_INTEGER { struct { ULONG LowPart;
1
2058
by: Nikita the Spider | last post by:
Hi all, I'm a newbie when it comes to distributing C-based Python modules. I'm just now sharing my first with the rest of the world (it's actually V. Marangozov's shared memory module for IPC) and I've learned that the module needs a different set of compile flags for Linux than for my Mac. My question is this: is there a convention or...
11
1747
by: Carnage | last post by:
I want to provide a common platform agnostic function declaration which references different implementations for different hardware platforms. What is the most type safe way to do this in 'C'?
12
5441
by: Udhay | last post by:
I am new to vc++. Whether Visual Studio is a platform independent? Is there any chance of using my application created by vc in MAC or Linux. udhay
6
2141
by: greek_bill | last post by:
Hi, I'm interested in developing an application that needs to run on more than one operating system. Naturally, a lot of the code will be shared between the various OSs, with OS specific functionality being kept separate. I've been going over the various approaches I could follow in order to implement the OS-specific functionality. The...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8202
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8216
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3837
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3865
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.