Changeset 8cc234 in git


Ignore:
Timestamp:
Jan 6, 2010, 1:27:01 PM (13 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
Children:
a7a94edf0d03f2f4cedf69c0e3af1487f084ba10
Parents:
a38b95b9190fdc9786efb4c81bb4ac12ad0e7c84
Message:
HAVE_IDI is now standard

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

Legend:

Unmodified
Added
Removed
  • Singular/ipid.cc

    ra38b95 r8cc234  
    5656/*0 implementation*/
    5757
    58 #ifdef HAVE_IDI
    5958int iiS2I(const char *s)
    6059{
     
    7574  return i; 
    7675}
    77 #endif
     76
    7877idhdl idrec::get(const char * s, int lev)
    7978{
     
    8483  int l;
    8584  const char *id;
    86 #ifndef HAVE_IDI
    87   if (s[1]=='\0')
    88   {
    89     while (h!=NULL)
    90     {
    91       omCheckAddr(IDID(h));
    92 // =============================================================
    93 #if 0
    94 // timings: ratchwum: 515 s, wilde13: 373 s, nepomuck: 267 s, lukas 863 s
    95     id=IDID(h);
    96     l=IDLEV(h);
    97     if ((l==0) && (*(short *)s==*(short *)id) && (0 == strcmp(s+1,id+1)))
    98     {
    99       found=h;
    100     }
    101     else if ((l==lev) && (*(short *)s==*(short *)id) && (0 == strcmp(s+1,id+1)))
    102     {
    103       return h;
    104     }
    105 #endif
    106 // =============================================================
    107 #if 0
    108 // timings: ratchwum: 515 s, wilde13: 398 s, nepomuck: 269 s, lukas 834 s
    109     id=IDID(h);
    110     if (*(short *)s==*(short *)id)
    111     {
    112       l=IDLEV(h);
    113       if ((l==0) && (0 == strcmp(s+1,id+1)))
    114       {
    115         found=h;
    116       }
    117       else if ((l==lev) && (0 == strcmp(s+1,id+1)))
    118       {
    119         return h;
    120       }
    121     }
    122 #endif
    123 // =============================================================
    124 #if 1
    125 // timings: ratchwum: 501 s, wilde13: 357 s, nepomuck: 267 s, lukas 816 s
    126 // timings bug4: ratchwum: s, wilde13: s, nepomuck: 379.74 s, lukas s
    127     l=IDLEV(h);
    128     if ((l==0)||(l==lev))
    129     {
    130       id=IDID(h);
    131       if (*s==*id)
    132       {
    133         if (id[1]=='\0')  // we know: s[1]=='\0'
    134         {
    135           if (l==lev) return h;
    136           found=h;
    137         }
    138       }
    139     }
    140 #endif
    141 // =============================================================
    142 #if 0
    143 // timings: ratchwum: s, wilde13: s, nepomuck: s, lukas s
    144 // timings bug4: ratchwum: s, wilde13: s, nepomuck: s, lukas s
    145     l=IDLEV(h);
    146     if ((l==0)||(l==lev))
    147     {
    148       id=IDID(h);
    149       if (*(short *)s==*(short *)id)
    150       {
    151         if (l==lev) return h;
    152         found=h;
    153       }
    154     }
    155 #endif
    156 // =============================================================
    157     h = IDNEXT(h);
    158   }
    159   }
    160   else
    161   {
    162   while (h!=NULL)
    163   {
    164     omCheckAddr(IDID(h));
    165 // =============================================================
    166 #if 0
    167 // timings: ratchwum: 515 s, wilde13: 373 s, nepomuck: 267 s, lukas 863 s
    168     id=IDID(h);
    169     l=IDLEV(h);
    170     if ((l==0) && (*(short *)s==*(short *)id) && (0 == strcmp(s+1,id+1)))
    171     {
    172       found=h;
    173     }
    174     else if ((l==lev) && (*(short *)s==*(short *)id) && (0 == strcmp(s+1,id+1)))
    175     {
    176       return h;
    177     }
    178 #endif
    179 // =============================================================
    180 #if 0
    181 // timings: ratchwum: 515 s, wilde13: 398 s, nepomuck: 269 s, lukas 834 s
    182     id=IDID(h);
    183     if (*(short *)s==*(short *)id)
    184     {
    185       l=IDLEV(h);
    186       if ((l==0) && (0 == strcmp(s+1,id+1)))
    187       {
    188         found=h;
    189       }
    190       else if ((l==lev) && (0 == strcmp(s+1,id+1)))
    191       {
    192         return h;
    193       }
    194     }
    195 #endif
    196 // =============================================================
    197 #if 0
    198 // timings: ratchwum: 501 s, wilde13: 357 s, nepomuck: 267 s, lukas 816 s
    199 // timings bug4: ratchwum: s, wilde13: s, nepomuck: 379.74 s, lukas s
    200     l=IDLEV(h);
    201     if ((l==0)||(l==lev))
    202     {
    203       id=IDID(h);
    204       if (*(short *)s==*(short *)id)
    205       {
    206         if (0 == strcmp(s+1,id+1))
    207         {
    208           if (l==lev) return h;
    209           found=h;
    210         }
    211       }
    212     }
    213 #endif
    214 // =============================================================
    215 #if 1
    216 // timings: ratchwum: s, wilde13: s, nepomuck: s, lukas s
    217 // timings bug4: ratchwum: s, wilde13: s, nepomuck: s, lukas s
    218     l=IDLEV(h);
    219     if ((l==0)||(l==lev))
    220     {
    221       id=IDID(h);
    222       if (*(short *)s==*(short *)id)
    223       {
    224         if (0 == strcmp(s+1,id+1))
    225         {
    226           if (l==lev) return h;
    227           found=h;
    228         }
    229       }
    230     }
    231 #endif
    232 // =============================================================
    233     h = IDNEXT(h);
    234   }
    235   }
    236   return found;
    237 #else
    23885  int i=iiS2I(s);
    23986  int less4=(i < (1<<24));
     
    257104  }
    258105  return found;
    259 #endif
    260106}
    261107
     
    279125  IDLEV(h)  = lev;
    280126  IDNEXT(h) = this;
    281 #ifdef HAVE_IDI
    282127  h->id_i=iiS2I(s);
    283 #endif
    284128  if (init)
    285129  {
  • Singular/mpsr_Get.h

    ra38b95 r8cc234  
    111111  IDTYP(h) = tok;
    112112  IDDATA(h) = (char *) data;
    113 #ifdef HAVE_IDI
    114113  extern int iiS2I(const char *s);
    115114  h->id_i=iiS2I(name);
    116 #endif
    117115  return h;
    118116}
Note: See TracChangeset for help on using the changeset viewer.