aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2022-06-22 15:12:06 +0800
committerXi Ruoyao <xry111@xry111.site>2022-06-22 15:16:03 +0800
commite909a1ebdf37d817f53707c5a998a6786d5af1cd (patch)
tree9d15283bc17cc57fe9dc5e32966e3e469de3b209
parentc500323f9b88e760988ff5ee4904b1de30953688 (diff)
bc: enable readline
Using readline can improve line editing feature of bc, but it's not enabled by default. As readline is already installed before bc, let's pick up this improvement with no cost.
-rw-r--r--appendices/dependencies.xml4
-rw-r--r--chapter08/bc.xml16
2 files changed, 14 insertions, 6 deletions
diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml
index 6493aa1f9..3ad5c0097 100644
--- a/appendices/dependencies.xml
+++ b/appendices/dependencies.xml
@@ -244,7 +244,7 @@
<segmentedlist id="bc-depends">
<segtitle>&dependencies;</segtitle>
<seglistitem>
- <seg>Bash, Binutils, Coreutils, GCC, Glibc, Grep, and Make</seg>
+ <seg>Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, and Readline</seg>
</seglistitem>
</segmentedlist>
@@ -2615,7 +2615,7 @@
<segmentedlist id="readline-before">
<segtitle>&before;</segtitle>
<seglistitem>
- <seg>Bash and Gawk</seg>
+ <seg>Bash, Bc, and Gawk</seg>
</seglistitem>
</segmentedlist>
diff --git a/chapter08/bc.xml b/chapter08/bc.xml
index 9678ddd54..4493f8219 100644
--- a/chapter08/bc.xml
+++ b/chapter08/bc.xml
@@ -43,7 +43,7 @@
<para>Prepare Bc for compilation:</para>
-<screen><userinput remap="configure">CC=gcc ./configure --prefix=/usr -G -O3</userinput></screen>
+<screen><userinput remap="configure">CC=gcc ./configure --prefix=/usr -G -O3 -r</userinput></screen>
<variablelist>
<title>The meaning of the configure options:</title>
@@ -56,6 +56,14 @@
</varlistentry>
<varlistentry>
+ <term><parameter>-G</parameter></term>
+ <listitem>
+ <para>Omit parts of the test suite that won't work
+ without a GNU bc present.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><parameter>-O3</parameter></term>
<listitem>
<para>Specify the optimization to use.</para>
@@ -63,10 +71,10 @@
</varlistentry>
<varlistentry>
- <term><parameter>-G</parameter></term>
+ <term><parameter>-r</parameter></term>
<listitem>
- <para>Omit parts of the test suite that won't work
- without a GNU bc present.</para>
+ <para>Enable the use of <application>Readline</application> to
+ improve the line editing feature of bc.</para>
</listitem>
</varlistentry>
</variablelist>