Changeset d5add65 in git for Singular/ipid.cc


Ignore:
Timestamp:
Nov 16, 2011, 4:00:01 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
b565d4f69d962cf1746a77db46934de7cc17f5e4
Parents:
9875202a2c72496bbc39676b4ca272ba4da36c09
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-11-16 16:00:01+01:00
git-committer:
Martin Lee <martinlee84@web.de>2013-01-18 16:15:04+01:00
Message:
add: names(int level) added

Conflicts:

	Singular/iparith.cc
	Singular/ipid.cc
	Singular/ipid.h
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipid.cc

    r9875202 rd5add65  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
     4
    45/*
    56* ABSTRACT: identfier handling
     
    519520}
    520521
     522lists ipNameListLev(idhdl root, int lev)
     523{
     524  idhdl h=root;
     525  /* compute the length */
     526  int l=0;
     527  while (h!=NULL) { if (IDLEV(h)==lev) l++; h=IDNEXT(h); }
     528  /* allocate list */
     529  lists L=(lists)omAllocBin(slists_bin);
     530  L->Init(l);
     531  /* copy names */
     532  h=root;
     533  l=0;
     534  while (h!=NULL)
     535  {
     536    if (IDLEV(h)==lev)
     537    {
     538      /* list is initialized with 0 => no need to clear anything */
     539      L->m[l].rtyp=STRING_CMD;
     540      L->m[l].data=omStrDup(IDID(h));
     541      l++;
     542    }
     543    h=IDNEXT(h);
     544  }
     545  return L;
     546}
     547
    521548/*
    522549* move 'tomove' from root1 list to root2 list
Note: See TracChangeset for help on using the changeset viewer.