netatalk: utf8util.h File Reference

netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
utf8util.h File Reference

Interface for low-level UTF-8 utility functions. More...

`#include <limits.h>`

Go to the source code of this file.

## Data Structures
struct | utf8Iterator

## Macros
#define | BSTR_PUBLIC
#define | isLegalUnicodeCodePoint(v)
#define | utf8IteratorNoMore(it)

## Functions
BSTR_PUBLIC void | utf8IteratorInit (struct utf8Iterator *iter, unsigned char *data, int slen)
BSTR_PUBLIC void | utf8IteratorUninit (struct utf8Iterator *iter)
BSTR_PUBLIC cpUcs4 | utf8IteratorGetNextCodePoint (struct utf8Iterator *iter, cpUcs4 errCh)
BSTR_PUBLIC cpUcs4 | utf8IteratorGetCurrCodePoint (struct utf8Iterator *iter, cpUcs4 errCh)
BSTR_PUBLIC int | utf8ScanBackwardsForCodePoint (const unsigned char *msg, int len, int pos, cpUcs4 *out)

## Detailed Description

Interface for low-level UTF-8 utility functions.

This module is standalone and does not depend on bstrlib.

## Macro Definition Documentation

## ◆ BSTR_PUBLIC

#define BSTR_PUBLIC

## ◆ isLegalUnicodeCodePoint

#define isLegalUnicodeCodePoint | ( |  | v | ) |

Value:
((((v) < 0xD800L) || ((v) > 0xDFFFL)) && \
(((unsigned long)(v)) <= 0x0010FFFFL) && \
(((v)|0x1F0001) != 0x1FFFFFL))

## ◆ utf8IteratorNoMore

#define utf8IteratorNoMore | ( |  | it | ) |

Value:
(!(it) || (it)->next >= (it)->slen)

## Function Documentation

## ◆ utf8IteratorGetCurrCodePoint()

BSTR_PUBLIC cpUcs4 utf8IteratorGetCurrCodePoint | ( | struct utf8Iterator * | iter,
|  | cpUcs4 | errCh )

## ◆ utf8IteratorGetNextCodePoint()

BSTR_PUBLIC cpUcs4 utf8IteratorGetNextCodePoint | ( | struct utf8Iterator * | iter,
|  | cpUcs4 | errCh )

## ◆ utf8IteratorInit()

BSTR_PUBLIC void utf8IteratorInit | ( | struct utf8Iterator * | iter,
|  | unsigned char * | data,
|  | int | slen )

## ◆ utf8IteratorUninit()

BSTR_PUBLIC void utf8IteratorUninit | ( | struct utf8Iterator * | iter | ) |

## ◆ utf8ScanBackwardsForCodePoint()

BSTR_PUBLIC int utf8ScanBackwardsForCodePoint | ( | const unsigned char * | msg,
|  | int | len,
|  | int | pos,
|  | cpUcs4 * | out )