[52d29f7] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ff769b8c] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[52d29f7] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[b96124dd] | 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">
|
---|
[1fcdfae] | 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)">
|
---|
[52d29f7] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="bc" xreflabel="bc-&bc-version;">
|
---|
[b96124dd] | 16 | <?dbhtml filename="bc.html"?>
|
---|
[fc7afd0c] | 17 |
|
---|
[b96124dd] | 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
[52d50d5] | 21 | <keywordset>
|
---|
| 22 | <keyword role="package">bc-&bc-version;.tar</keyword>
|
---|
[22ac237] | 23 | <keyword role="ftpdir">bc</keyword>
|
---|
[52d50d5] | 24 | </keywordset>
|
---|
[b96124dd] | 25 | </sect1info>
|
---|
[fc7afd0c] | 26 |
|
---|
[b96124dd] | 27 | <title>Bc-&bc-version;</title>
|
---|
[fc7afd0c] | 28 |
|
---|
[b96124dd] | 29 | <indexterm zone="bc">
|
---|
| 30 | <primary sortas="a-Bc">Bc</primary>
|
---|
| 31 | </indexterm>
|
---|
| 32 |
|
---|
| 33 | <sect2 role="package">
|
---|
| 34 | <title>Introduction to Bc</title>
|
---|
[fc7afd0c] | 35 |
|
---|
[b96124dd] | 36 | <para>The <application>bc</application> package contains
|
---|
| 37 | an arbitrary precision numeric processing language.</para>
|
---|
[fc7afd0c] | 38 |
|
---|
[b96124dd] | 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>
|
---|
[fc7afd0c] | 60 |
|
---|
[1039de3] | 61 | <para condition="html" role="usernotes">User Notes:
|
---|
| 62 | <ulink url="&blfs-wiki;/bc"/></para>
|
---|
| 63 |
|
---|
[b96124dd] | 64 | </sect2>
|
---|
[fc7afd0c] | 65 |
|
---|
[88adcdd] | 66 | <sect2 role="installation">
|
---|
[b96124dd] | 67 | <title>Installation of Bc</title>
|
---|
| 68 |
|
---|
| 69 | <para>Install <application>bc</application> by running the following commands:</para>
|
---|
| 70 |
|
---|
[1fcdfae] | 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 &&
|
---|
[52d29f7] | 75 | ./configure --prefix=/usr --with-readline &&
|
---|
[b96124dd] | 76 | make</userinput></screen>
|
---|
| 77 |
|
---|
[1fcdfae] | 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.
|
---|
[ed24600] | 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>
|
---|
[fc7afd0c] | 84 |
|
---|
[b96124dd] | 85 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[fc7afd0c] | 86 |
|
---|
[b96124dd] | 87 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
[fc7afd0c] | 88 |
|
---|
[b96124dd] | 89 | </sect2>
|
---|
[fc7afd0c] | 90 |
|
---|
[1fcdfae] | 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 |
|
---|
[b96124dd] | 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>
|
---|
[fc7afd0c] | 119 |
|
---|
[b96124dd] | 120 | <seglistitem>
|
---|
| 121 | <seg>bc and dc</seg>
|
---|
| 122 | <seg>None</seg>
|
---|
| 123 | <seg>None</seg>
|
---|
| 124 | </seglistitem>
|
---|
| 125 | </segmentedlist>
|
---|
[fc7afd0c] | 126 |
|
---|
[b96124dd] | 127 | <variablelist>
|
---|
| 128 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 129 | <?dbfo list-presentation="list"?>
|
---|
| 130 | <?dbhtml list-presentation="table"?>
|
---|
[fc7afd0c] | 131 |
|
---|
[b96124dd] | 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>
|
---|
[fc7afd0c] | 141 |
|
---|
[b96124dd] | 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>
|
---|
[fc7afd0c] | 151 |
|
---|
[b96124dd] | 152 | </variablelist>
|
---|
| 153 |
|
---|
| 154 | </sect2>
|
---|
[52d29f7] | 155 |
|
---|
| 156 | </sect1>
|
---|
| 157 |
|
---|