diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-07-02 10:21:35 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-07-02 10:22:31 -0700 |
commit | bc8c54f1eedc550f9cd79abfc69db9934577aac8 (patch) | |
tree | 569373c575d0c08e3706a8ba79932adaefefa091 /taxonomy.c | |
parent | 08f8eb6eb51f2855f98c1b351127691dce837894 (diff) | |
download | subsurface-bc8c54f1eedc550f9cd79abfc69db9934577aac8.tar.gz |
Rename enum values for taxonomy
This avoids confusion and namespace collisions.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'taxonomy.c')
-rw-r--r-- | taxonomy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/taxonomy.c b/taxonomy.c index 2c101962a..2b71648c1 100644 --- a/taxonomy.c +++ b/taxonomy.c @@ -2,7 +2,7 @@ #include "gettext.h" #include <stdlib.h> -char *taxonomy_category_names[NR_CATEGORIES] = { +char *taxonomy_category_names[TC_NR_CATEGORIES] = { QT_TRANSLATE_NOOP("getTextFromC", "None"), QT_TRANSLATE_NOOP("getTextFromC", "Ocean"), QT_TRANSLATE_NOOP("getTextFromC", "Country"), @@ -12,7 +12,7 @@ char *taxonomy_category_names[NR_CATEGORIES] = { }; // these are the names for geoname.org -char *taxonomy_api_names[NR_CATEGORIES] = { +char *taxonomy_api_names[TC_NR_CATEGORIES] = { "none", "name", "countryName", @@ -23,13 +23,13 @@ char *taxonomy_api_names[NR_CATEGORIES] = { struct taxonomy *alloc_taxonomy() { - return calloc(NR_CATEGORIES, sizeof(struct taxonomy)); + return calloc(TC_NR_CATEGORIES, sizeof(struct taxonomy)); } void free_taxonomy(struct taxonomy *t) { if (t) { - for (int i = 0; i < NR_CATEGORIES; i++) + for (int i = 0; i < TC_NR_CATEGORIES; i++) free((void *)t[i].value); free(t); } |