mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: remove UTF8 macros
At some places we use UTF8 string literals. Therefore, we effectively only support UTF8 build systems. We might just as well remove all the other UTF_* macros and use direct string literals. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
32720a7c18
commit
e362afe43c
7 changed files with 25 additions and 35 deletions
|
|
@ -652,7 +652,6 @@ void update_cylinder_related_info(struct dive *dive)
|
|||
}
|
||||
|
||||
#define MAX_GAS_STRING 80
|
||||
#define UTF8_ELLIPSIS "\xE2\x80\xA6"
|
||||
|
||||
/* callers needs to free the string */
|
||||
char *get_dive_gas_string(const struct dive *dive)
|
||||
|
|
@ -670,12 +669,12 @@ char *get_dive_gas_string(const struct dive *dive)
|
|||
if (o2 == o2max)
|
||||
snprintf(buffer, MAX_GAS_STRING, "%d/%d", o2, he);
|
||||
else
|
||||
snprintf(buffer, MAX_GAS_STRING, "%d/%d" UTF8_ELLIPSIS "%d%%", o2, he, o2max);
|
||||
snprintf(buffer, MAX_GAS_STRING, "%d/%d…%d%%", o2, he, o2max);
|
||||
else if (o2)
|
||||
if (o2 == o2max)
|
||||
snprintf(buffer, MAX_GAS_STRING, "%d%%", o2);
|
||||
else
|
||||
snprintf(buffer, MAX_GAS_STRING, "%d" UTF8_ELLIPSIS "%d%%", o2, o2max);
|
||||
snprintf(buffer, MAX_GAS_STRING, "%d…%d%%", o2, o2max);
|
||||
else
|
||||
strcpy(buffer, translate("gettextFromC", "air"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue