next up previous 252
Next: cnfImprt - Import a FORTRAN string into a C string
Up: CNF C Routine Descriptions
Previous: cnfImpla - Import a FORTRAN LOGICAL array into a C int array


cnfImpn - Import no more than max characters from a FORTRAN string into a C string

Description:
Import a FORTRAN string into a C string, up to a maximum of `max' characters discarding trailing blanks. The null character is appended to the C string after the last non-blank character.

Invocation:
cnfImpn( source_f, source_len, max, dest_c )

Arguments:

const char *source_f (Given)
A pointer to the input FORTRAN string
int source_len (Given)
The length of the input FORTRAN string
int max (Given)
The maximum number of characters to be copied from the input FORTRAN string to the output C string
char *dest_c (Returned via pointer)
A pointer to the output C string

Notes:
No check is made that there is sufficient space allocated to the C string to hold the FORTRAN string and a terminating null. It is the responsibility of the programmer to check this.


next up previous 252
Next: cnfImprt - Import a FORTRAN string into a C string
Up: CNF C Routine Descriptions
Previous: cnfImpla - Import a FORTRAN LOGICAL array into a C int 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