Changeset 115639 in git for Singular/extra.cc


Ignore:
Timestamp:
Mar 1, 2011, 6:21:05 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
b521f3698286cefec0d2866b873155439fcc9619
Parents:
2c470d08ccdc9d28a3c5007e5cc99fe10e6d522c
Message:
ADD: call bigintm_setup using system("bigintm_setup"); (due to extra.cc)
ADD: bigintm_setup should better return BOOLEAN
ADD: better development prints for blackbox objects
ADD: save static type (bigintm) ID

From: Oleksandr Motsak <motsak@mathematik.uni-kl.de>

git-svn-id: file:///usr/local/Singular/svn/trunk@13910 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/extra.cc

    r2c470d0 r115639  
    162162//#endif /* not HAVE_DYNAMIC_LOADING */
    163163
     164#include <Singular/bigintm.h>
     165
    164166#ifdef ix86_Win
    165167//#include <Python.h>
     
    175177#ifdef ix86_Win  /* PySingular initialized? */
    176178static int PyInitialized = 0;
     179#endif
     180
     181#if SIZEOF_LONG == 8
     182static number jjLONG2N(long d)
     183{
     184  int i=(int)d;
     185  if ((long)i == d)
     186  {
     187    return nlInit(i, NULL);
     188  }
     189  else
     190  {
     191#if !defined(OM_NDEBUG) && !defined(NDEBUG)
     192    omCheckBin(rnumber_bin);
     193#endif
     194    number z=(number)omAllocBin(rnumber_bin);
     195#if defined(LDEBUG)
     196    z->debug=123456;
     197#endif
     198    z->s=3;
     199    mpz_init_set_si(z->z,d);
     200    return z;
     201  }
     202}
     203#else
     204#define jjLONG2N(D) nlInit((int)D, NULL)
    177205#endif
    178206
     
    38783906    printBlackboxTypes();
    38793907    return FALSE;
    3880   }
    3881   else
     3908  } else
     3909/*==================== init the bigintm (a sample blackbox) type =========*/
     3910  if(strcmp(sys_cmd,"bigintm_setup") == 0)
     3911  {
     3912    return bigintm_setup();
     3913  } else
    38823914/*==================== Error =================*/
    38833915      Werror( "(extended) system(\"%s\",...) %s", sys_cmd, feNotImplemented );
Note: See TracChangeset for help on using the changeset viewer.