diff options
author | Aaron Ball <nullspoon@oper.io> | 2019-08-26 11:09:59 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@oper.io> | 2019-08-26 11:09:59 -0600 |
commit | 29f749029fc03b9084b5fee4d45b6ecc0e791eb4 (patch) | |
tree | 8048789060db2ffbbd1d89b4ca65332828186969 | |
parent | fb359e3130fefdb987f2c204eb28c873f09cc354 (diff) | |
download | upwgen-29f749029fc03b9084b5fee4d45b6ecc0e791eb4.tar.gz upwgen-29f749029fc03b9084b5fee4d45b6ecc0e791eb4.tar.xz |
Update debug counts
Add total count to output. Update "Count" string to say "Set count"
since it no longer represents the size of the whole set pool array.
-rw-r--r-- | src/i18n_cat.c | 2 | ||||
-rw-r--r-- | src/i18n_set.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/i18n_cat.c b/src/i18n_cat.c index f8d9f05..7a5f18e 100644 --- a/src/i18n_cat.c +++ b/src/i18n_cat.c @@ -280,5 +280,5 @@ void i18n_dump_arr(unsigned int* arr) { printf("0x%04x %-7d [%lc]\n", arr[i], arr[i], arr[i]); i++; } - printf("\nCount: %d\n\n", i); + printf("\nSet count: %d\n\n", i); } diff --git a/src/i18n_set.c b/src/i18n_set.c index b864658..0f6b819 100644 --- a/src/i18n_set.c +++ b/src/i18n_set.c @@ -76,10 +76,13 @@ struct i18n_set* i18n_set_rm_type(struct i18n_set* set, int type) { void i18n_set_dump(struct i18n_set* set) { struct i18n_set* cursor = set; + unsigned int total = 0; while(cursor) { + total += cursor->count; i18n_dump_arr(cursor->chars); cursor = cursor->next; } + printf("Total: %u\n\n", total); } |