aboutsummaryrefslogtreecommitdiffstats
path: root/libparsepcf_get_glyph_indices.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2024-10-13 11:17:48 +0200
committerMattias Andrée <m@maandree.se>2024-10-13 11:17:48 +0200
commita81c96c0348af8caf6ae45e2d942a676792a2a31 (patch)
tree24cc725efa3eba381c98ebed7cb2cbf7e0e34f0c /libparsepcf_get_glyph_indices.c
parentUpdate e-mail (diff)
downloadlibparsepcf-a81c96c0348af8caf6ae45e2d942a676792a2a31.tar.gz
libparsepcf-a81c96c0348af8caf6ae45e2d942a676792a2a31.tar.bz2
libparsepcf-a81c96c0348af8caf6ae45e2d942a676792a2a31.tar.xz
Documentation and minor improvements
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--libparsepcf_get_glyph_indices.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libparsepcf_get_glyph_indices.c b/libparsepcf_get_glyph_indices.c
index c30e148..bb95d3e 100644
--- a/libparsepcf_get_glyph_indices.c
+++ b/libparsepcf_get_glyph_indices.c
@@ -3,11 +3,12 @@
int
-libparsepcf_get_glyph_indices(const char *file, size_t size,
+libparsepcf_get_glyph_indices(const void *file, size_t size,
const struct libparsepcf_table *table,
const struct libparsepcf_encoding *meta,
- size_t *out, size_t first, size_t count)
+ size_t *indices, size_t first, size_t count)
{
+ const char *text = file;
int msb = table->format & LIBPARSEPCF_BYTE;
size_t pos = table->offset + 14 + first * 2;
size_t i;
@@ -16,7 +17,7 @@ libparsepcf_get_glyph_indices(const char *file, size_t size,
(void) meta;
for (i = 0; i < count; i++, pos += 2)
- out[i] = (size_t)PARSE_UINT16(&file[pos], msb);
+ indices[i] = (size_t)PARSE_UINT16(&text[pos], msb);
return 0;
}