Changeset 610881 in git


Ignore:
Timestamp:
Feb 20, 2009, 7:39:21 PM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b52fc4b2495505785981d640dcf7eb3e456778ef')
Children:
29102a3e11d1517325e49708df7e7dad15950eec
Parents:
14ec8feac299623426d7fed980ed57de208d4e46
Message:
*hannes: attr also for aliases, unified found handling


git-svn-id: file:///usr/local/Singular/svn/trunk@11415 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/subexpr.cc

    r14ec8fe r610881  
    55* ABSTRACT: handling of leftv
    66*/
    7 /* $Id: subexpr.cc,v 1.102 2008-08-13 15:16:23 Singular Exp $ */
     7/* $Id: subexpr.cc,v 1.103 2009-02-20 18:39:21 Singular Exp $ */
    88
    99#include <stdlib.h>
     
    12701270//    Print("search %s in %s\n",id,v->req_packhdl->libname);
    12711271#endif /* HAVE_NS */
     1272  idhdl h=NULL;
    12721273#ifdef SIQ
    12731274  if (siq<=0)
    12741275#endif
    12751276  {
    1276     idhdl h=NULL;
    12771277    if (!isdigit(id[0]))
    12781278    {
     
    12821282        {
    12831283          if (id!=IDID(currRingHdl)) omFree((ADDRESS)id);
    1284           v->rtyp = IDHDL;
    1285           v->data = (char *)currRingHdl;
    1286           v->name = IDID(currRingHdl);
    1287           v->flag = IDFLAG(currRingHdl);
    1288           return;
     1284          h=currRingHdl;
     1285          goto id_found;
    12891286        }
    12901287        else
     
    12951292      }
    12961293#ifdef HAVE_NS
    1297       if (strcmp(id,"Current")==0)
     1294      else if (strcmp(id,"Current")==0)
    12981295      {
    12991296        if (currPackHdl!=NULL)
    13001297        {
    13011298          omFree((ADDRESS)id);
    1302           v->rtyp = IDHDL;
    1303           v->data = (char *)currPackHdl;
    1304           v->name = IDID(currPackHdl);
    1305           v->flag = IDFLAG(currPackHdl);
    1306           return;
     1299          h=currPackHdl;
     1300          goto id_found;
    13071301        }
    13081302        else
     
    13231317      {
    13241318        if (id!=IDID(h)) omFree((ADDRESS)id);
    1325         v->rtyp = IDHDL;
    1326         v->data = (char *)h;
    1327         v->flag = IDFLAG(h);
    1328         v->name = IDID(h);
    1329         v->attribute=IDATTR(h);
    1330         return;
     1319        goto id_found;
    13311320      }
    13321321    }
     
    13501339    {
    13511340      if (id!=IDID(h)) omFree((ADDRESS)id);
    1352       v->rtyp = IDHDL;
    1353       v->data = (char *)h;
    1354       v->flag = IDFLAG(h);
    1355       v->name = IDID(h);
    1356       v->attribute=IDATTR(h);
    1357       return;
     1341      goto id_found;
    13581342    }
    13591343    /* 6. local ring: number/poly */
     
    14381422      {
    14391423        if (IDID(currRingHdl)!=id) omFree((ADDRESS)id);
    1440         v->rtyp=IDHDL;
    1441         v->data=currRingHdl;
    1442         v->name=IDID(currRingHdl);
    1443         v->attribute=IDATTR(currRingHdl);
    1444         return;
     1424        h=currRingHdl;
     1425        goto id_found;
    14451426      }
    14461427    }
     
    14521433      {
    14531434        if (id!=IDID(h)) omFree((ADDRESS)id);
    1454         v->rtyp = IDHDL;
    1455         v->data = (char *)h;
    1456         v->flag = IDFLAG(h);
    1457         v->name = IDID(h);
    1458         v->attribute=IDATTR(h);
    14591435        v->req_packhdl=basePack;
    1460         return;
     1436        goto id_found;
    14611437      }
    14621438    }
     
    14791455    v->name = id;
    14801456  }
     1457  return;
     1458id_found: // we have an id (in h) found, to set the data in from h
     1459  v->rtyp = IDHDL;
     1460  v->data = (char *)h;
     1461  v->flag = IDFLAG(h);
     1462  v->name = IDID(h);
     1463  v->attribute=IDATTR(h);
    14811464}
    14821465
Note: See TracChangeset for help on using the changeset viewer.