source: git/libpolys/polys/templates/p_ShallowCopyDelete__T.cc @ 5a3ae8

spielwiese
Last change on this file since 5a3ae8 was 38500a, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
- further template fix: added "__T" suffix to _all_ labels (incl. func. names!) - todo: finish p_Numbers.h
  • Property mode set to 100644
File size: 1.0 KB
Line 
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
9 *  Version: $Id$
10 *******************************************************************/
11
12/***************************************************************
13 *
14 * Destroys: p
15 * Assumes:  Monoms of p are from
16 * Returns:
17 ***************************************************************/
18LINKAGE poly p_ShallowCopyDelete__T(poly s_p, const ring r, omBin d_bin)
19{
20  spolyrec dp;
21  poly d_p = &dp;
22  poly h;
23
24  DECLARE_LENGTH(const unsigned long length = r->ExpL_Size);
25
26  while (s_p != NULL)
27  {
28    p_AllocBin(d_p->next, d_bin, r);
29    pIter(d_p);
30    pSetCoeff0(d_p, pGetCoeff(s_p));
31    h = s_p;
32    s_p =  pNext(s_p);
33    p_MemCopy__T(d_p->exp, h->exp, length);
34    p_FreeBinAddr(h, r);
35  }
36  pNext(d_p) = NULL;
37  return dp.next;
38}
39
Note: See TracBrowser for help on using the repository browser.