Changeset d5add65 in git


Ignore:
Timestamp:
Nov 16, 2011, 4:00:01 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
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
Location:
Singular
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r9875202 rd5add65  
    45424542{
    45434543  res->data=ipNameList(((ring)v->Data())->idroot);
     4544  return FALSE;
     4545}
     4546static BOOLEAN jjNAMES_I(leftv res, leftv v)
     4547{
     4548  res->data=ipNameListLev((IDROOT),(int)(long)v->Data());
    45444549  return FALSE;
    45454550}
  • 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
  • Singular/ipid.h

    r9875202 rd5add65  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
     6
    67/*
    78* ABSTRACT: identfier handling
     
    9899void  killhdl2(idhdl h, idhdl * ih, ring r);
    99100lists ipNameList(idhdl root);
     101lists ipNameListLev(idhdl root, int lev);
    100102void  ipMoveId(idhdl h);
    101103BOOLEAN checkPackage(package pack);
  • Singular/table.h

    r9875202 rd5add65  
    189189,{D(jjMSTD),       MSTD_CMD,        LIST_CMD,       MODUL_CMD     , NO_PLURAL |ALLOW_RING}
    190190,{D(jjNAMEOF),     NAMEOF_CMD,      STRING_CMD,     ANY_TYPE      , ALLOW_PLURAL |ALLOW_RING}
     191,{D(jjNAMES_I),    NAMES_CMD,       LIST_CMD,       INT_CMD       , ALLOW_PLURAL |ALLOW_RING}
    191192,{D(jjNAMES),      NAMES_CMD,       LIST_CMD,       PACKAGE_CMD   , ALLOW_PLURAL |ALLOW_RING}
    192193,{D(jjNAMES),      NAMES_CMD,       LIST_CMD,       RING_CMD      , ALLOW_PLURAL |ALLOW_RING}
Note: See TracChangeset for help on using the changeset viewer.