FTAM/9000 Programmer's Guide
198 Chapter 4
Using Support Functions
Translating Error Messages
ft_gperror()
#include %</opt/ftam/include/map.h>
Return_code
ft_gperror (input_result, return_string, vendor_string, result)
Api_rc *input_result;
Octet **return_string;
Octet **vendor_string;
Api_rc *result;
The ft_gperror() function translates the input_result structure from
FTAM functions to character strings, as follows:
• The input_result->return_code is translated to a character string
called return_string.
• The input_result->vendor_code is translated to a character string
called vendor_string.
• If the address that the return_string points to is NULL, the interface
automatically allocates the required memory. After ft_gperror()
returns, you must use ft_fdmemory() to free the memory.
NOTE Do not use free() to deallocate memory allocated by FTAM.
• If the address that the return_string points to is not NULL, you must
allocate the memory. The specified data area must be large enough to
hold a 256-byte string (including the NULL-terminator).