33 "\xF8\x88\x80\x80\x80\n"
46 for (
i = 0;
i < l;
i++)
48 printf(
"%*s", indent-l*2,
"");
51static void decode(
const uint8_t *p,
const uint8_t *endp)
57 const uint8_t *p0 = p;
62 if (
code != UINT32_MAX) {
65 if (*p0 ==
'\n')
printf(
"\\n\n");
66 else printf (
"%.*s\n", l, p0);
68 printf(
"invalid code range\n");
71 printf(
"invalid sequence\n");
76int main(
int argc,
char **argv)
84 decode(file_buf, file_buf + file_buf_size);
#define i(width, name, range_min, range_max)
__device__ int printf(const char *,...)
int av_utf8_decode(int32_t *codep, const uint8_t **bufp, const uint8_t *buf_end, unsigned int flags)
Read and decode a single UTF-8 code point (character) from the buffer in *buf, and update *buf to poi...
void av_file_unmap(uint8_t *bufptr, size_t size)
Unmap or free the buffer bufptr created by av_file_map().
int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, int log_offset, void *log_ctx)
Read the file with name filename, and put its content in a newly allocated buffer or map it with mmap...
static const uint8_t vectors[]
static void decode(const uint8_t *p, const uint8_t *endp)
static void print_sequence(const char *p, int l, int indent)