Changeset 42f2ad in git


Ignore:
Timestamp:
Dec 6, 2013, 12:39:54 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '5bec8f88c9ee2573d328cf7c3aff2bcb301d2395')
Children:
f5d2647d30f302536a13c1f6d9d12252187f361d
Parents:
7f974f6a471f29692ae22b5338098c047680b0f76c8ba30f3cbc3b424a708defb57649b060a4b243
Message:
Merge pull request #440 from mschulze/spielwiese

cleaned up debian/redhat files
Files:
3 added
22 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/resources.lib

    r6c8ba3 r42f2ad  
    3131static proc mod_init()
    3232{
    33     int sem_cores = semaphore(system("--cpus"))-1;
     33    int sem_cores = semaphore(system("--cpus")-1);
    3434    exportto(Resources, sem_cores);
    3535    int NCORES = system("semaphore", "get_value", sem_cores)+1;
     
    123123EXAMPLE:  example semaphore; shows an example"
    124124{
    125     int i = 1;
     125    int i = 0;
    126126    while (system("semaphore", "exists", i) == 1) {
    127127        i++;
  • Singular/LIB/tasks.lib

    r6c8ba3 r42f2ad  
    1515
    1616tasks.lib respects the limits for computational resources defined
    17 in @ref{resources.lib}, i.e., all tasks within the same Singular session will
     17in @ref{resources_lib}, i.e., all tasks within the same Singular session will
    1818not use more computational resources than provided via resources.lib, even if
    1919tasks are started recursively.
    2020
    21 The Singular library @ref{parallel.lib} provides implementations of several
     21The Singular library @ref{parallel_lib} provides implementations of several
    2222parallel 'skeletons' based on tasks.lib.
    2323
  • Singular/ipshell.cc

    r6c8ba3 r42f2ad  
    51965196        if (mpz_cmp_ui(modBase,0)==0)
    51975197        {
    5198           WerrorS("modulus must not be 0");
     5198          WerrorS("modulus must not be 0 or parameter not allowed");
    51995199          goto rInitError;
    52005200        }
     
    52115211      if (mpz_cmp_ui(modBase,0)==0)
    52125212      {
    5213         WerrorS("modulus must not be 0");
     5213        WerrorS("modulus must not be 0 or parameter not allowed");
    52145214        goto rInitError;
    52155215      }
  • Tst/Short/ok_s.lst

    r6c8ba3 r42f2ad  
    9898bug_tr225
    9999bug_tr230
     100bug_tr237
    100101bug_tr239
    101102; do not try bug_tr276 without 2.2 GB RAM free
  • configure.ac

    r7f974f r42f2ad  
    227227AC_CONFIG_FILES([IntegerProgramming/Makefile])
    228228
     229AC_CONFIG_FILES([libsingular-config])
     230
     231AC_CONFIG_FILES([emacs/Makefile])
     232
     233AC_CONFIG_FILES([debian/Makefile])
     234AC_CONFIG_FILES([redhat/Makefile])
    229235AC_CONFIG_FILES([redhat/singular.spec])
    230 # AC_CONFIG_FILES([desktop/Singular.desktop])
    231 # AC_CONFIG_FILES([desktop/Singular-manual.desktop])
    232 
    233 AC_CONFIG_FILES([libsingular-config])
    234 
    235 AC_CONFIG_FILES([redhat/Makefile])
    236 AC_CONFIG_FILES([emacs/Makefile])
    237 AC_CONFIG_FILES([debian/Makefile])
    238236AC_CONFIG_FILES([desktop/Makefile])
    239237
  • desktop/Makefile.am

    r7f974f r42f2ad  
    66desktopdir = $(datadir)/applications
    77desktop_DATA = Singular.desktop Singular-manual.desktop
     8desktop_in = Singular.desktop.in Singular-manual.desktop.in
    89
    910substvars = sed \
     
    1516        $(AM_V_GEN) $(substvars) $(abs_srcdir)/Singular.desktop.in > $@
    1617
    17 #       $(do_subst) < $(srcdir)/automake.in > automake
    18 
    1918Singular-manual.desktop: $(abs_srcdir)/Singular-manual.desktop.in
    2019        $(AM_V_GEN) $(substvars) $(abs_srcdir)/Singular-manual.desktop.in > $@
    2120
    22 desktop_in = Singular.desktop.in Singular-manual.desktop.in
    23 
    2421EXTRA_DIST = $(icons_DATA) $(desktop_in)
    2522
    26 CLEANFILES = Singular.desktop Singular-manual.desktop
     23CLEANFILES = $(desktop_DATA)
  • libpolys/coeffs/coeffs.h

    r6c8ba3 r42f2ad  
    111111   /// output of coeff description via Print
    112112   void (*cfCoeffWrite)(const coeffs r, BOOLEAN details);
     113
     114   /// string output of coeff description
     115   char* (*cfCoeffString)(const coeffs r);
    113116
    114117   // ?
  • libpolys/coeffs/ffields.cc

    r6c8ba3 r42f2ad  
    819819}
    820820
     821static char* nfCoeffString(const coeffs r)
     822{
     823  const char *p=n_ParameterNames(r)[0];
     824  char *s=(char*)omAlloc(11+1+strlen(p));
     825  sprintf(s,"%d,%s",r->m_nfCharQ,p);
     826  return s;
     827}
     828
    821829BOOLEAN nfInitChar(coeffs r,  void * parameter)
    822830{
     
    824832  r->cfKillChar=nfKillChar;
    825833  r->nCoeffIsEqual=nfCoeffIsEqual;
     834  r->cfCoeffString=nfCoeffString;
    826835
    827836  r->cfMult  = nfMult;
  • libpolys/coeffs/gnumpc.cc

    r6c8ba3 r42f2ad  
    458458}
    459459
     460static char* ngcCoeffString(const coeffs r)
     461{
     462  const char *p=n_ParameterNames(r)[0];
     463  char *s=(char*)omAlloc(31+strlen(p));
     464  sprintf(s,"complex,%d,%d,%s",r->float_len,r->float_len2,p);
     465  return s;
     466}
     467
    460468BOOLEAN ngcInitChar(coeffs n, void* parameter)
    461469{
     
    464472  n->cfKillChar = ngcKillChar;
    465473  n->ch = 0;
     474  n->cfCoeffString=ngcCoeffString;
    466475
    467476  n->cfDelete  = ngcDelete;
  • libpolys/coeffs/gnumpfl.cc

    r6c8ba3 r42f2ad  
    402402}
    403403
     404static char* ngfCoeffString(const coeffs r)
     405{
     406  char *s=(char*)omAlloc(27);
     407  snprintf(s,27,"real,%d,%d",r->float_len,r->float_len2);
     408  return s;
     409}
     410
    404411BOOLEAN ngfInitChar(coeffs n, void *parameter)
    405412{
     
    410417  n->cfSetChar = ngfSetChar;
    411418  n->ch = 0;
     419  n->cfCoeffString=ngfCoeffString;
    412420 
    413421  n->cfDelete  = ngfDelete;
  • libpolys/coeffs/longrat.cc

    r6c8ba3 r42f2ad  
    28262826}
    28272827
     2828static char* nlCoeffString(const coeffs r)
     2829{
     2830  return omStrDup("0");
     2831}
     2832
    28282833BOOLEAN nlInitChar(coeffs r, void*)
    28292834{
     
    28332838  r->nCoeffIsEqual=ndCoeffIsEqual;
    28342839  r->cfKillChar = ndKillChar; /* dummy */
     2840  r->cfCoeffString=nlCoeffString;
    28352841
    28362842  r->cfInitMPZ = nlInitMPZ;
  • libpolys/coeffs/modulop.cc

    r6c8ba3 r42f2ad  
    425425}
    426426
     427static char* npCoeffString(const coeffs r)
     428{
     429  char *s=(char*)omAlloc(11);
     430  snprintf(s,11,"%d",r->ch);
     431  return s;
     432}
     433
    427434BOOLEAN npInitChar(coeffs r, void* p)
    428435{
     
    440447  r->cfKillChar=npKillChar;
    441448  r->nCoeffIsEqual=npCoeffsEqual;
     449  r->cfCoeffString=npCoeffString;
    442450
    443451  r->cfMult  = npMult;
  • libpolys/coeffs/numbers.cc

    r6c8ba3 r42f2ad  
    5050void   nNew(number* d) { *d=NULL; }
    5151void   ndDelete(number* d, const coeffs) { *d=NULL; }
     52char* ndCoeffString(const coeffs r)
     53{
     54  char *s=(char *)omAlloc(11);snprintf(s,11,"Coeffs(%d)",r->type);
     55  return s;
     56}
    5257void   ndInpMult(number &a, number b, const coeffs r)
    5358{
     
    323328    n->cfImPart=ndReturn0;
    324329    n->cfDelete= ndDelete;
     330    n->cfCoeffString = ndCoeffString; // should alway be changed!
    325331    n->cfInpMult=ndInpMult;
    326332    n->cfInpAdd=ndInpAdd;
     
    385391    assume(n->nCoeffIsEqual!=NULL);
    386392    assume(n->cfSetChar!=NULL);
     393    assume(n->cfCoeffString!=ndCoeffString);
    387394    assume(n->cfMult!=NULL);
    388395    assume(n->cfSub!=NULL);
     
    451458    if(n->cfWriteLong==NULL) Warn("cfWrite is NULL for coeff %d",t);
    452459    if(n->cfWriteShort==NULL) Warn("cfWriteShort is NULL for coeff %d",t);
     460    if(n->cfCoeffString==ndCoeffString) Warn("cfCoeffString is undefined for coeff %d",t);
    453461#endif
    454462     
  • libpolys/coeffs/rintegers.cc

    r6c8ba3 r42f2ad  
    383383}
    384384
     385static char* nrzCoeffString(const coeffs r)
     386{
     387  return omStrDup("integer");
     388}
    385389
    386390BOOLEAN nrzInitChar(coeffs r,  void *)
     
    388392  assume( getCoeffType(r) == ID );
    389393  r->nCoeffIsEqual = ndCoeffIsEqual;
     394  r->cfCoeffString = nrzCoeffString;
    390395  r->cfKillChar = ndKillChar;
    391396  r->cfMult  = nrzMult;
  • libpolys/coeffs/rmodulo2m.cc

    r6c8ba3 r42f2ad  
    4646  return FALSE;
    4747}
     48
     49static char* nr2mCoeffString(const coeffs r)
     50{
     51  char* s = (char*) omAlloc(11+11);
     52  sprintf(s,"integer,2,%lu",r->modExponent);
     53  return s;
     54}
     55
    4856/* for initializing function pointers */
    4957BOOLEAN nr2mInitChar (coeffs r, void* p)
     
    5361  r->cfKillChar    = ndKillChar; /* dummy*/
    5462  r->nCoeffIsEqual = nr2mCoeffIsEqual;
     63  r->cfCoeffString = nr2mCoeffString;
    5564
    5665  r->modBase = (int_number) omAllocBin (gmp_nrz_bin);
  • libpolys/coeffs/rmodulon.cc

    r6c8ba3 r42f2ad  
    4747}
    4848
     49static char* nrnCoeffString(const coeffs r)
     50{
     51  long l = (long)mpz_sizeinbase(r->modBase, 10) +2;
     52  char* b = (char*) omAlloc(l);
     53  b= mpz_get_str (b, 10, r->modBase);
     54  char* s = (char*) omAlloc(7+2+10+l);
     55  if (nCoeff_is_Ring_ModN(r)) sprintf(s,"integer,%s",b);
     56  else /*if (nCoeff_is_Ring_PtoM(r))*/ sprintf(s,"integer,%s^%lu",b,r->modExponent);
     57  omFreeSize(b,l);
     58  return s;
     59}
    4960
    5061/* for initializing function pointers */
     
    6071     is a GMP number */
    6172  r->ch = mpz_get_ui(r->modNumber);
     73
     74  r->cfCoeffString = nrnCoeffString;
    6275
    6376  r->cfInit        = nrnInit;
  • libpolys/coeffs/shortfl.cc

    r6c8ba3 r42f2ad  
    630630}
    631631
     632static char* nrCoeffString(const coeffs r)
     633{
     634  return omStrDup("real");
     635}
     636
    632637BOOLEAN nrInitChar(coeffs n, void* p)
    633638{
     
    638643  n->cfKillChar = ndKillChar; /* dummy */
    639644  n->ch = 0;
     645  n->cfCoeffString = nrCoeffString;
    640646
    641647  n->cfInit = nrInit;
  • libpolys/polys/ext_fields/algext.cc

    r6c8ba3 r42f2ad  
    13271327}
    13281328
    1329 
     1329char* naCoeffString(const coeffs r) // currently also for tranext.
     1330{
     1331  const char* const* p=n_ParameterNames(r);
     1332  int l=0;
     1333  int i;
     1334  for(i=0; i<n_NumberOfParameters(r);i++)
     1335  {
     1336    l+=(strlen(p[i])+1);
     1337  }
     1338  char *s=(char *)omAlloc(l+10+1);
     1339  s[0]='\0';
     1340  snprintf(s,10+1,"%d",r->ch); /* Fp(a) or Q(a) */
     1341  char tt[2];
     1342  tt[0]=',';
     1343  tt[1]='\0';
     1344  for(i=0; i<n_NumberOfParameters(r);i++)
     1345  {
     1346    strcat(s,tt);
     1347    strcat(s,p[i]);
     1348  }
     1349  return s;
     1350}
    13301351
    13311352BOOLEAN naInitChar(coeffs cf, void * infoStruct)
     
    13581379  p_Test((poly)naMinpoly, naRing);
    13591380  #endif
     1381
     1382  cf->cfCoeffString = naCoeffString;
    13601383
    13611384  cf->cfGreaterZero  = naGreaterZero;
  • libpolys/polys/ext_fields/transext.cc

    r6c8ba3 r42f2ad  
    23652365  cf->ch = R->cf->ch;
    23662366  cf->factoryVarOffset = R->cf->factoryVarOffset + rVar(R);
     2367  extern char* naCoeffString(const coeffs r);
     2368  cf->cfCoeffString = naCoeffString;
    23672369
    23682370  cf->cfGreaterZero  = ntGreaterZero;
  • libpolys/polys/monomials/ring.cc

    r6c8ba3 r42f2ad  
    619619/// Decompose & Compose, rParameter & rPar
    620620char * rCharStr(ring r)
    621 {
    622   char *s;
    623   int i;
    624 
    625 #ifdef HAVE_RINGS
    626   if (rField_is_Ring_Z(r))
    627   {
    628     s=omStrDup("integer");                   // Z
    629     return s;
    630   }
    631   if(rField_is_Ring_2toM(r))
    632   {
    633     char* s = (char*) omAlloc(7+10+2);
    634     sprintf(s,"integer,%lu",r->cf->modExponent);
    635     return s;
    636   }
    637   if(rField_is_Ring_ModN(r))
    638   {
    639     long l = (long)mpz_sizeinbase(r->cf->modBase, 10) + 2+7;
    640     char* s = (char*) omAlloc(l);
    641     gmp_sprintf(s,"integer,%Zd",r->cf->modBase);
    642     return s;
    643   }
    644   if(rField_is_Ring_PtoM(r))
    645   {
    646     long l = (long)mpz_sizeinbase(r->cf->modBase, 10) + 2+7+10;
    647     char* s = (char*) omAlloc(l);
    648     gmp_sprintf(s,"integer,%Zd^%lu",r->cf->modBase,r->cf->modExponent);
    649     return s;
    650   }
    651 #endif
    652   if (rField_is_long_R(r))
    653   {
    654     i = MAX_INT_LEN*2+7; // 2 integers and real,,
    655     s=(char *)omAlloc(i);
    656     snprintf(s,i,"real,%d,%d",r->cf->float_len,r->cf->float_len2); /* long_R */
    657     return s;
    658   }
    659   if (rField_is_R(r))
    660   {
    661     return omStrDup("real"); /* short real */
    662   }
    663   char const * const * const params = rParameter(r);
    664   if (params==NULL)
    665   {
    666     s=(char *)omAlloc(MAX_INT_LEN+1);
    667     snprintf(s,MAX_INT_LEN+1,"%d",n_GetChar(r->cf));         /* Q, Z/p */
    668     return s;
    669   }
    670   if (rField_is_long_C(r))
    671   {
    672     i=strlen(params[0])+21;
    673     s=(char *)omAlloc(i);
    674     snprintf(s,i,"complex,%d,%s",r->cf->float_len,params[0]);   /* C */
    675     return s;
    676   }
    677   if (nCoeff_is_GF(r->cf))
    678   {
    679     i=strlen(params[0])+21;
    680     s=(char *)omAlloc(i);
    681     snprintf(s,i,"%d,%s",r->cf->m_nfCharQ,params[0]); /* GF(q)  */
    682     return s;
    683   }
    684   int l=0;
    685   for(i=0; i<rPar(r);i++)
    686   {
    687     l+=(strlen(params[i])+1);
    688   }
    689   s=(char *)omAlloc((long)(l+MAX_INT_LEN+1));
    690   s[0]='\0';
    691   snprintf(s,MAX_INT_LEN+1,"%d",r->cf->ch); /* Fp(a) or Q(a) */
    692   char tt[2];
    693   tt[0]=',';
    694   tt[1]='\0';
    695   for(i=0; i<rPar(r);i++)
    696   {
    697     strcat(s,tt);
    698     strcat(s,params[i]);
    699   }
    700   return s;
    701 }
     621{ return r->cf->cfCoeffString(r->cf); }
    702622
    703623char * rParStr(ring r)
  • redhat/Makefile.am

    r7f974f r42f2ad  
    33REDHAT = singular.spec
    44       
    5 EXTRA_DIST = singular.spec
     5EXTRA_DIST = $(REDHAT)
     6
    67CLEANFILES = $(REDHAT)
Note: See TracChangeset for help on using the changeset viewer.