source: git/Singular/denom_list.cc @ 1101a8

spielwiese
Last change on this file since 1101a8 was ba5e9e, checked in by Oleksandr Motsak <motsak@…>, 11 years ago
Changed configure-scripts to generate individual public config files for each package: resources, libpolys, singular (main) fix: sources should include correct corresponding config headers.
  • Property mode set to 100644
File size: 562 bytes
Line 
1#ifdef HAVE_CONFIG_H
2#include "singularconfig.h"
3#endif /* HAVE_CONFIG_H */
4#include <kernel/mod2.h>
5#include <kernel/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!=0)
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.