libidn: pr29.h File Reference

libidn 1.44

Macros | Enumerations | Functions
pr29.h File Reference
`#include <stdlib.h>`
`#include <idn-int.h>`

Go to the source code of this file.

## Macros
#define | IDNAPI

## Enumerations
enum | Pr29_rc { PR29_SUCCESS = 0 , PR29_PROBLEM = 1 , PR29_STRINGPREP_ERROR = 2 }

## Functions
IDNAPI const char * | pr29_strerror (Pr29_rc rc)
IDNAPI int | pr29_4 (const uint32_t *in, size_t len)
IDNAPI int | pr29_4z (const uint32_t *in)
IDNAPI int | pr29_8z (const char *in)

## Macro Definition Documentation

## ◆ IDNAPI

#define IDNAPI

SECTION:pr29

Parameters

  title | pr29.h
  short_description | PR29-related functions

PR29-related functions.

Definition at line 49 of file pr29.h.

## Enumeration Type Documentation

## ◆ Pr29_rc

enum Pr29_rc

Enumerator
PR29_SUCCESS |
PR29_PROBLEM |
PR29_STRINGPREP_ERROR |

Definition at line 65 of file pr29.h.

## Function Documentation

## ◆ pr29_4()

IDNAPI int pr29_4 | ( | const uint32_t * | in,
|  | size_t | len )
| extern

pr29_4:

Parameters

  in | input array with unicode code points.
  len | length of input array with unicode code points.

Check the input to see if it may be normalized into different strings by different NFKC implementations, due to an anomaly in the NFKC specifications.

Return value: Returns the Pr29_rc value PR29_SUCCESS on success, and PR29_PROBLEM if the input sequence is a "problem sequence" (i.e., may be normalized into different strings by different implementations).

Definition at line 1247 of file pr29.c.

## ◆ pr29_4z()

IDNAPI int pr29_4z | ( | const uint32_t * | in | ) |
| extern

pr29_4z:

Parameters

  in | zero terminated array of Unicode code points.

Check the input to see if it may be normalized into different strings by different NFKC implementations, due to an anomaly in the NFKC specifications.

Return value: Returns the Pr29_rc value PR29_SUCCESS on success, and PR29_PROBLEM if the input sequence is a "problem sequence" (i.e., may be normalized into different strings by different implementations).

Definition at line 1288 of file pr29.c.

## ◆ pr29_8z()

IDNAPI int pr29_8z | ( | const char * | in | ) |
| extern

pr29_8z:

Parameters

  in | zero terminated input UTF-8 string.

Check the input to see if it may be normalized into different strings by different NFKC implementations, due to an anomaly in the NFKC specifications.

Return value: Returns the Pr29_rc value PR29_SUCCESS on success, and PR29_PROBLEM if the input sequence is a "problem sequence" (i.e., may be normalized into different strings by different implementations), or PR29_STRINGPREP_ERROR if there was a problem converting the string from UTF-8 to UCS-4.

Definition at line 1313 of file pr29.c.

## ◆ pr29_strerror()

IDNAPI const char * pr29_strerror | ( | Pr29_rc | rc | ) |
| extern

pr29_strerror:

Parameters

  rc | an Pr29_rc return code.

Convert a return code integer to a text string. This string can be used to output a diagnostic message to the user.

PR29_SUCCESS: Successful operation. This value is guaranteed to always be zero, the remaining ones are only guaranteed to hold non-zero values, for logical comparison purposes. PR29_PROBLEM: A problem sequence was encountered. PR29_STRINGPREP_ERROR: The character set conversion failed (only for pr29_8z()).

Return value: Returns a pointer to a statically allocated string containing a description of the error with the return code @rc.

Definition at line 57 of file strerror-pr29.c.