[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: Quote strings if in csv mod
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: Quote strings if in csv mode (statistics cli) |
Date: |
Wed, 12 Sep 2018 16:56:09 +0200 |
This is an automated email from the git hooks/post-receive script.
julius-buenger pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 60229aa02 Quote strings if in csv mode (statistics cli)
60229aa02 is described below
commit 60229aa0287024714cebb4a267ea732a883e8812
Author: Julius Bünger <address@hidden>
AuthorDate: Wed Sep 12 16:55:24 2018 +0200
Quote strings if in csv mode (statistics cli)
---
src/statistics/gnunet-statistics.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/statistics/gnunet-statistics.c
b/src/statistics/gnunet-statistics.c
index a92faa3d7..8f43df0ff 100644
--- a/src/statistics/gnunet-statistics.c
+++ b/src/statistics/gnunet-statistics.c
@@ -216,25 +216,29 @@ printer (void *cls,
{
now_str = GNUNET_STRINGS_absolute_time_to_string (now);
FPRINTF (stdout,
- "%24s%s %s%s%12s%s %50s%s ",
+ "%24s%s %s%s%12s%s %s%50s%s%s ",
now_str,
csv_separator,
value_set->is_persistent ? "!" : " ",
csv_separator,
value_set->subsystem,
csv_separator,
+ (0 == strlen (csv_separator) ? "": "\""), /* quotes if csv */
_(value_set->name),
+ (0 == strlen (csv_separator) ? "": "\""), /* quotes if csv */
(0 == strlen (csv_separator) ? ":": csv_separator));
}
else
{
FPRINTF (stdout,
- "%s%s%12s%s %50s%s ",
+ "%s%s%12s%s %s%50s%s%s ",
value_set->is_persistent ? "!" : " ",
csv_separator,
value_set->subsystem,
csv_separator,
+ (0 == strlen (csv_separator) ? "": "\""), /* quotes if csv */
_(value_set->name),
+ (0 == strlen (csv_separator) ? "": "\""), /* quotes if csv */
(0 == strlen (csv_separator) ? ":": csv_separator));
}
}
@@ -279,26 +283,30 @@ printer_watch (void *cls,
{
now_str = GNUNET_STRINGS_absolute_time_to_string (now);
FPRINTF (stdout,
- "%24s%s %s%s%12s%s %50s%s %16llu\n",
+ "%24s%s %s%s%12s%s %s%50s%s%s %16llu\n",
now_str,
csv_separator,
is_persistent ? "!" : " ",
csv_separator,
subsystem,
csv_separator,
+ (0 == strlen (csv_separator) ? "": "\""), /* quotes if csv */
_(name),
+ (0 == strlen (csv_separator) ? "": "\""), /* quotes if csv */
(0 == strlen (csv_separator) ? ":": csv_separator),
(unsigned long long) value);
}
else
{
FPRINTF (stdout,
- "%s%s%12s%s %50s%s %16llu\n",
+ "%s%s%12s%s %s%50s%s%s %16llu\n",
is_persistent ? "!" : " ",
csv_separator,
subsystem,
csv_separator,
+ (0 == strlen (csv_separator) ? "": "\""), /* quotes if csv */
_(name),
+ (0 == strlen (csv_separator) ? "": "\""), /* quotes if csv */
(0 == strlen (csv_separator) ? ":": csv_separator),
(unsigned long long) value);
}
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: Quote strings if in csv mode (statistics cli),
gnunet <=