[Groonga-commit] groonga/groonga at 68ed290 [master] groonga dump: add last newline in standalone mode

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Sep 10 18:14:24 JST 2015


Kouhei Sutou	2015-09-10 18:14:24 +0900 (Thu, 10 Sep 2015)

  New Revision: 68ed290ba193cf22d25931b7113f663b8706ed44
  https://github.com/groonga/groonga/commit/68ed290ba193cf22d25931b7113f663b8706ed44

  Message:
    groonga dump: add last newline in standalone mode

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+5 -0)
===================================================================
--- src/groonga.c    2015-09-10 18:00:37 +0900 (5712dd6)
+++ src/groonga.c    2015-09-10 18:14:24 +0900 (f049fbd)
@@ -295,6 +295,11 @@ s_output_raw(grn_ctx *ctx, int flags, FILE *stream)
   if (flags & GRN_CTX_TAIL) {
     grn_obj *command;
 
+    if (grn_ctx_get_output_type(ctx) == GRN_CONTENT_GROONGA_COMMAND_LIST &&
+        chunk_size > 0 &&
+        chunk[chunk_size - 1] != '\n') {
+      fwrite("\n", 1, 1, stream);
+    }
     fflush(stream);
 
     command = GRN_CTX_USER_DATA(ctx)->ptr;
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index