GENPTR_CHARACTER_ARRAY

Generate a pointer to a CHARACTER array argument

Description:

Ensure that there exists a pointer to the character array that has been passed as an actual argument to the C routine. Also generate a variable that contains the length of the actual character argument and call it ‘arg_length’.

Invocation

GENPTR_CHARACTER_ARRAY(arg)

Arguments

arg
The dummy argument.

Examples:

GENPTR_CHARACTER_ARRAY(x)
will expand as follows:
All Unix:
VAX/VMS: char x = x_arg- >dsc$a_pointer;
int x_length = x_arg- >dsc$w_length;

Notes:

On Unix systems, this macro is null, but on a VAX/VMS system, this macro actually declares the variables that are the pointer to the character string and the integer that contains its length.