Changeset 4ad0d6 in git for Singular/ipid.cc


Ignore:
Timestamp:
Jul 21, 1998, 7:18:19 PM (26 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
0d09b74c44f80a4e38a69d9155eb393b81538ee7
Parents:
14236163c0be8d199836dd2bdc6edc8b993636d0
Message:
* hannes: fixes for TCL (qring,...)


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

Legend:

Unmodified
Added
Removed
  • Singular/ipid.cc

    r142361 r4ad0d6  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipid.cc,v 1.12 1998-06-13 12:44:40 krueger Exp $ */
     4/* $Id: ipid.cc,v 1.13 1998-07-21 17:18:19 Singular Exp $ */
    55
    66/*
     
    123123      case RESOLUTION_CMD:
    124124        len=sizeof(ssyStrategy);
    125         break;   
     125        break;
     126      case PROC_CMD:
     127        len=sizeof(procinfo);
     128        break;
    126129    //other types: without init (int,script,poly,def,package)
    127130    }
     
    131134    }
    132135  }
    133   if(t == PROC_CMD)
    134   {
    135     IDPROC(h) = (procinfo *)Alloc(sizeof(procinfo));
    136     memset(IDPROC(h),0,sizeof(*IDPROC(h)));
     136  // additional settings:--------------------------------------
     137  if (t == QRING_CMD)
     138  {
     139    IDRING(h)=rCopy(currRing);
     140    /* QRING_CMD is ring dep => currRing !=NULL */
     141  }
     142  else if (t == PROC_CMD)
     143  {
    137144    IDPROC(h)->language=LANG_NONE;
    138145  }
     146  // --------------------------------------------------------
    139147  return  h;
    140148}
     
    570578    FreeL((ADDRESS)pi->libname);
    571579    FreeL((ADDRESS)pi->procname);
    572     if( pi->language == LANG_SINGULAR) {
     580    if( pi->language == LANG_SINGULAR)
     581    {
    573582      FreeL((ADDRESS)pi->data.s.body);
    574583    }
    575     if( pi->language == LANG_C) {
     584    if( pi->language == LANG_C)
     585    {
    576586    }
    577587    memset((void *) pi, 0, sizeof(procinfo));
     
    600610  namehdl ns = (namerec *)Alloc0(sizeof(namerec));
    601611  ns->next   = this;
    602   if(this==NULL && !init) {
     612  if(this==NULL && !init)
     613  {
    603614    printf("PUSH: this is NULL and init not set.\n");
    604615    init=TRUE;
    605616  }
    606   if(init) {
     617  if(init)
     618  {
    607619    ns->pack   = (ip_package *)Alloc0(sizeof(ip_package));
    608620    ns->isroot = TRUE;
    609621    ns->lev    = 1;
    610   } else {
     622  }
     623  elses
     624  {
    611625    ns->pack   = pack;
    612626    ns->lev    = this->lev+1;
     
    618632  if(ns->isroot) ns->root=ns; else ns->root = this->root;
    619633  namespaceroot = ns;
    620   if(init && ns->isroot) {
    621     idhdl pl = enterid( mstrdup("toplevel"),0, PACKAGE_CMD,
     634  if(init && ns->isroot)
     635  {
     636    idhdl pl = enterid( mstrdup("toplevel"),0, PACKAGE_CMD,
    622637                      &NSROOT(namespaceroot), TRUE );
    623    
    624638  }
    625639  return(namespaceroot);
Note: See TracChangeset for help on using the changeset viewer.