> On Monday, March 29, 1999 11:24 AM, Jim Edwards wrote: > John, > > Here is an example c routine and the translations for cray t3x $1 here > is the name of the variable passed in, apparently there is a > in /usr/include to support the interface. If this > doesn't make sense, Leslie can give you further details. > > #include > define(`STRING_ARG',`$1_fcd') > define(`STRING_ARG_DECL',`_fcd $1_fcd') > define(`STRING_LEN',`_fcdlen($1_fcd)') > define(`STRING_PTR',`_fcdtocp($1_fcd)') > > > void FUNCTION(nnt_error_string) ARGS(`inStatus, > STRING_ARG(errorString), status') > FortranInt *inStatus; > STRING_ARG_DECL(errorString); > FortranInt *status; > { > char *localString; > > localString = malloc ((size_t)(STRING_LEN(errorString) + 1)); > if (localString == NULL) > { > *status = PCL_MALLOC_ERR; > return; > } > > *status = nntErrorString ((int) *inStatus, localString, > STRING_LEN(errorString) + 1); > > ctofstr (STRING_PTR(errorString), STRING_LEN(errorString), > localString); > > free (localString); > return; > } > >