Changeset a41f4b6 in git


Ignore:
Timestamp:
Nov 9, 2010, 11:12:51 AM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ba3e3ef698fa0b7c5867199959cc83330073d3cb')
Children:
3a28ffd8f74584ab2ed394ff3d3c22bb6670fa61
Parents:
fbbb08becdc8fd9fbb911c8b7b74de5c2f52d7ad
Message:
factoryError, factoryError_callback

git-svn-id: file:///usr/local/Singular/svn/trunk@13611 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
factory
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_char.cc

    rfbbb08 ra41f4b6  
    1212#include "cf_primes.h"
    1313#include "cf_binom.h"
     14#include "cf_util.h"
    1415#ifdef SINGULAR
    15 #include "singext.h"
     16//#include "singext.h"
    1617#endif
    1718
     
    4041        theCharacteristic = c;
    4142        ff_big = c > cf_getSmallPrime( cf_getNumSmallPrimes()-1 );
    42 #ifdef SINGULAR
    43         if (!errorreported && (c > 536870909)) Werror("characteristic %d is too large(max is 2^29)",c);
    44 #endif
     43        if (c > 536870909) factoryError("characteristic is too large(max is 2^29)");
    4544        ff_setprime( c );
    4645        resetFPT();
  • factory/cf_util.cc

    rfbbb08 ra41f4b6  
    4747  return n;
    4848}
     49
     50#include<stdio.h>
     51
     52void (*factoryError_callback)(const char *s) = 0;
     53
     54void factoryError(const char *s)
     55{
     56  if (factoryError_callback!=0) factoryError_callback(s);
     57  else fprintf(stderr,s);
     58}
     59
  • factory/cf_util.h

    rfbbb08 ra41f4b6  
    1616int ilog2 (int a);
    1717
     18extern void (*factoryError_callback)(const char *s);
     19
     20void factoryError(const char *s);
    1821
    1922#endif /* ! INCL_CF_UTIL_H */
Note: See TracChangeset for help on using the changeset viewer.