fieker-DuValspielwiese
Last change
on this file since fa8122 was
a3bc95e,
checked in by Hans Schönemann <hannes@…>, 23 years ago
|
*hannes: namespaces ->ns
git-svn-id: file:///usr/local/Singular/svn/trunk@5651 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[9d72fe] | 1 | /**************************************** |
---|
| 2 | * Computer Algebra System SINGULAR * |
---|
| 3 | ****************************************/ |
---|
| 4 | /*************************************************************** |
---|
| 5 | * File: p_ShallowCopyDelete__Template.cc |
---|
| 6 | * Purpose: template for p_ShallowCopyDelete |
---|
| 7 | * Author: obachman (Olaf Bachmann) |
---|
| 8 | * Created: 8/00 |
---|
[a3bc95e] | 9 | * Version: $Id: p_ShallowCopyDelete__T.cc,v 1.3 2001-10-09 16:36:17 Singular Exp $ |
---|
[9d72fe] | 10 | *******************************************************************/ |
---|
| 11 | |
---|
| 12 | /*************************************************************** |
---|
| 13 | * |
---|
| 14 | * Destroys: p |
---|
[a3bc95e] | 15 | * Assumes: Monoms of p are from |
---|
| 16 | * Returns: |
---|
[9d72fe] | 17 | ***************************************************************/ |
---|
[7e5a38] | 18 | LINKAGE poly p_ShallowCopyDelete(poly s_p, const ring r, omBin d_bin) |
---|
[9d72fe] | 19 | { |
---|
| 20 | spolyrec dp; |
---|
| 21 | poly d_p = &dp; |
---|
| 22 | unsigned long* s_e; |
---|
| 23 | poly h; |
---|
[a3bc95e] | 24 | |
---|
[4e6cf2] | 25 | DECLARE_LENGTH(const unsigned long length = r->ExpL_Size); |
---|
[9d72fe] | 26 | |
---|
| 27 | while (s_p != NULL) |
---|
| 28 | { |
---|
[233e4c] | 29 | p_AllocBin(d_p->next, d_bin, r); |
---|
[9d72fe] | 30 | pIter(d_p); |
---|
| 31 | pSetCoeff0(d_p, pGetCoeff(s_p)); |
---|
| 32 | h = s_p; |
---|
| 33 | s_p = pNext(s_p); |
---|
[a6a239] | 34 | p_MemCopy(d_p->exp, h->exp, length); |
---|
[512a2b] | 35 | p_FreeBinAddr(h, r); |
---|
[9d72fe] | 36 | } |
---|
| 37 | pNext(d_p) = NULL; |
---|
| 38 | return dp.next; |
---|
| 39 | } |
---|
| 40 | |
---|
Note: See
TracBrowser
for help on using the repository browser.