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