forked from pool/gnome-terminal
Accepting request 606926 from GNOME:Factory
- Add gnome-terminal-fix-output-commenting.patch: client: legacy: Fix output commenting. Make sure each line starts with '#' even if the message contains embedded newlines. (forwarded request 606838 from iznogood) OBS-URL: https://build.opensuse.org/request/show/606926 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnome-terminal?expand=0&rev=118
This commit is contained in:
commit
0ba0b6a23c
61
gnome-terminal-fix-output-commenting.patch
Normal file
61
gnome-terminal-fix-output-commenting.patch
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
From 47a949167af299e40b47fb6caf08ec06373b33d5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Persch <chpe@src.gnome.org>
|
||||||
|
Date: Wed, 2 May 2018 19:32:52 +0200
|
||||||
|
Subject: client: legacy: Fix output commenting
|
||||||
|
|
||||||
|
Make sure each line starts with '#' even if the message
|
||||||
|
contains embedded newlines.
|
||||||
|
|
||||||
|
(cherry picked from commit d62c6ee988371cdf2af84a7898cee686c484aff8)
|
||||||
|
---
|
||||||
|
src/terminal-options.c | 28 +++++++++++++---------------
|
||||||
|
1 file changed, 13 insertions(+), 15 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/terminal-options.c b/src/terminal-options.c
|
||||||
|
index e00ca92..d1e8a4a 100644
|
||||||
|
--- a/src/terminal-options.c
|
||||||
|
+++ b/src/terminal-options.c
|
||||||
|
@@ -41,27 +41,25 @@
|
||||||
|
|
||||||
|
static int verbosity = 1;
|
||||||
|
|
||||||
|
-/* @freeme is a workaround for Clang; see gnome-terminal bug 790318. */
|
||||||
|
-static char * G_GNUC_FORMAT (2)
|
||||||
|
-format_as_comment (char** freeme, const char *format)
|
||||||
|
-{
|
||||||
|
- return *freeme = g_strdup_printf ("# %s", format);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
void
|
||||||
|
terminal_fprintf (FILE* fp,
|
||||||
|
int verbosity_level,
|
||||||
|
const char* format,
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
- if (verbosity < verbosity_level)
|
||||||
|
- return;
|
||||||
|
-
|
||||||
|
- gs_free char* freeme;
|
||||||
|
- va_list args;
|
||||||
|
- va_start(args, format);
|
||||||
|
- g_vfprintf(fp, format_as_comment(&freeme, format), args);
|
||||||
|
- va_end(args);
|
||||||
|
+ if (verbosity < verbosity_level)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ va_list args;
|
||||||
|
+ va_start(args, format);
|
||||||
|
+ gs_free char *str = g_strdup_vprintf(format, args);
|
||||||
|
+ va_end(args);
|
||||||
|
+
|
||||||
|
+ gs_strfreev char **lines = g_strsplit_set(str, "\n\r", -1);
|
||||||
|
+ for (gsize i = 0; lines[i]; ++i) {
|
||||||
|
+ if (lines[i][0] != '\0')
|
||||||
|
+ g_fprintf(fp, "# %s\n", lines[i]);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
#if GLIB_CHECK_VERSION (2, 50, 0)
|
||||||
|
--
|
||||||
|
cgit v0.12
|
||||||
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 3 12:04:03 UTC 2018 - bjorn.lie@gmail.com
|
||||||
|
|
||||||
|
- Add gnome-terminal-fix-output-commenting.patch: client: legacy:
|
||||||
|
Fix output commenting. Make sure each line starts with '#' even
|
||||||
|
if the message contains embedded newlines.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 24 15:34:58 UTC 2018 - bjorn.lie@gmail.com
|
Tue Apr 24 15:34:58 UTC 2018 - bjorn.lie@gmail.com
|
||||||
|
|
||||||
|
@ -26,6 +26,8 @@ URL: https://wiki.gnome.org/Apps/Terminal
|
|||||||
Source: http://download.gnome.org/sources/gnome-terminal/3.28/%{name}-%{version}.tar.xz
|
Source: http://download.gnome.org/sources/gnome-terminal/3.28/%{name}-%{version}.tar.xz
|
||||||
# PATCH-FIX-UPSTREAM gnome-terminal-translate-encoding-names.patch bgo#795358 -- prefs: editor: Translate encoding names
|
# PATCH-FIX-UPSTREAM gnome-terminal-translate-encoding-names.patch bgo#795358 -- prefs: editor: Translate encoding names
|
||||||
Patch0: gnome-terminal-translate-encoding-names.patch
|
Patch0: gnome-terminal-translate-encoding-names.patch
|
||||||
|
# PATCH-FIX-UPSTREAM gnome-terminal-fix-output-commenting.patch -- client: legacy: Fix output commenting
|
||||||
|
Patch1: gnome-terminal-fix-output-commenting.patch
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
# Needed for search provider. It should not be needed in my opionion, we have to take this up with upstream, or just provide search provider interface definition file as source.
|
# Needed for search provider. It should not be needed in my opionion, we have to take this up with upstream, or just provide search provider interface definition file as source.
|
||||||
BuildRequires: gnome-shell
|
BuildRequires: gnome-shell
|
||||||
|
Loading…
x
Reference in New Issue
Block a user