1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY bc-download-http "http://ftp.gnu.org/gnu/bc/bc-&bc-version;.tar.gz">
|
---|
8 | <!ENTITY bc-download-ftp "ftp://ftp.gnu.org/gnu/bc/bc-&bc-version;.tar.gz">
|
---|
9 | <!ENTITY bc-md5sum "d44b5dddebd8a7a7309aea6c36fda117">
|
---|
10 | <!ENTITY bc-size "273 KB">
|
---|
11 | <!ENTITY bc-buildsize "2.36 MB">
|
---|
12 | <!ENTITY bc-time "less than 0.1 SBU (0.2 SBU if running the testsuite)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="bc" xreflabel="bc-&bc-version;">
|
---|
16 | <?dbhtml filename="bc.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | <keywordset>
|
---|
22 | <keyword role="package">bc-&bc-version;.tar</keyword>
|
---|
23 | <keyword role="ftpdir">bc</keyword>
|
---|
24 | </keywordset>
|
---|
25 | </sect1info>
|
---|
26 |
|
---|
27 | <title>Bc-&bc-version;</title>
|
---|
28 |
|
---|
29 | <indexterm zone="bc">
|
---|
30 | <primary sortas="a-Bc">Bc</primary>
|
---|
31 | </indexterm>
|
---|
32 |
|
---|
33 | <sect2 role="package">
|
---|
34 | <title>Introduction to Bc</title>
|
---|
35 |
|
---|
36 | <para>The <application>bc</application> package contains
|
---|
37 | an arbitrary precision numeric processing language.</para>
|
---|
38 |
|
---|
39 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
40 | <itemizedlist spacing="compact">
|
---|
41 | <listitem>
|
---|
42 | <para>Download (HTTP): <ulink url="&bc-download-http;"/></para>
|
---|
43 | </listitem>
|
---|
44 | <listitem>
|
---|
45 | <para>Download (FTP): <ulink url="&bc-download-ftp;"/></para>
|
---|
46 | </listitem>
|
---|
47 | <listitem>
|
---|
48 | <para>Download MD5 sum: &bc-md5sum;</para>
|
---|
49 | </listitem>
|
---|
50 | <listitem>
|
---|
51 | <para>Download size: &bc-size;</para>
|
---|
52 | </listitem>
|
---|
53 | <listitem>
|
---|
54 | <para>Estimated disk space required: &bc-buildsize;</para>
|
---|
55 | </listitem>
|
---|
56 | <listitem>
|
---|
57 | <para>Estimated build time: &bc-time;</para>
|
---|
58 | </listitem>
|
---|
59 | </itemizedlist>
|
---|
60 |
|
---|
61 | <para condition="html" role="usernotes">User Notes:
|
---|
62 | <ulink url="&blfs-wiki;/bc"/></para>
|
---|
63 |
|
---|
64 | </sect2>
|
---|
65 |
|
---|
66 | <sect2 role="installation">
|
---|
67 | <title>Installation of Bc</title>
|
---|
68 |
|
---|
69 | <para>Install <application>bc</application> by running the following commands:</para>
|
---|
70 |
|
---|
71 | <screen><userinput>sed -i '/PROTO.*readline/d' bc/scan.l &&
|
---|
72 | sed -i '/flex -I8/s/8//' configure &&
|
---|
73 | sed -i '/stdlib/a #include <string.h>' lib/number.c &&
|
---|
74 | sed -i 's/program.*save/static &/' bc/load.c &&
|
---|
75 | ./configure --prefix=/usr --with-readline &&
|
---|
76 | make</userinput></screen>
|
---|
77 |
|
---|
78 | <para>To test <application>bc</application>, run the commands below.
|
---|
79 | There is quite a bit of output, so you may want to redirect it to a file.
|
---|
80 | There are a very small percentage of tests (10 of 12,144) that will
|
---|
81 | indicate a roundoff error at the last digit.</para>
|
---|
82 |
|
---|
83 | <screen><userinput>echo "quit" | ./bc/bc -l Test/checklib.b</userinput></screen>
|
---|
84 |
|
---|
85 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
86 |
|
---|
87 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
88 |
|
---|
89 | </sect2>
|
---|
90 |
|
---|
91 | <sect2 role="commands">
|
---|
92 | <title>Command Explanations</title>
|
---|
93 |
|
---|
94 | <para><command>sed -i '/PROTO.*readline/d' bc/scan.l</command>: This
|
---|
95 | command fixes the <application>Readline</application> library call.</para>
|
---|
96 |
|
---|
97 | <para><command>sed -i '/flex -I8/s/8//' configure</command>: This
|
---|
98 | command fixes the <application>Flex</application> invocation.</para>
|
---|
99 |
|
---|
100 | <para><command>sed -i '/stdlib/a #include <string.h>' lib/number.c</command>:
|
---|
101 | This command inserts a missing header.</para>
|
---|
102 |
|
---|
103 | <para><command>sed -i 's/program.*save/static &/' bc/load.c</command>:
|
---|
104 | This command fixes a segfault when running <application>bc</application>
|
---|
105 | with <command>bc -l</command>.</para>
|
---|
106 |
|
---|
107 | <para><parameter>--with-readline</parameter>: This option enables
|
---|
108 | <application>Readline</application> support in interactive mode.</para>
|
---|
109 |
|
---|
110 | </sect2>
|
---|
111 |
|
---|
112 | <sect2 role="content">
|
---|
113 | <title>Contents</title>
|
---|
114 |
|
---|
115 | <segmentedlist>
|
---|
116 | <segtitle>Installed Programs</segtitle>
|
---|
117 | <segtitle>Installed Libraries</segtitle>
|
---|
118 | <segtitle>Installed Directories</segtitle>
|
---|
119 |
|
---|
120 | <seglistitem>
|
---|
121 | <seg>bc and dc</seg>
|
---|
122 | <seg>None</seg>
|
---|
123 | <seg>None</seg>
|
---|
124 | </seglistitem>
|
---|
125 | </segmentedlist>
|
---|
126 |
|
---|
127 | <variablelist>
|
---|
128 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
129 | <?dbfo list-presentation="list"?>
|
---|
130 | <?dbhtml list-presentation="table"?>
|
---|
131 |
|
---|
132 | <varlistentry id="bc-prog">
|
---|
133 | <term><command>bc</command></term>
|
---|
134 | <listitem>
|
---|
135 | <para>is a calculator.</para>
|
---|
136 | <indexterm zone="bc bc-prog">
|
---|
137 | <primary sortas="b-bc">bc</primary>
|
---|
138 | </indexterm>
|
---|
139 | </listitem>
|
---|
140 | </varlistentry>
|
---|
141 |
|
---|
142 | <varlistentry id="dc">
|
---|
143 | <term><command>dc</command></term>
|
---|
144 | <listitem>
|
---|
145 | <para>is a reverse-polish calculator.</para>
|
---|
146 | <indexterm zone="bc dc">
|
---|
147 | <primary sortas="b-dc">dc</primary>
|
---|
148 | </indexterm>
|
---|
149 | </listitem>
|
---|
150 | </varlistentry>
|
---|
151 |
|
---|
152 | </variablelist>
|
---|
153 |
|
---|
154 | </sect2>
|
---|
155 |
|
---|
156 | </sect1>
|
---|
157 |
|
---|