Next: cnfLenc - Find the length of a C string
Up: CNF C Routine Descriptions
Previous: cnfImprta - Import a FORTRAN CHARACTER array into a C string array.
cnfImprtap
- Import a FORTRAN CHARACTER array into a C array of pointers to char.
- Description:
- Import a FORTRAN CHARACTER array into a C array of pointers to char,
discarding trailing blanks.
The pointers must each point to an area of allocated memory at least
`dest_len' characters long.
The null character is appended to the C string after the last non-blank
character copied from the FORTRAN string if there is room.
No more than `dest_len' characters will be copied for each string.
- Invocation:
- cnfImprtap( source_f, source_len, dest_c, dest_len, ndims, dims )
- Arguments:
-
-
const char *source_f (Given)
-
A pointer to the input FORTRAN array
-
int source_len (Given)
-
The declared maximum number of characters in a element of the FORTRAN
array
-
char *const *dest_c
-
A pointer to the output C array
-
int dest_len (Given)
-
The maximum number of characters to be copied for each string
(including terminating null if required).
-
int ndims (Given)
-
The number of dimensions of the arrays
-
const int *dims (Given)
-
A pointer to a 1-D array giving the dimensions of the arrays.
- Notes:
- The array of pointers and the FORTRAN character array must have the
same dimensions.
Next: cnfLenc - Find the length of a C string
Up: CNF C Routine Descriptions
Previous: cnfImprta - Import a FORTRAN CHARACTER array into a C string array.
CNF and F77 Mixed Language Programming -- FORTRAN and C
Starlink User Note 209
P.M. Allan
A.J. Chipperfield
R.F. Warren-Smith
19 January 2000
E-mail:ussc@star.rl.ac.uk