Commit c154e4c5 authored by deuce's avatar deuce
Browse files

constify pointers.

parent 27543a45
This diff is collapsed.
......@@ -29,20 +29,20 @@ enum ciolib_codepage {
};
struct codepage_def {
char name[32];
enum ciolib_codepage cp;
uint8_t *(*to_utf8)(const char *cp437str, size_t buflen, size_t *outlen, struct codepage_def *cpdef);
char *(*utf8_to)(const uint8_t *utf8str, char unmapped, size_t buflen, size_t *outlen, struct codepage_def *cpdef);
uint8_t (*from_unicode_cpoint)(uint32_t cpoint, char unmapped, struct codepage_def *cpdef);
uint32_t (*from_cpchar)(uint8_t cpoint, struct codepage_def *cpdef);
uint32_t (*from_cpchar_ext)(uint8_t cpoint, struct codepage_def *cpdef);
struct ciolib_cpmap *cp_table;
size_t cp_table_sz;
uint32_t *cp_unicode_table;
uint32_t *cp_ext_unicode_table;
const char name[32];
const enum ciolib_codepage cp;
uint8_t *(*to_utf8)(const char *cp437str, size_t buflen, size_t *outlen, const struct codepage_def *cpdef);
char *(*utf8_to)(const uint8_t *utf8str, char unmapped, size_t buflen, size_t *outlen, const struct codepage_def *cpdef);
uint8_t (*from_unicode_cpoint)(uint32_t cpoint, char unmapped, const struct codepage_def *cpdef);
uint32_t (*from_cpchar)(uint8_t cpoint, const struct codepage_def *cpdef);
uint32_t (*from_cpchar_ext)(uint8_t cpoint, const struct codepage_def *cpdef);
const struct ciolib_cpmap *cp_table;
const size_t cp_table_sz;
const uint32_t *cp_unicode_table;
const uint32_t *cp_ext_unicode_table;
};
struct codepage_def ciolib_cp[CIOLIB_CP_COUNT];
const struct codepage_def ciolib_cp[CIOLIB_CP_COUNT];
uint8_t *cp_to_utf8(enum ciolib_codepage cp, const char *cpstr, size_t buflen, size_t *outlen);
char *utf8_to_cp(enum ciolib_codepage cp, const uint8_t *utf8str, char unmapped, size_t buflen, size_t *outlen);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment