echo empty lines
readline doesn't echo empty lines (when not using a prompt), so adjust bc to echo empty lines, which is very useful to delimit interactive input
This commit is contained in:
parent
f0c7c363e3
commit
c5e317aba0
14
bc-1.07.1-readline-echo-empty.diff
Normal file
14
bc-1.07.1-readline-echo-empty.diff
Normal file
@ -0,0 +1,14 @@
|
||||
diff -Naur bc-1.07.1/bc/scan.l bc-1.07.1-new/bc/scan.l
|
||||
--- bc-1.07.1/bc/scan.l 2017-04-07 22:20:02.000000000 +0000
|
||||
+++ bc-1.07.1-new/bc/scan.l 2021-08-14 12:12:33.860991777 +0000
|
||||
@@ -170,6 +170,10 @@
|
||||
if (rl_len != 1)
|
||||
add_history (rl_line);
|
||||
rl_line[rl_len-1] = '\n';
|
||||
+ /* readline doesn't echo empty lines without a prompt,
|
||||
+ so do so here. */
|
||||
+ if (rl_len == 1)
|
||||
+ putchar ('\n');
|
||||
fflush (stdout);
|
||||
}
|
||||
|
6
bc.spec
6
bc.spec
@ -1,12 +1,13 @@
|
||||
Summary: GNU's bc (a numeric processing language) and dc (a calculator)
|
||||
Name: bc
|
||||
Version: 1.07.1
|
||||
Release: 13%{?dist}
|
||||
Release: 14%{?dist}
|
||||
License: GPLv2+
|
||||
URL: http://www.gnu.org/software/bc/
|
||||
Source: http://ftp.gnu.org/gnu/bc/bc-%{version}.tar.gz
|
||||
Patch1: bc-1.06-dc_ibase.patch
|
||||
Patch2: bc-1.06.95-doc.patch
|
||||
Patch3: bc-1.07.1-readline-echo-empty.diff
|
||||
BuildRequires: gcc
|
||||
BuildRequires: readline-devel, flex, bison, texinfo, ed
|
||||
BuildRequires: make
|
||||
@ -40,6 +41,9 @@ rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
|
||||
%{_infodir}/*
|
||||
|
||||
%changelog
|
||||
* Sat Aug 14 2021 Pádraig Brady <P@draigBrady.com> - 1.07.1-14
|
||||
- Echo empty lines, useful for delimiting work
|
||||
|
||||
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.07.1-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user