Changeset 46feb1 in git


Ignore:
Timestamp:
Apr 27, 1998, 6:09:37 PM (26 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '3720ae8bfcff4a4649ee98a15552089151d2d59b')
Children:
38b2367c696dca8d148e865e1462e98984c9ccab
Parents:
94f4f4606dc2922d461753e53811bf335011bcf5
Message:
* hannes: use ReAlloc for enlargeT, enlargeL  (kutil.cc)


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

Legend:

Unmodified
Added
Removed
  • Singular/ChangeLog

    r94f4f4 r46feb1  
     1Mon Apr 27 18:07:21 MET DST 1998 hannes
     2        * use ReAlloc for enlargeT, enlargeL  (kutil.cc)
    13Mon Apr 27 16:45:41 MET DST 1998 hannes
    24        * fixed conversion of factory 0 to poly NULL (clapconv.cc)
  • Singular/kutil.cc

    r94f4f4 r46feb1  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kutil.cc,v 1.18 1998-04-23 09:52:11 Singular Exp $ */
     4/* $Id: kutil.cc,v 1.19 1998-04-27 16:08:44 Singular Exp $ */
    55/*
    66* ABSTRACT: kernel: utils for std
     
    205205}
    206206
    207 void enlargeT (TSet* T,int* length,int incr)
     207static inline void enlargeT (TSet* T,int* length,int incr)
    208208{
    209209  TSet h;
    210210
    211   h = (TSet)Alloc(((*length)+incr)* sizeof(TObject));
    212   /*for (i=0; i<=(*length)-1; i++) h[i] = (*T)[i];*/
    213   memcpy(h, *T, (*length) * sizeof(TObject));
    214   Free((ADDRESS)*T,((*length)*sizeof(TObject)));
    215   *T = h;
     211  *T = (TSet)ReAlloc((ADDRESS)(*T),(*length)*sizeof(TObject),
     212                                   ((*length)+incr)*sizeof(TObject));
    216213  (*length) += incr;
    217214}
     
    250247}
    251248
    252 void enlargeL (LSet* L,int* length,int incr)
     249static inline void enlargeL (LSet* L,int* length,int incr)
    253250{
    254251  LSet h;
    255252
    256   h = (LSet)Alloc(((*length)+incr)*sizeof(LObject));
    257   /*for (i=0; i<(*length); i++) h[i] = (*L)[i];*/
    258   memcpy(h, *L, (*length) * sizeof(LObject));
    259   Free((ADDRESS)*L,((*length)*sizeof(LObject)));
    260   *L = h;
     253  *L = (LSet)ReAlloc((ADDRESS)(*L),(*length)*sizeof(LObject),
     254                                   ((*length)+incr)*sizeof(LObject));
    261255  (*length) += incr;
    262256}
  • Singular/kutil.h

    r94f4f4 r46feb1  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: kutil.h,v 1.8 1998-04-22 07:49:02 Singular Exp $ */
     6/* $Id: kutil.h,v 1.9 1998-04-27 16:09:37 Singular Exp $ */
    77/*
    88* ABSTRACT: kernel: utils for std
     
    121121void deleteHC(poly *p, int *e, int *l, kStrategy strat);
    122122void deleteInS (int i,kStrategy strat);
    123 void enlargeT (TSet* T,int* length,int incr);
    124123void cleanT (kStrategy strat);
    125124LSet initL ();
    126 void enlargeL (LSet* L,int* length,int incr);
    127125void deleteInL(LSet set, int *length, int j,kStrategy strat);
    128126void enterL (LSet *set,int *length, int *LSetmax, LObject p,int at);
Note: See TracChangeset for help on using the changeset viewer.