Article View: net.micro.mac
Article #879C Compatibility Problems - SKEL.c
From: Steve Langdon
Date: Thu, 21 Mar 1985 02:35
Date: Thu, 21 Mar 1985 02:35
56 lines
3186 bytes
3186 bytes
The community of Mac programmers using C are faced with an unpleasant
compatibility problem. Megamax C naming conventions do not follow
Apple's recommendations and it is very painful to convert programs
written for the Megamax compiler to run with compilers that do adhere to
Apple's standard. I discovered the problem while attempting to bring
up SKEL.c on Mac C (from Consulair Corp.) and SUMacC.
It is extremely tedious to translate a large number of identifiers even
when you have the UNIX text processing tools available. A Mac user
without UNIX access would have a really bad time performing the conversion.
I, along with many UNIX users dislike reaching for the shift key, but I
consider Megamax's decision to use lower case names a piece of crass
stupidity. An imperfect standard is better than no standard in this
situation, and I hate to think about the hours that will be wasted if
Megamax do not conform.
I have a translated version of SKEL.c which works with Mac C and compiles
cleanly on SUMacC (I should have the SUMacC version running soon). It
should be posted soon but I am attempting to coordinate the distribution
with the author and the original (Megamax) C translator. Mac C and
SUMacC are fairly compatible so a few #ifdefs are sufficient to take care
of the differences between these compliers.
For those unfamiliar with Apple's naming convention I have included the
pertinent section of the SUMacC document.
>Naming conventions.
>
> Since Pascal is case insensitive, some of the names
>present in the original Pascal header files had inconsistent
>case conventions. Apple realized the headaches this could
>cause for C programmers, and in October 84 released a small
>set of rules that govern case in names. When you invent new
>names, you should use these rules.
>
>1. The first character of a name is upper case if the sym-
> bol is: a toolbox routine name, a type, an assembler
> global symbol.
> e.g.: InitGraf, MoveTo, ProcPtr, MonkeyLives
>
>2. The first character of a name is lower case if the sym-
> bol is: a field, a constant, a variable.
> e.g.: shiftKey, everyEvent, fInvisible
>
>3. If the name consists of multiple words, the subwords are
> capitalized.
>
>4. If there are acronyms within the name, they are cased
> the same.
> e.g.: fCTS, ctsHold, TEHandle, TENew, eofErr
>
--
Stephen J. Langdon ...!{ihnp4,hplabs,sun,nsc}!amdahl!sjl
[ The article above is not an official statement from any organization
in the known universe. ]
Technical Details
Message-ID:
<1317@amdahl.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!harpo!decvax!decwrl!sun!amdahl!sjlShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site amdahl.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!harpo!decvax!decwrl!sun!amdahl!sjl From: sjl@amdahl.UUCP (Steve Langdon) Newsgroups: net.micro.mac Subject: C Compatibility Problems - SKEL.c Message-ID: <1317@amdahl.UUCP> Date: Wed, 20-Mar-85 21:35:07 EST Article-I.D.: amdahl.1317 Posted: Wed Mar 20 21:35:07 1985 Date-Received: Fri, 22-Mar-85 02:18:32 EST Distribution: net Organization: Amdahl Corp, Sunnyvale CA Lines: 56