Changeset 82063a in git


Ignore:
Timestamp:
Sep 19, 2000, 2:43:32 PM (24 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
0bf7dff98e17f7166a35a042e1aede1cff4b9fe8
Parents:
f18d15f939265cfd33d45466cb593f6c5b1ad49f
Message:
* hannes: clean up oif some procedeures


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

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    rf18d15f r82063a  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iparith.cc,v 1.225 2000-09-18 09:19:02 obachman Exp $ */
     4/* $Id: iparith.cc,v 1.226 2000-09-19 12:43:28 Singular Exp $ */
    55
    66/*
     
    1616
    1717#include "mod2.h"
    18 
    1918#include "tok.h"
    2019#include "ipid.h"
  • Singular/ipassign.cc

    rf18d15f r82063a  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipassign.cc,v 1.59 2000-09-18 09:19:04 obachman Exp $ */
     4/* $Id: ipassign.cc,v 1.60 2000-09-19 12:43:29 Singular Exp $ */
    55
    66/*
     
    3939
    4040/*=================== proc =================*/
    41 #ifdef SRING
    42 static BOOLEAN jjALTVARS(leftv res, leftv a)
    43 {
    44   pAltVars=(int)a->Data();
    45   pSRING=(pAltVars<=pVariables);
    46   pSDRING=pSDRING||pSRING;
    47   currRing->partN=pAltVars;
    48   return FALSE;
    49 }
    50 #endif
    5141static BOOLEAN jjECHO(leftv res, leftv a)
    5242{
     
    546536// sysvars:
    547537 {jjECHO,       VECHO,          INT_CMD }
    548 #ifdef SRING
    549 ,{jjALTVARS,    VALTVARS,       INT_CMD }
    550 #endif
    551538,{jjPAGELENGTH, VPAGELENGTH,    INT_CMD }
    552539,{jjPRINTLEVEL, VPRINTLEVEL,    INT_CMD }
  • Singular/subexpr.cc

    rf18d15f r82063a  
    55* ABSTRACT: handling of leftv
    66*/
    7 /* $Id: subexpr.cc,v 1.67 2000-09-18 14:31:37 Singular Exp $ */
     7/* $Id: subexpr.cc,v 1.68 2000-09-19 12:43:32 Singular Exp $ */
    88
    99#include <stdlib.h>
     
    1414
    1515#include "mod2.h"
    16 #define OM_TRACK 5
    17 #define OM_CHECK 3
    18 #define OM_KEEP 1
    1916#include "tok.h"
    2017#include "ipid.h"
     
    10031000    switch (rtyp)
    10041001    {
    1005 #ifdef SRING
    1006       case VALTVARS:   return (void *)pAltVars;
    1007 #endif
    10081002      case VECHO:      return (void *)si_echo;
    10091003      case VPAGELENGTH:return (void *)pagelength;
     
    11181112      {
    11191113        tmp.next=next; next=NULL;
     1114        data=NULL; d=NULL;
    11201115        CleanUp();
    11211116        memcpy(this,&tmp,sizeof(tmp));
     
    11261121        // ???
    11271122        // here we still have a memory leak...
    1128         // example: list L="123","456";
    1129         // L[1][2];
    1130         // therefore, it should never happen:
    1131         assume(0);
    1132         // but if it happens: here is the temporary fix:
    1133         omMarkAsStaticAddr(r);
     1123        // example: list L="123","456";
     1124        // L[1][2];
     1125        // therefore, it should never happen:
     1126        assume(0);
     1127        // but if it happens: here is the temporary fix:
     1128        // omMarkAsStaticAddr(r);
    11341129      }
    11351130      break;
     
    11581153        if ((e->next!=NULL)
    11591154        && (l->m[index-1].rtyp==STRING_CMD))
    1160         // string[..].Data() modifies sleftv, so let's do it ourself
    1161         {
    1162           char *dd=l->m[index-1].data;
    1163           int j=e->next->start-1;
    1164           r=(char *)omAllocBin(size_two_bin);
    1165           if ((j>=0)&& (j<(int)strlen((char *)dd)))
    1166           {
    1167             r[0]=*(((char *)dd)+j);
    1168             r[1]='\0';
    1169           }
    1170           else
    1171           {
    1172             r[0]='\0';
    1173           }
    1174         }
     1155        // string[..].Data() modifies sleftv, so let's do it ourself
     1156        {
     1157          char *dd=(char *)l->m[index-1].data;
     1158          int j=e->next->start-1;
     1159          r=(char *)omAllocBin(size_two_bin);
     1160          if ((j>=0) && (j<(int)strlen(dd)))
     1161          {
     1162            r[0]=*(dd+j);
     1163            r[1]='\0';
     1164          }
     1165          else
     1166          {
     1167            r[0]='\0';
     1168          }
     1169        }
    11751170        else
    1176         {
    1177           l->m[index-1].e=e->next;
     1171        {
     1172          l->m[index-1].e=e->next;
    11781173          r=(char *)l->m[index-1].Data();
    11791174          l->m[index-1].e=NULL;
    1180         }
     1175        }
    11811176      }
    11821177      else //if (!errorreported)
Note: See TracChangeset for help on using the changeset viewer.