dash: update to 0.5.10.2.

Closes #14506.

Signed-off-by: Enno Boland <gottox@voidlinux.eu>
This commit is contained in:
maxice8 2018-05-17 13:41:01 -03:00 committed by Enno Boland
parent ad8742b401
commit 8218397d16
No known key found for this signature in database
GPG Key ID: D09964719BDE9971
2 changed files with 2 additions and 67 deletions

View File

@ -1,65 +0,0 @@
From 469c5fd4f57622b1a6571172898ab29430319d4a Mon Sep 17 00:00:00 2001
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Fri, 11 May 2018 23:41:25 +0800
Subject: parser: Fix incorrect eating of backslash newlines
With the introduction of synstack->syntax, a number of references
to the syntax variable was missed during the conversion. This
causes backslash newlines to be incorrectly removed in single
quote context.
This patch also combines these calls into a new helper function
pgetc_top.
Fixes: ab1cecb40478 ("parser: Add syntax stack for recursive...")
Reported-by: Leah Neukirchen <leah@vuxu.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---
src/parser.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
--- src/parser.c
+++ src/parser.c
@@ -853,6 +853,11 @@ static int pgetc_eatbnl(void)
return c;
}
+static int pgetc_top(struct synstack *stack)
+{
+ return stack->syntax == SQSYNTAX ? pgetc() : pgetc_eatbnl();
+}
+
static void synstack_push(struct synstack **stack, struct synstack *next,
const char *syntax)
{
@@ -915,7 +920,7 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs)
attyline();
if (synstack->syntax == BASESYNTAX)
return readtoken();
- c = syntax == SQSYNTAX ? pgetc() : pgetc_eatbnl();
+ c = pgetc_top(synstack);
goto loop;
}
#endif
@@ -929,7 +934,7 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs)
goto endword; /* exit outer loop */
USTPUTC(c, out);
nlprompt();
- c = syntax == SQSYNTAX ? pgetc() : pgetc_eatbnl();
+ c = pgetc_top(synstack);
goto loop; /* continue outer loop */
case CWORD:
USTPUTC(c, out);
@@ -1056,7 +1061,7 @@ toggledq:
USTPUTC(c, out);
}
}
- c = syntax == SQSYNTAX ? pgetc() : pgetc_eatbnl();
+ c = pgetc_top(synstack);
}
}
endword:
--
cgit v1.1

View File

@ -1,6 +1,6 @@
# Template file for 'dash'
pkgname=dash
version=0.5.10.1
version=0.5.10.2
revision=1
build_style=gnu-configure
hostmakedepends="bison"
@ -10,7 +10,7 @@ maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="BSD-3-Clause"
homepage="http://gondor.apana.org.au/~herbert/dash/"
distfiles="http://gondor.apana.org.au/~herbert/dash/files/$pkgname-$version.tar.gz"
checksum=daac92be392ea5d9b03e8879384e437828e636b9f491a275a607f85d7e5e84ae
checksum=3c663919dc5c66ec991da14c7cf7e0be8ad00f3db73986a987c118862b5f6071
alternatives="
sh:sh:/usr/bin/dash