* (c) 1999 Straylight/Edgeware
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
* This file is part of Catacomb.
*
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
- *
+ *
* Catacomb is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Library General Public
* License along with Catacomb; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* @mp *a@ = source
*
* Returns: The bitwise complement of the source.
- */
+ */
mp *mp_not(mp *d, mp *a)
{
* negative at the end, we preinvert the output and then invert again with a
* sign-swap.
*
- * Start with: wxyz WXYZ
+ * Start with: wxyz WXYZ
* If @a@ negative: yzwx or YZWX
- * If @b@ negative: xwzy XWZY
- * If both negative: zyxw ZYXW
+ * If @b@ negative: xwzy XWZY
+ * If both negative: zyxw ZYXW
*/
#define MP_BIT2CBINOP(n, base, an, bn, abn, p_base, p_an, p_bn, p_abn) \
{
if (!MP_EQ(expect, result)) {
fprintf(stderr, "\n*** %s failed", op);
- fputs("\n*** a = ", stderr); mp_writefile(a, stderr, 10);
- fputs("\n*** b = ", stderr); mp_writefile(b, stderr, 10);
+ fputs("\n*** a = ", stderr); mp_writefile(a, stderr, 10);
+ fputs("\n*** b = ", stderr); mp_writefile(b, stderr, 10);
fputs("\n*** result = ", stderr); mp_writefile(result, stderr, 10);
fputs("\n*** expect = ", stderr); mp_writefile(expect, stderr, 10);
fputc('\n', stderr);
static int tbin(dstr *v)
{
static mp *(*fn[])(mp *, mp *, mp *) = {
-#define DO(string) mp_bit##string##2c,
+#define DO(string) mp_bit##string##2c,
MPX_DOBIN(DO)
#undef DO
};
mp *b = *(mp **)v[2].buf;
mp *r = *(mp **)v[3].buf;
mp *c;
-
+
if (strcmp(v[0].buf, "and") == 0) op = 1;
else if (strcmp(v[0].buf, "or") == 0) op = 7;
else if (strcmp(v[0].buf, "nand") == 0) op = 14;
mp_drop(a);
mp_drop(r);
assert(mparena_count(MPARENA_GLOBAL) == 0);
- return (ok);
+ return (ok);
}
static int todd(dstr *v)