platform specific API or C standard API

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • George2

    #1

    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

  • Ian Collins

    #2
    Re: platform specific API or C standard API

    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.

    Comment

    • Flash Gordon

      #3
      Re: platform specific API or C standard API

      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


      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

      Comment

      • John Bode

        #4
        Re: platform specific API or C standard API

        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.

        Comment

        • dj3vande@csclub.uwaterloo.ca.invalid

          #5
          Re: platform specific API or C standard API

          In article <JK-dnWvwYd8tNqXaRV nzvQA@telenor.c om>,
          Tor Rustad <tor_rustad@hot mail.comwrote:
          >dj3vande@csclu b.uwaterloo.ca. invalid wrote:
          >In article <w5-dnWjcBc13uqXaRV nzvQA@telenor.c om>,
          >Tor Rustad <tor_rustad@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

          Comment

          • Tor Rustad

            #6
            Re: platform specific API or C standard API

            dj3vande@csclub .uwaterloo.ca.i nvalid wrote:
            In article <w5-dnWjcBc13uqXaRV nzvQA@telenor.c om>,
            Tor Rustad <tor_rustad@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 <bwzcab@wvtqvm. vw | tr i-za-h a-z>

            Comment

            • Kenny McCormack

              #7
              Re: platform specific API or C standard API

              In article <fha647$b8s$1@r umours.uwaterlo o.ca>,
              <dj3vande@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 ...".

              Comment

              • Tor Rustad

                #8
                Re: platform specific API or C standard API

                dj3vande@csclub .uwaterloo.ca.i nvalid wrote:
                In article <JK-dnWvwYd8tNqXaRV nzvQA@telenor.c om>,
                Tor Rustad <tor_rustad@hot mail.comwrote:
                >dj3vande@csclub .uwaterloo.ca.i nvalid wrote:
                >>In article <w5-dnWjcBc13uqXaRV nzvQA@telenor.c om>,
                >>Tor Rustad <tor_rustad@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 <bwzcab@wvtqvm. vw | tr i-za-h a-z>

                Comment

                • jaysome

                  #9
                  Re: platform specific API or C standard API

                  On Mon, 12 Nov 2007 20:38:07 +0100, Tor Rustad
                  <tor_rustad@hot mail.comwrote:
                  >dj3vande@csclu b.uwaterloo.ca. invalid wrote:
                  >In article <w5-dnWjcBc13uqXaRV nzvQA@telenor.c om>,
                  >Tor Rustad <tor_rustad@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

                  Comment

                  • Tor Rustad

                    #10
                    Re: platform specific API or C standard API

                    jaysome wrote:
                    On Mon, 12 Nov 2007 20:38:07 +0100, Tor Rustad
                    <tor_rustad@hot mail.comwrote:
                    >
                    >dj3vande@csclub .uwaterloo.ca.i nvalid wrote:
                    >>In article <w5-dnWjcBc13uqXaRV nzvQA@telenor.c om>,
                    >>Tor Rustad <tor_rustad@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 <bwzcab@wvtqvm. vw | tr i-za-h a-z>

                    Comment

                    • CBFalconer

                      #11
                      Re: platform specific API or C standard API

                      Flash Gordon wrote:
                      Ian Collins wrote, On 12/11/07 08:04:
                      >George2 wrote:
                      >>
                      >>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!
                      >
                      .... snip ...
                      >
                      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.
                      Or just go and get the latest versions at the following:

                      <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf>
                      <http://cbfalconer.home .att.net/download/n869_txt.bz2>

                      N1256 is the latest draft, and up to date. N869 is the last draft
                      before release of C99, but is a text version and much easier to
                      use. It is compressed with bzip2.

                      --
                      Chuck F (cbfalconer at maineline dot net)
                      <http://cbfalconer.home .att.net>
                      Try the download section.



                      --
                      Posted via a free Usenet account from http://www.teranews.com

                      Comment

                      Working...