From: Fujii Masao Date: Mon, 13 Apr 2015 04:30:59 +0000 (+0900) Subject: Silence gettext warning about '\r' escape sequence in translatable string. X-Git-Tag: REL9_5_ALPHA1~453 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f94bec7a9e3e6b4fa5468236cf531fec16d1093;p=postgresql Silence gettext warning about '\r' escape sequence in translatable string. gettext was unhappy about the commit b216ad7 because it revealed the problem that internationalized messages may contain '\r' escape sequence in pg_rewind. This commit moves '\r' to a separate printf() call. Michael Paquier, bug reported by Peter Eisentraut --- diff --git a/src/bin/pg_rewind/logging.c b/src/bin/pg_rewind/logging.c index aba12d842e..3e2dc76c58 100644 --- a/src/bin/pg_rewind/logging.c +++ b/src/bin/pg_rewind/logging.c @@ -134,7 +134,8 @@ progress_report(bool force) snprintf(fetch_size_str, sizeof(fetch_size_str), INT64_FORMAT, fetch_size / 1024); - pg_log(PG_PROGRESS, "%*s/%s kB (%d%%) copied\r", + pg_log(PG_PROGRESS, "%*s/%s kB (%d%%) copied", (int) strlen(fetch_size_str), fetch_done_str, fetch_size_str, percent); + printf("\r"); }