Changeset 445e55 in git
- Timestamp:
- Apr 18, 2007, 6:15:59 PM (17 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
- Children:
- 1d430ab97fb0bc40dcbac66c9e99a0f9c3344fec
- Parents:
- 7ba9fe121c436f581536f3d3a05ab906f5cbe6cc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ipid.cc
r7ba9fe r445e55 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ipid.cc,v 1. 79 2007-03-13 16:03:24Singular Exp $ */4 /* $Id: ipid.cc,v 1.80 2007-04-18 16:15:58 Singular Exp $ */ 5 5 6 6 /* … … 58 58 /*0 implementation*/ 59 59 60 #ifdef HAVE_IDI 61 int iiS2I(const char *s, int &less4) 62 { 63 less4=1; 64 int i; 65 i=s[0]; 66 if (s[1]!='\0') 67 { 68 i=(i<<8)+s[1]; 69 if (s[2]!='\0') 70 { 71 i=(i<<8)+s[2]; 72 if (s[3]!='\0') 73 { 74 i=(i<<8)+s[3]; 75 less4=0; 76 } 77 } 78 } 79 return i; 80 } 81 #endif 60 82 idhdl idrec::get(const char * s, int lev) 61 83 { … … 66 88 int l; 67 89 char *id; 90 #ifndef HAVE_IDI 68 91 if (s[1]=='\0') 69 92 { … … 203 226 if (*(short *)s==*(short *)id) 204 227 { 205 if (0 == strcmp(s+ 2,id+2))228 if (0 == strcmp(s+1,id+1)) 206 229 { 207 230 if (l==lev) return h; … … 216 239 } 217 240 return found; 241 #else 242 int less4; 243 int i=iiS2I(s,less4); 244 while (h!=NULL) 245 { 246 omCheckAddr(IDID(h)); 247 l=IDLEV(h); 248 if ((l==0)||(l==lev)) 249 { 250 if (i==h->id_i) 251 { 252 id=IDID(h); 253 if (less4 || (0 == strcmp(s+4,id+4))) 254 { 255 if (l==lev) return h; 256 found=h; 257 } 258 } 259 } 260 h = IDNEXT(h); 261 } 262 return found; 263 #endif 218 264 } 219 265 … … 237 283 IDLEV(h) = lev; 238 284 IDNEXT(h) = this; 285 #ifdef HAVE_IDI 286 int dummy; 287 h->id_i=iiS2I(s,dummy); 288 #endif 239 289 if (init) 240 290 { -
Singular/mpsr_Get.h
r7ba9fe r445e55 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: mpsr_Get.h,v 1.1 4 2003-12-10 17:35:18Singular Exp $ */4 /* $Id: mpsr_Get.h,v 1.15 2007-04-18 16:15:59 Singular Exp $ */ 5 5 /*************************************************************** 6 6 * … … 111 111 IDTYP(h) = tok; 112 112 IDDATA(h) = (char *) data; 113 113 #ifdef HAVE_IDI 114 extern int iiS2I(const char *s, int &less4); 115 int dummy; 116 h->id_i=iiS2I(name,dummy); 117 #endif 114 118 return h; 115 119 } -
kernel/structs.h
r7ba9fe r445e55 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: structs.h,v 1.3 3 2007-03-01 09:15:51Singular Exp $ */6 /* $Id: structs.h,v 1.34 2007-04-18 16:15:58 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT … … 31 31 but configure dislikes it */ 32 32 33 #define HAVE_IDI 1 33 34 34 35 #if defined(i386) || defined(x86_64_Linux) || defined(ix86_SunOS) … … 859 860 short lev; 860 861 short ref; 862 #ifdef HAVE_IDI 863 int id_i; 864 #endif 861 865 862 866 #define IDNEXT(a) ((a)->next)
Note: See TracChangeset
for help on using the changeset viewer.