iconv_close()--Code Conversion Deallocation API


  Syntax

 #include <iconv.h>

 int iconv_close (cd)


            iconv_t     cd;


  Service Program: QTQICONV

  Default Public Authority: *USE

  Threadsafe: Conditional; see Usage Notes.

The iconv_close() function closes the conversion descriptor cd that was initialized by the iconv_open() or QtqIconvOpen() function.


Authorities and Locks

None.


Parameters

cd
INPUT

The conversion descriptor returned by a previous successful call to iconv_open() or QtqIconvOpen().


Return Value

If an error occurs, iconv_close() returns a value of -1 and errno is set to indicate the error. If iconv_close() completes successfully, a value of zero is returned.


Error Conditions

The following errors can be returned in errno:

[EBADF]
Descriptor not valid.

The conversion descriptor (cd) parameter is not valid.

[EUNKNOWN]
Undetected error

An undetected error occurred. Contact your service organization. An escape message may also be signaled as a result.

The following escape messages can be signaled:

Message ID Escape Message Text
CPF3C90 E Literal value cannot be changed.
CPF3CF2 E Error(s) occurred during running of &1 API.


Usage Notes

This API is threadsafe if threads that share a conversion descriptor do not attempt to preserve the shift state.


Related Information


API introduced: V3R1
Top | National Language Support APIs | APIs by category