ovsdb-client: Add blank line between tables in CSV, tabular output.
[sliver-openvswitch.git] / ovsdb / ovsdb-client.c
index e6dee81..9dd8094 100644 (file)
@@ -434,9 +434,14 @@ table_print_table_line__(struct ds *line)
 static void
 table_print_table__(const struct table *table)
 {
+    static int n = 0;
     struct ds line = DS_EMPTY_INITIALIZER;
     size_t x, y;
 
+    if (n++ > 0) {
+        putchar('\n');
+    }
+
     if (output_headings) {
         for (x = 0; x < table->n_columns; x++) {
             const struct column *column = &table->columns[x];
@@ -590,8 +595,13 @@ table_print_csv_cell__(const char *content)
 static void
 table_print_csv__(const struct table *table)
 {
+    static int n = 0;
     size_t x, y;
 
+    if (n++ > 0) {
+        putchar('\n');
+    }
+
     if (table->caption) {
         puts(table->caption);
     }