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