mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 22:46:16 +00:00
Remove trailing spaces from the produced output
The code found the trailing spaces and just didn't care about it. This also removes the FIXME quoting, because quoting is managed. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0325a42c08
commit
ba31a57857
1 changed files with 4 additions and 2 deletions
|
@ -71,6 +71,7 @@ static void quote(struct membuffer *b, const char *text, int is_attribute)
|
|||
static void show_utf8(struct membuffer *b, const char *text, const char *pre, const char *post, int is_attribute)
|
||||
{
|
||||
int len;
|
||||
char *cleaned;
|
||||
|
||||
if (!text)
|
||||
return;
|
||||
|
@ -81,10 +82,11 @@ static void show_utf8(struct membuffer *b, const char *text, const char *pre, co
|
|||
return;
|
||||
while (len && isspace(text[len - 1]))
|
||||
len--;
|
||||
/* FIXME! Quoting! */
|
||||
cleaned = strndup(text, len);
|
||||
put_string(b, pre);
|
||||
quote(b, text, is_attribute);
|
||||
quote(b, cleaned, is_attribute);
|
||||
put_string(b, post);
|
||||
free(cleaned);
|
||||
}
|
||||
|
||||
static void save_depths(struct membuffer *b, struct divecomputer *dc)
|
||||
|
|
Loading…
Add table
Reference in a new issue