Open C Environment conforms to the ANSI C standard. At present, a large number of existing C compilers have not implemented all the new features in ANSI C. New features of C, (function prototypes, structure assignment and new reserved words) may be used only if backwards compatibility is maintained. This can often be accomplished through conditional compilation.
Pre-processor identifier ANSIC is reserved for this purpose. Only environments that conform to the standard should have it defined. The following example demonstrates the proper usage of the new features.
#ifdef ANSIC typedef void * Ptr; #else typedef unsigned char * Ptr; #endif #ifdef ANSIC SuccFail N_sapCreate(Int sapSel); #else SuccFail N_sapCreate(); #endif
Structure assignment and use of structures as function arguments is also discouraged unless compatibility with older compilers is maintained.