source: git/libpolys/polys/templates/p_ShallowCopyDelete__T.cc @ 6ce030f

spielwiese
Last change on this file since 6ce030f was 6ce030f, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
removal of the $Id$ svn tag from everywhere NOTE: the git SHA1 may be used instead (only on special places) NOTE: the libraries Singular/LIB/*.lib still contain the marker due to our current use of svn
  • 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 *******************************************************************/
10
11/***************************************************************
12 *
13 * Destroys: p
14 * Assumes:  Monoms of p are from
15 * Returns:
16 ***************************************************************/
17LINKAGE poly p_ShallowCopyDelete__T(poly s_p, const ring r, omBin d_bin)
18{
19  spolyrec dp;
20  poly d_p = &dp;
21  poly h;
22
23  DECLARE_LENGTH(const unsigned long length = r->ExpL_Size);
24
25  while (s_p != NULL)
26  {
27    p_AllocBin(d_p->next, d_bin, r);
28    pIter(d_p);
29    pSetCoeff0(d_p, pGetCoeff(s_p));
30    h = s_p;
31    s_p =  pNext(s_p);
32    p_MemCopy__T(d_p->exp, h->exp, length);
33    p_FreeBinAddr(h, r);
34  }
35  pNext(d_p) = NULL;
36  return dp.next;
37}
38
Note: See TracBrowser for help on using the repository browser.