EDCS language bindings — Part 4: C
This clause defines the conformance criteria and overall characteristics of the binding defined in this part of ISO/IEC 18041.
See Table 3.1 for the table of contents for this clause.
This binding incorporates the rules of conformance defined in the EDCS Standard (ISO/IEC 18025) for implementations of the EDCS application programming interface (API), with those additional requirements specifically defined for C bindings of the EDCS API.
The following criteria determine conformance of an implementation to this binding:
In order to conform, an implementation of the C binding of the EDCS API shall make visible all of the declarations in the C binding specified in this part of ISO/IEC 18041. Thus, for example, the syntax of the function name shall be precisely as specified in the binding and parameters shall be of the data types stated in the binding.
An implementation may substitute macros for functions. However, the macros shall be designed so that side-effects work properly.
The C standard (ISO/IEC 9899) requires that compilers recognize internal identifiers which are distinct in at least 31 characters. ISO/IEC 9899 also requires that external identifiers (i.e., those seen by the linker) be recognized to a minimum of 6 characters, independent of case.
The function names of the EDCS API are all mapped to C
functions whose names begin with the letter sequence
Implementations which run in environments where two distinct
C internal identifiers would be equivalent if they were both external
identifiers shall include a set of
#defines in the header file which equate
the long names to a set of short names.
ISO/IEC 18025 reserves certain value ranges for registration as graphical items. The registered graphical items will be bound to the C programming language (and other programming languages). The registered item binding shall be consistent with the binding presented in this part of ISO/IEC 18041.
ISO/IEC 18025 defines several selection item data types. New values for those data types may be specified through registration. These new values are referenced via identifiers specified as part of the registration process. The identifiers for these new values shall follow the format specified for values of the respective selection item data type.
Adding a new value to the EDCS_Attribute_Code data type may require adding an entirely new selection item data type. This will happen if the new attribute is of EDCS type enumerated. In this case, the new data type will have an identifier whose name is EDCS_xxx, where xxx is the name of the new attribute. The values for the data type will have identifiers of the form
attributenameabbreviation is the set of characters used for normative value names of this data type. These abbreviations are formed using the abbreviations contained in Table 5.2.
yyy is the label for the particular value code.
The EDCS API function returns a value of type
C provides a mechanism to allow external files to be
included in a compilation. Clause 5 of this part of ISO/IEC 18041 describes the data types
that shall be defined in the file
edcs.h which should be included in any
application program that intends to use the EDCS API via the C binding. Additional
implementation-dependent items may be placed in this file if needed.
edcs.h shall also contain a prototype for the EDCS API function.