source: git/Singular/denom_list.cc @ 16f511

spielwiese
Last change on this file since 16f511 was 16f511, checked in by Oleksandr Motsak <motsak@…>, 11 years ago
Fixed the usage of "config.h" (if defined HAVE_CONFIG_H)
  • Property mode set to 100644
File size: 554 bytes
Line 
1#ifdef HAVE_CONFIG_H
2#include "config.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.