Previous: Porting C Up: Porting C Next: Include Files
When porting a C application, all of the RTL routine calls will need to be
changed, due to the addition of the C-language interface. A portable
application must use the C-language interface. Although using the
old Fortran interface will work under VMS, it works only under VMS.
A C application using the Fortran interface simply will not work on any other
The new RTL calling sequence is described in detail in
Section , RTL Calling Conventions. As a reminder, the
highlights are listed again below.
- Name change. The routine names for the C-language interface start with
a `` z'' instead of an `` x''. So, xvopen becomes
- Terminator. All RTL routines with keyword-value pairs of optional
arguments must have a terminator in the argument list, even if none of the
optional arguments are used.
- Pass by value. All input values to the RTL are passed by value in the
standard C way, rather than being passed by reference. Any output variables
or arrays are, of course, still passed by reference. Practically, this means
taking out a bunch of ``&'''s before the arguments.
- Status return. The status code is now the function return, rather than
being an argument. If automatic error checking is on (via zveaction
or one of the ``*_ACT'' keywords), then the status return can be ignored.
- Optional arguments. Pure optional arguments are not allowed. Most
routines require all arguments to be specified, but a few have had some
removed. See Table for a list of all the former optional