projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
81a2fe3
)
strip trailing whitespace from lv2 log message
author
Robin Gareus
<robin@gareus.org>
Wed, 1 Jun 2016 17:01:13 +0000
(19:01 +0200)
committer
Robin Gareus
<robin@gareus.org>
Wed, 1 Jun 2016 17:01:13 +0000
(19:01 +0200)
libs/ardour/lv2_plugin.cc
patch
|
blob
|
history
diff --git
a/libs/ardour/lv2_plugin.cc
b/libs/ardour/lv2_plugin.cc
index 4c3ca31d2dca53d1e3263fcdde2adbc7babe1486..5b97b6833315a59048515978a9054f4406bcc90e 100644
(file)
--- a/
libs/ardour/lv2_plugin.cc
+++ b/
libs/ardour/lv2_plugin.cc
@@
-237,6
+237,18
@@
log_vprintf(LV2_Log_Handle /*handle*/,
{
char* str = NULL;
const int ret = g_vasprintf(&str, fmt, args);
{
char* str = NULL;
const int ret = g_vasprintf(&str, fmt, args);
+ /* strip trailing whitespace */
+ while (strlen (str) > 0
+ && ( str[strlen (str) - 1] == '\n'
+ || str[strlen (str) - 1] == '\r'
+ || str[strlen (str) - 1] == ' '
+ || str[strlen (str) - 1] == '\t')) {
+ str[strlen (str) - 1] = '\0';
+ }
+ if (strlen (str) == 0) {
+ return 0;
+ }
+
if (type == URIMap::instance().urids.log_Error) {
error << str << endmsg;
} else if (type == URIMap::instance().urids.log_Warning) {
if (type == URIMap::instance().urids.log_Error) {
error << str << endmsg;
} else if (type == URIMap::instance().urids.log_Warning) {