mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-02 10:52:57 +02:00
dialog: fix "no blanks" issue w/ BE targets
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
This commit is contained in:
parent
f6ab65d963
commit
49a764352c
2 changed files with 22 additions and 1 deletions
21
srcpkgs/dialog/patches/trim-blank.patch
Normal file
21
srcpkgs/dialog/patches/trim-blank.patch
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
Source: @pullmoll
|
||||||
|
Upstream: no (should be queried)
|
||||||
|
Reason: fix issue with dialog dropping blanks (BE targets)
|
||||||
|
|
||||||
|
The conversion of isblank() to int is vague thus use constants.
|
||||||
|
Pre decrement the dst ptr and test for it being greater than base.
|
||||||
|
|
||||||
|
--- util.c 2018-06-22 01:47:10.000000000 +0200
|
||||||
|
+++ util.c 2019-05-30 10:35:00.517648968 +0200
|
||||||
|
@@ -2330,9 +2330,9 @@
|
||||||
|
static bool
|
||||||
|
trim_blank(char *base, char *dst)
|
||||||
|
{
|
||||||
|
- int count = isblank(UCH(*dst));
|
||||||
|
+ int count = isblank(UCH(*dst)) ? 1 : 0;
|
||||||
|
|
||||||
|
- while (dst-- != base) {
|
||||||
|
+ while (--dst > base) {
|
||||||
|
if (*dst == '\n') {
|
||||||
|
break;
|
||||||
|
} else if (isblank(UCH(*dst))) {
|
|
@ -3,7 +3,7 @@ pkgname=dialog
|
||||||
_distver=1.3
|
_distver=1.3
|
||||||
_date=20190211
|
_date=20190211
|
||||||
version="${_distver}.${_date}"
|
version="${_distver}.${_date}"
|
||||||
revision=1
|
revision=2
|
||||||
wrksrc="${pkgname}-${_distver}-${_date}"
|
wrksrc="${pkgname}-${_distver}-${_date}"
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--with-ncursesw --disable-nls"
|
configure_args="--with-ncursesw --disable-nls"
|
||||||
|
|
Loading…
Add table
Reference in a new issue