spielwiese
Last change
on this file since ed47aab was
762407,
checked in by Oleksandr Motsak <motsak@…>, 12 years ago
|
config.h is for sources files only
FIX: config.h should only be used by source (not from inside kernel/mod2.h!)
NOTE: each source file should better include mod2.h right after config.h,
while headers should better not include mod2.h.
|
-
Property mode set to
100644
|
File size:
506 bytes
|
Line | |
---|
1 | #include "config.h" |
---|
2 | #include <kernel/mod2.h> |
---|
3 | #include <kernel/kutil.h> |
---|
4 | #include <Singular/lists.h> |
---|
5 | |
---|
6 | lists get_denom_list() |
---|
7 | { |
---|
8 | int size; |
---|
9 | denominator_list d = DENOMINATOR_LIST; |
---|
10 | size=0; |
---|
11 | while(d!=0) |
---|
12 | { |
---|
13 | size++; |
---|
14 | d=d->next; |
---|
15 | } |
---|
16 | lists l=(lists)omAlloc(sizeof(*l)); |
---|
17 | l->Init(size); |
---|
18 | d=DENOMINATOR_LIST; |
---|
19 | for (int i=0;i<size;i++) |
---|
20 | { |
---|
21 | l->m[i].rtyp=NUMBER_CMD; |
---|
22 | l->m[i].data=d->n; |
---|
23 | d=d->next; |
---|
24 | omFree(DENOMINATOR_LIST); |
---|
25 | DENOMINATOR_LIST=d; |
---|
26 | } |
---|
27 | return l; |
---|
28 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.