source: git/Singular/denom_list.cc @ e3c628

spielwiese
Last change on this file since e3c628 was eb6abd, checked in by Hans Schoenemann <hannes@…>, 7 years ago
fix: clean DENOMINATOR_LIST when changing/killing the base ring
  • Property mode set to 100644
File size: 479 bytes
Line 
1
2
3
4#include "kernel/mod2.h"
5#include "kernel/GBEngine/kutil.h"
6#include "Singular/lists.h"
7
8lists get_denom_list()
9{
10  int size;
11  denominator_list d = DENOMINATOR_LIST;
12  size=0;
13  while(d!=NULL)
14  {
15    size++;
16    d=d->next;
17  }
18  lists l=(lists)omAlloc(sizeof(*l));
19  l->Init(size);
20  d=DENOMINATOR_LIST;
21  for (int i=0;i<size;i++)
22  {
23    l->m[i].rtyp=NUMBER_CMD;
24    l->m[i].data=d->n;
25    d=d->next;
26    omFree(DENOMINATOR_LIST);
27    DENOMINATOR_LIST=d;
28  }
29  return l;
30}
Note: See TracBrowser for help on using the repository browser.