Fix encoding issue with macro generation

Fixes #2.

The problem here was that init_member_functions assumed ASCII or SJIS
encoding of function/struct names in the ain file. Now it will convert
to UTF-8 when analyzing member functions.

This commit also removes the --ain-encoding option to ainedit.
--output-encoding should always match the encoding of the input ain
file. --transcode can be used to change the encoding before running
running further ainedit commands.
This commit is contained in:
Nunuhara Cabbage
2020-07-11 11:10:18 -07:00
parent 0113e34eaa
commit f9eaef7717
11 changed files with 64 additions and 63 deletions
+1
View File
@@ -329,6 +329,7 @@ struct ain *ain_open(const char *path, int *error);
struct ain *ain_new(int version);
void ain_decrypt(uint8_t *buf, size_t len);
void ain_init_member_functions(struct ain *ain, char *(*to_ascii)(const char*));
struct ain_function *ain_get_function(struct ain *ain, char *name);
int ain_get_function_no(struct ain *ain, char *name);
int ain_get_function_index(struct ain *ain, struct ain_function *f);