Old snapshot `bigint-2006.08.14'; see the ChangeLog file.
authorMatt McCutchen <hashproduct@gmail.com>
Sat, 27 Jan 2007 21:06:25 +0000 (16:06 -0500)
committerMatt McCutchen <hashproduct@gmail.com>
Sat, 27 Jan 2007 21:06:25 +0000 (16:06 -0500)
.cdtproject [deleted file]
.project [deleted file]
BigUnsigned.cc
ChangeLog

diff --git a/.cdtproject b/.cdtproject
deleted file mode 100644 (file)
index 998bcd2..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse-cdt version="2.0"?>
-
-<cdtproject id="org.eclipse.cdt.make.core.make">
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="org.eclipse.cdt.core.nullindexer" point="org.eclipse.cdt.core.CIndexer"/>
-<data>
-<item id="scannerConfiguration">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="false" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="false"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="false" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="false"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="false" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="false"/>
-</scannerInfoProvider>
-</profile>
-</item>
-<item id="org.eclipse.cdt.core.pathentry">
-<pathentry kind="src" path=""/>
-<pathentry kind="out" path=""/>
-<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
-</item>
-</data>
-</cdtproject>
diff --git a/.project b/.project
deleted file mode 100644 (file)
index d6e8622..0000000
--- a/.project
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>bigint</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.cdt.make.core.makeBuilder</name>
-                       <arguments>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.build.arguments</key>
-                                       <value></value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.core.errorOutputParser</key>
-                                       <value>org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.VCErrorParser;</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-                                       <value>true</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.environment</key>
-                                       <value></value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.enableFullBuild</key>
-                                       <value>true</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.build.target.inc</key>
-                                       <value>all</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>
-                                       <value>true</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.build.location</key>
-                                       <value></value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.build.target.clean</key>
-                                       <value>clean</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.build.command</key>
-                                       <value>make</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
-                                       <value>true</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.append_environment</key>
-                                       <value>true</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.build.target.full</key>
-                                       <value>clean all</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
-                                       <value>true</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.build.target.auto</key>
-                                       <value>all</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.stopOnError</key>
-                                       <value>false</value>
-                               </dictionary>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.cdt.make.core.ScannerConfigBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.cdt.core.cnature</nature>
-               <nature>org.eclipse.cdt.make.core.makeNature</nature>
-               <nature>org.eclipse.cdt.make.core.ScannerConfigNature</nature>
-               <nature>org.eclipse.cdt.core.ccnature</nature>
-       </natures>
-</projectDescription>
index ecf1055..ad96026 100644 (file)
@@ -731,7 +731,7 @@ void BigUnsigned::bitXor(const BigUnsigned &a, const BigUnsigned &b) {
                a2 = &b;
                b2 = &a;
        }
-       allocate(b2->len);
+       allocate(a2->len);
        for (i = 0; i < b2->len; i++)
                blk[i] = a2->blk[i] ^ b2->blk[i];
        for (; i < a2->len; i++)
index 759e629..45e36b0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,10 @@ Change Log
 ==========
 These entries tell you what was added, fixed, or improved in each version as compared to the previous one.  In case you haven't noticed, a version number roughly corresponds to the release date of that version in `YYYY.MM.DD[.N]' format, where `.N' goes `.2', `.3', etc. if there are multiple versions on the same day.
 
+2006.08.14
+----------
+In BigUnsigned::bitXor, change allocate(b2->len) to allocate(a2->len): we should allocate enough space for the longer number, not the shorter one!  Thanks to Sriram Sankararaman for pointing this out.
+
 2006.05.03
 ----------
 I ran the sample program using valgrind and discovered a `delete s' that should be `delete [] s' and a `len++' before an `allocateAndCopy(len)' that should have been after an `allocateAndCopy(len + 1)'.  I fixed both.  Yay for valgrind!