/********************************************************************* * * Purpose: Converts a double on the host platform to a double on the * destination platform and writes the resulting bytes into * buf. The size of the converted array is returned. * * Programmer: Brad Whitlock * Date: Tue May 9 10:51:14 PDT 2000 * * Input Arguments: * val : The double value to be converted. * dest_format : The destination platform's format. B64, L64. * Input / Output Arguments: * buf : The buffer to hold the resulting bytes. * * Modifications: * ********************************************************************/ int DoubleConvert(double val, unsigned char *buf, int dest_format) { return (*(dconvlist[FUNCINDEX(double_src_format, dest_format)]))(val, buf); }
/********************************************************************* * * Purpose: Converts an integer on the host platform to an integer * on the destination platform and writes the resulting * bytes into buf. The size of the converted array is returned. * * Programmer: Brad Whitlock * Date: Tue May 9 10:51:14 PDT 2000 * * Input Arguments: * val : The integer value to be converted. * dest_format : The destination platform's format. B32, B64, L32, L64. * Input / Output Arguments: * buf : The buffer to hold the resulting bytes. * * Modifications: * ********************************************************************/ int IntConvert(int val, unsigned char *buf, int dest_format) { return (*(iconvlist[FUNCINDEX(int_src_format, dest_format)]))(val, buf); }
/********************************************************************* * * Purpose: Converts a long on the host platform to a long on the * destination platform and writes the resulting bytes into * buf. The size of the converted array is returned. * * Programmer: Brad Whitlock * Date: Tue May 9 10:51:14 PDT 2000 * * Input Arguments: * val : The long value to be converted. * dest_format : The destination platform's format. B32, B64, L32, L64. * Input / Output Arguments: * buf : The buffer to hold the resulting bytes. * * Modifications: * ********************************************************************/ int LongConvert(long val, unsigned char *buf, int dest_format) { return (*(lconvlist[FUNCINDEX(long_src_format, dest_format)]))(val, buf); }
/********************************************************************* * * Purpose: Converts a float on the host platform to a float on the * destination platform and writes the resulting bytes into * buf. The size of the converted array is returned. * * Programmer: Brad Whitlock * Date: Tue May 9 10:51:14 PDT 2000 * * Input Arguments: * val : The float value to be converted. * dest_format : The destination platform's format. B32, L32. * Input / Output Arguments: * buf : The buffer to hold the resulting bytes. * * Modifications: * ********************************************************************/ int FloatConvert(float val, unsigned char *buf, int dest_format) { return (*(fconvlist[FUNCINDEX(float_src_format, dest_format)]))(val, buf); }