source: git/kernel/polys.cc @ e12050

jengelh-datetimespielwiese
Last change on this file since e12050 was e12050, checked in by Oleksandr Motsak <motsak@…>, 11 years ago
fixing bugs due to rChangeCurrRing(0) TODO: why all of this was commented out???!
  • Property mode set to 100644
File size: 1.4 KB
Line 
1#include "config.h"
2#include "mod2.h"
3
4#include <omalloc/omalloc.h>
5#include <misc/auxiliary.h>
6#include <misc/options.h>
7
8#include "polys.h"
9
10ring  currRing = NULL;
11ideal currQuotient = NULL;
12
13void rChangeCurrRing(ring r)
14{
15  if( r != NULL )
16  {
17    rTest(r);   
18
19    //------------ set global ring vars --------------------------------
20    currRing = r;
21    currQuotient = r->qideal;
22    //------------ global variables related to coefficients ------------
23    assume( r->cf!= NULL );
24    nSetChar(r->cf);
25    //------------ global variables related to polys
26    p_SetGlobals(r);
27    //------------ global variables related to factory -----------------
28  } else
29  {
30    currRing = NULL;
31    currQuotient = NULL;
32  }
33}
34/*
35/// internally changes the gloabl ring and resets the relevant
36/// global variables:
37/// SHOULD BE DEPRECATED NOW...?
38void rChangeCurrRing(ring r)
39{
40 // if (!rMinpolyIsNULL(currRing))
41 // {
42 //   omCheckAddr(currRing->cf->minpoly);
43 // }
44  //------------ set global ring vars --------------------------------
45  //currRing = r;
46  //currQuotient=NULL;
47  if (r != NULL)
48  {
49    rTest(r);
50    //------------ set global ring vars --------------------------------
51    //currQuotient=r->qideal;
52
53    //------------ global variables related to coefficients ------------
54    nSetChar(r->cf);
55
56    //------------ global variables related to polys -------------------
57    p_SetGlobals(r);
58    //------------ global variables related to factory -----------------
59  }
60}
61*/
Note: See TracBrowser for help on using the repository browser.