Changeset f2dff02 in git


Ignore:
Timestamp:
Mar 26, 2001, 9:30:24 PM (22 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
355f86ae1e09b962323c4d49da60c5aa3a7eb6c5
Parents:
1bd25e34e1c021af2213fdd6edb61b9aa82fa6ca
Message:
*hannes: CleanUp does a memset


git-svn-id: file:///usr/local/Singular/svn/trunk@5342 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r1bd25e rf2dff02  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iparith.cc,v 1.260 2001-03-05 18:25:47 mschulze Exp $ */
     4/* $Id: iparith.cc,v 1.261 2001-03-26 19:30:20 Singular Exp $ */
    55
    66/*
     
    14481448  memcpy(u->next,v,sizeof(sleftv));
    14491449  BOOLEAN r=iiExprArithM(res,u,iiOp);
    1450   v->rtyp=0; v->data=NULL; // iiExprArithM did the CleanUp
     1450  // iiExprArithM did the CleanUp
    14511451  return r;
    14521452}
     
    40084008  memcpy(u->next->next,w,sizeof(sleftv));
    40094009  BOOLEAN r=iiExprArithM(res,u,iiOp);
    4010   v->rtyp=0; v->data=NULL; // iiExprArithM did the CleanUp
     4010  // iiExprArithM did the CleanUp
    40114011  w->rtyp=0; w->data=NULL;
    40124012  return r;
  • Singular/ipid.cc

    r1bd25e rf2dff02  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipid.cc,v 1.46 2000-12-06 11:03:15 Singular Exp $ */
     4/* $Id: ipid.cc,v 1.47 2001-03-26 19:30:21 Singular Exp $ */
    55
    66/*
     
    517517        {
    518518          sLastPrinted.CleanUp();
    519           memset(&sLastPrinted,0,sizeof(sleftv));
    520519        }
    521520      }
     
    901900      hdh = temp;
    902901    }
    903     if(checkPackage(pack)) {
     902    if(checkPackage(pack))
     903    {
    904904      paCleanUp(pack);
    905905      omFreeBin((ADDRESS)pack,  sip_package_bin);
    906     } else return FALSE;
    907   } else paCleanUp(pack);
     906    }
     907    else return FALSE;
     908  }
     909  else paCleanUp(pack);
    908910  return TRUE;
    909911}
  • Singular/iplib.cc

    r1bd25e rf2dff02  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iplib.cc,v 1.81 2001-03-26 18:11:53 Singular Exp $ */
     4/* $Id: iplib.cc,v 1.82 2001-03-26 19:30:22 Singular Exp $ */
    55/*
    66* ABSTRACT: interpreter: LIB and help
     
    5757char * iiGetLibName(procinfov pi)
    5858{
    59   char *res=NULL;
    60 
    61   res = pi->libname;
    62   return res;
    63 }
     59  return pi->libname;
     60}
     61
    6462/*2
    6563* given a line 'proc[ ]+{name}[ \t]*'
     
    102100  BOOLEAN args_found;
    103101  char *s;
    104   char *argstr=(char *)omAlloc(124);
    105   int argstrlen=124;
     102  char *argstr=(char *)omAlloc(127); // see ../omalloc/omTables.inc
     103  int argstrlen=127;
    106104  *argstr='\0';
    107105  do
     
    379377  if(pi->is_static)
    380378  {
    381     if(ns==NULL)
    382     {
    383       Werror("'%s::%s()' 1 is a local procedure and cannot be accessed by an user.",
    384              plib, pi->procname);
    385       omFree(plib);
    386       return NULL;
    387     }
    388     if(strcmp(plib, namespaceroot->name)!= 0)
    389     {
    390       Werror("'%s::%s()' 2 is a local procedure and cannot be accessed by an user.",
     379    if((ns==NULL)
     380    || (strcmp(plib, namespaceroot->name)!= 0))
     381    {
     382      Werror("'%s::%s()' is a local procedure and cannot be accessed by an user.",
    391383             plib, pi->procname);
    392384      omFree(plib);
  • Singular/ipshell.cc

    r1bd25e rf2dff02  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipshell.cc,v 1.64 2001-03-22 19:11:04 Singular Exp $ */
     4/* $Id: ipshell.cc,v 1.65 2001-03-26 19:30:23 Singular Exp $ */
    55/*
    66* ABSTRACT:
     
    386386  while (h!=NULL)
    387387  {
    388     if ((all && (IDTYP(h)!=PROC_CMD)) || (typ == IDTYP(h))
     388    if ((all && (IDTYP(h)!=PROC_CMD) &&(IDTYP(h)!=PACKAGE_CMD))
     389    || (typ == IDTYP(h))
    389390    || ((IDTYP(h)==QRING_CMD) && (typ==RING_CMD)))
    390391    {
     
    10431044    else
    10441045    {
    1045       if(iiInternalExport(v, toLev)) {
     1046      if(iiInternalExport(v, toLev))
     1047      {
    10461048        r->CleanUp();
    10471049        return TRUE;
     
    10871089        }
    10881090      }
    1089       if(iiInternalExport(v, toLev, root)) {
     1091      if(iiInternalExport(v, toLev, root))
     1092      {
    10901093        rv->CleanUp();
    10911094        return TRUE;
  • Singular/ring.cc

    r1bd25e rf2dff02  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ring.cc,v 1.161 2001-02-21 10:08:14 Singular Exp $ */
     4/* $Id: ring.cc,v 1.162 2001-03-26 19:30:23 Singular Exp $ */
    55
    66/*
     
    128128  {
    129129    sLastPrinted.CleanUp();
    130     memset(&sLastPrinted,0,sizeof(sleftv));
    131130  }
    132131
     
    147146  {
    148147    sLastPrinted.CleanUp();
    149     memset(&sLastPrinted,0,sizeof(sleftv));
    150148  }
    151149
     
    876874      {
    877875        sLastPrinted.CleanUp();
    878         memset(&sLastPrinted,0,sizeof(sleftv));
    879876      }
    880877      if ((myynest>0) && (iiRETURNEXPR[myynest].RingDependend()))
  • Singular/subexpr.cc

    r1bd25e rf2dff02  
    55* ABSTRACT: handling of leftv
    66*/
    7 /* $Id: subexpr.cc,v 1.74 2001-03-23 18:27:41 Singular Exp $ */
     7/* $Id: subexpr.cc,v 1.75 2001-03-26 19:30:24 Singular Exp $ */
    88
    99#include <stdlib.h>
     
    286286    omFree((ADDRESS)name);
    287287  }
    288   name=NULL;
    289   flag=0;
     288  //name=NULL;
     289  //flag=0;
    290290#ifdef HAVE_NAMESPACES
    291   packhdl = NULL;
    292   req_packhdl = NULL;
     291  //packhdl = NULL;
     292  //req_packhdl = NULL;
    293293#endif /* HAVE_NAMESPACES */
    294294  if (data!=NULL)
     
    361361      case VTIMER:
    362362#ifdef HAVE_RTIMER
    363         case VRTIMER:
     363      case VRTIMER:
    364364#endif
    365365      case VOICE:
     
    378378#endif
    379379    } /* end switch: (rtyp) */
    380     data=NULL;
     380    //data=NULL;
    381381  }
    382382  if (attribute!=NULL)
     
    408408      case LIB_CMD:
    409409      case 0:
    410         attribute=NULL;
     410        //attribute=NULL;
    411411        break;
    412412      default:
     
    429429    e=h;
    430430  }
    431   rtyp=NONE;
     431  //rtyp=NONE;
    432432  if (next!=NULL)
    433433  {
     
    443443    } while (next!=NULL);
    444444  }
     445  Init();
    445446}
    446447
     
    529530void sleftv::Copy(leftv source)
    530531{
    531   memset(this,0,sizeof(*this));
     532  Init();
    532533  rtyp=source->Typ();
    533534  void *d=source->Data();
     
    11091110      // the evalutated form will be build in tmp
    11101111      sleftv tmp;
    1111       memset(&tmp,0,sizeof(tmp));
     1112      tmp.Init();
    11121113      tmp.rtyp=STRING_CMD;
    11131114      r=(char *)omAllocBin(size_two_bin);
     
    13081309  }
    13091310#endif
    1310   memset(v,0,sizeof(sleftv));
     1311  v->Init();
    13111312#ifdef HAVE_NAMESPACES
    13121313  v->packhdl = NULL;
     
    15851586            memset(&d->arg1,0,sizeof(sleftv));
    15861587            this->CleanUp();
    1587             memset(this,0,sizeof(sleftv));
    15881588            rtyp=NONE;
    15891589          }
Note: See TracChangeset for help on using the changeset viewer.