diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2024-05-12 19:10:12 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2024-05-12 21:28:58 +0200 |
commit | abc3e67678d77c43fe739af3ed812d558cc83435 (patch) | |
tree | a9e061d3fd40a4bff2bf8e46d18117da5179abbd /source/a/less/007521ac3c95bc76.patch | |
parent | afc0f1e9aaa780f00b61d8c42b3a77833fbbaff8 (diff) | |
download | current-abc3e67678d77c43fe739af3ed812d558cc83435.tar.gz current-abc3e67678d77c43fe739af3ed812d558cc83435.tar.xz |
Sun May 12 19:10:12 UTC 202420240512191012
a/less-654-x86_64-1.txz: Upgraded.
d/ninja-1.12.1-x86_64-1.txz: Upgraded.
n/whois-5.5.23-x86_64-1.txz: Upgraded.
Updated the .sc, .********* (.xn--yfro4i67o, Singapore)
and .********************************* (.xn--clchc0ea0b2g2a9gcd, Singapore)
TLD servers.
extra/bittornado/bittornado-0.3.18-noarch-3.txz: Removed.
Obsolete and based on python2.
Diffstat (limited to 'source/a/less/007521ac3c95bc76.patch')
-rw-r--r-- | source/a/less/007521ac3c95bc76.patch | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/source/a/less/007521ac3c95bc76.patch b/source/a/less/007521ac3c95bc76.patch deleted file mode 100644 index 663f222c0..000000000 --- a/source/a/less/007521ac3c95bc76.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 007521ac3c95bc76e3d59c6dbfe75d06c8075c33 Mon Sep 17 00:00:00 2001 -From: Mark Nudelman <markn@greenwoodsoftware.com> -Date: Thu, 11 Apr 2024 17:49:48 -0700 -Subject: [PATCH] Fix bug when viewing a file whose name contains a newline. - ---- - filename.c | 31 +++++++++++++++++++++++++------ - 1 file changed, 25 insertions(+), 6 deletions(-) - -diff --git a/filename.c b/filename.c -index f90e0e82..a52c6354 100644 ---- a/filename.c -+++ b/filename.c -@@ -127,11 +127,20 @@ static constant char * metachars(void) - /* - * Is this a shell metacharacter? - */ --static int metachar(char c) -+static lbool metachar(char c) - { - return (strchr(metachars(), c) != NULL); - } - -+/* -+ * Must use quotes rather than escape char for this metachar? -+ */ -+static lbool must_quote(char c) -+{ -+ /* {{ Maybe the set of must_quote chars should be configurable? }} */ -+ return (c == '\n'); -+} -+ - /* - * Insert a backslash before each metacharacter in a string. - */ -@@ -164,6 +173,9 @@ public char * shell_quoten(constant char *s, size_t slen) - * doesn't support escape chars. Use quotes. - */ - use_quotes = TRUE; -+ } else if (must_quote(*p)) -+ { -+ len += 3; /* open quote + char + close quote */ - } else - { - /* -@@ -194,15 +206,22 @@ public char * shell_quoten(constant char *s, size_t slen) - constant char *es = s + slen; - while (s < es) - { -- if (metachar(*s)) -+ if (!metachar(*s)) - { -- /* -- * Add the escape char. -- */ -+ *np++ = *s++; -+ } else if (must_quote(*s)) -+ { -+ /* Surround the char with quotes. */ -+ *np++ = openquote; -+ *np++ = *s++; -+ *np++ = closequote; -+ } else -+ { -+ /* Insert an escape char before the char. */ - strcpy(np, esc); - np += esclen; -+ *np++ = *s++; - } -- *np++ = *s++; - } - *np = '\0'; - } |