source: git/libpolys/polys/prCopyTemplate.cc @ 6caad65

spielwiese
Last change on this file since 6caad65 was 6caad65, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
warnings elimination chg: uninitialized fake variables chg: "'const' type qualifier on return type has no effect" for numeric/ chg: more minor warnings elimination
  • Property mode set to 100644
File size: 735 bytes
Line 
1/****************************************
2*  Computer Algebra System SINGULAR     *
3****************************************/
4/*
5* ABSTRACT - templates for pr routines
6*/
7
8
9static poly PR_NAME
10(poly &src, ring r_src, ring r_dest)
11{
12  spolyrec dest_s;
13  poly dest = &dest_s;
14  poly tmp;
15  PR_INIT_EVECTOR_COPY(r_src, r_dest);
16
17  while (src != NULL)
18  {
19    pNext(dest) = (poly) PR_ALLOC_MONOM(r_dest);
20    pIter(dest);
21    pSetCoeff0(dest, PR_NCOPY(pGetCoeff(src), r_src));
22    PR_CPY_EVECTOR(dest, r_dest, src, r_src);
23    tmp = pNext(src);
24    PR_DELETE_MONOM(src, r_src);
25    src = tmp;
26  }
27  pNext(dest) = NULL;
28  dest = pNext(&dest_s);
29  PR_SORT_POLY(dest, r_dest, r_src);
30  p_Test(dest, r_dest);
31  return dest;
32  (void)(r_src);
33}
Note: See TracBrowser for help on using the repository browser.