Changeset 7ef4c2 in git


Ignore:
Timestamp:
Feb 13, 2009, 10:15:41 AM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '45e267b9942dec9429fe249ce3e5e44ab80a6a3a')
Children:
f9ffa1187e21ddea0986a5d4614216f62c066d70
Parents:
fec31e1b0b4219695838afd56e61b869215483ec
Message:
*hannes: rNameCheck: also for parameters


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

Legend:

Unmodified
Added
Removed
  • kernel/ring.cc

    rfec31e1 r7ef4c2  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ring.cc,v 1.113 2009-01-08 10:21:35 Singular Exp $ */
     4/* $Id: ring.cc,v 1.114 2009-02-13 09:15:41 Singular Exp $ */
    55
    66/*
     
    128128      if (strcmp(R->names[i],R->names[j])==0)
    129129      {
    130         Warn("name conflict var(%d) and var(%d): `%s`",i+1,j+1,R->names[i]);
     130        Warn("name conflict var(%d) and var(%d): `%s`, rename to `@(%d)`",i+1,j+1,R->names[i],j+1);
    131131        omFree(R->names[j]);
    132132        R->names[j]=(char *)omAlloc(10);
    133133        sprintf(R->names[j],"@(%d)",j+1);
     134      }
     135    }
     136  }
     137  for(i=0;i<R->P; i++)
     138  {
     139    for(j=0;j<R->N;j++)
     140    {
     141      if (strcmp(R->parameter[i],R->names[j])==0)
     142      {
     143        Warn("name conflict par(%d) and var(%d): `%s`, rename to `@@(%d)`",i+1,j+1,R->names[j],i+1);
     144        omFree(R->parameter[i]);
     145        R->parameter[i]=(char *)omAlloc(10);
     146        sprintf(R->parameter[i],"@@(%d)",i+1);
    134147      }
    135148    }
Note: See TracChangeset for help on using the changeset viewer.