Since the original XDR string function uses malloc/free (see section 5.7.7 on this problem) we provide a function with the same functionality which uses the GRAPE memory management functions instead:
Again a pointer to the string (char array) is needed as second parameter.bool_t g_xdr_string(XDR *xdrp, char **str)
You should always use this function which also supports NULL strings to write strings, for an example see the Scene "xdr" method below.
Using strings might lead to machine-dependent data, see section 5.7.7 for a discussion of this problem.
Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.