SLPUnescape Subroutine

Purpose

Processes an input string and unescapes any characters reserved for SLP.

Syntax

SLPError SLPUnescape(const char* pcInbuf,
                      char** ppcOutBuf,
                      SLPBoolean isTag);

Description

The SLPUnescape subroutine processes the input string in pcInbuf and unescapes any characters reserved for SLP. If the isTag parameter is SLPTrue, SLPUnescape looks for bad tag characters and signals an error if any are found by returning the SLP_PARSE_ERROR code. No transformation is performed if the input string is opaque. The results are put into a buffer allocated by the API library and returned in the ppcOutBuf parameter. This buffer should be deallocated using SLPFree() when the memory is no longer needed.

Parameters

Item Description
pcInbuf Pointer to the input buffer to process for escape characters.
ppcOutBuf Pointer to a pointer for the output buffer with the characters reserved for SLP escaped. Must be freed using SLPFree() when the memory is no longer needed.
isTag When true, the input buffer is checked for bad tag characters.

Return Values

The SLPUnescape subroutine returns SLP_PARSE_ERROR if any characters are bad tag characters and the isTag flag is true; otherwise, it returns SLP_OK, or the appropriate error code if another error occurs.