ucnvint

Convert from external to meta character set.

long ucnvint(uctrl,src,dst,max)

struct uctrl *uctrl;

unsigned char *src;

unsigned char *dst;

int max;

Parameters

  • uctrl—Uniface I/O control block.
  • src—pointer to the source buffer to convert.
  • dst—pointer to the destination buffer.
  • max—maximum number of bytes to write to the destination.

Return Values

The number of bytes written to the destination or when the destination was not large enough, the return value will be negative. The value still indicates the number of bytes written to the destination.

Description

Convert from external to meta character set. The destination buffer will be null-terminated.

When the destination byte limit (maximum) equals zero, the destination is assumed large enough to always contain all converted source data.

Partial conversion will always result in valid output, the end of the destination will always contain a complete meta character and not only an attribute byte.

For more information, see Double-Byte Character Strings.