Changeset 4311 for trunk/src/opengl
- Timestamp:
- Sep 22, 2000, 10:51:27 PM (25 years ago)
- Location:
- trunk/src/opengl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/opengl/glu/nurbs/internals/sorter.cpp
r2689 r4311 1 /* $Id: sorter.cpp,v 1. 1 2000-02-09 08:50:28jeroen Exp $ */1 /* $Id: sorter.cpp,v 1.2 2000-09-22 20:49:20 jeroen Exp $ */ 2 2 /* 3 3 ** License Applicability. Except to the extent portions of this file are … … 37 37 * sorter.c++ 38 38 * 39 * $Date: 2000-0 2-09 08:50:28 $ $Revision: 1.1$40 * $Header: /home/ktk/tmp/odin/2007/netlabs.cvs/odin32/src/opengl/glu/nurbs/internals/sorter.cpp,v 1. 1 2000-02-09 08:50:28jeroen Exp $39 * $Date: 2000-09-22 20:49:20 $ $Revision: 1.2 $ 40 * $Header: /home/ktk/tmp/odin/2007/netlabs.cvs/odin32/src/opengl/glu/nurbs/internals/sorter.cpp,v 1.2 2000-09-22 20:49:20 jeroen Exp $ 41 41 */ 42 42 … … 81 81 { 82 82 char *i, *j; 83 char 84 int 83 char *lp, *hp; 84 int c; 85 85 unsigned int n; 86 int redo=1; 86 87 87 start: 88 //start: 89 while(redo) 90 { 91 redo=0; 92 88 93 if((n=l-a) <= es) 89 94 return; 90 95 n = es * (n / (2*es)); 91 96 hp = lp = a+n; 92 97 i = a; 93 98 j = l-es; 94 while(1) { 95 if(i < lp) { 96 if((c = qscmp(i, lp)) == 0) { 97 qsexc(i, lp -= es); 98 continue; 99 } 100 if(c < 0) { 101 i += es; 102 continue; 103 } 104 } 99 while(1) 100 { 101 if(i < lp) { 102 if((c = qscmp(i, lp)) == 0) { 103 qsexc(i, lp -= es); 104 continue; 105 } 106 if(c < 0) { 107 i += es; 108 continue; 109 } 110 } 105 111 106 112 loop: 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 113 if(j > hp) { 114 if((c = qscmp(hp, j)) == 0) { 115 qsexc(hp += es, j); 116 goto loop; 117 } 118 if(c > 0) { 119 if(i == lp) { 120 qstexc(i, hp += es, j); 121 i = lp += es; 122 goto loop; 123 } 124 qsexc(i, j); 125 j -= es; 126 i += es; 127 continue; 128 } 129 j -= es; 130 goto loop; 131 } 126 132 127 128 129 130 131 132 133 134 135 goto start;136 133 if(i == lp) { 134 if(lp-a >= l-hp) { 135 qs1(hp+es, l); 136 l = lp; 137 } else { 138 qs1(a, lp); 139 a = hp+es; 140 } 141 /*goto start;*/ redo=1; break; 142 } 137 143 138 139 144 qstexc(j, lp -= es, i); 145 j = hp -= es; 140 146 } 147 } 141 148 } 142 149 -
trunk/src/opengl/mesa/glthread.c
r3598 r4311 1 /* $Id: glthread.c,v 1. 1 2000-05-23 20:40:36jeroen Exp $ */1 /* $Id: glthread.c,v 1.2 2000-09-22 20:49:20 jeroen Exp $ */ 2 2 3 3 /* … … 63 63 #define INIT_MAGIC 0xff8adc98 64 64 65 #ifdef __WIN32OS2__ 66 #include <odinwrap.h> 67 inline void ** __threadstore() 68 { 69 USHORT sel=RestoreOS2FS(); 70 void **p=_threadstore(); 71 SetFS(sel); 72 return p; 73 } 74 #endif 65 75 66 76 … … 248 258 _glthread_GetID(void) 249 259 { 250 return (unsigned long) _ threadstore();251 } 252 253 254 void 255 _glthread_InitTSD(_glthread_TSD *tsd) 256 { 257 tsd->key = (ULONG) (_ threadstore());258 tsd->initMagic = INIT_MAGIC; 259 } 260 261 262 void * 263 _glthread_GetTSD(_glthread_TSD *tsd) 264 { 265 if (tsd->initMagic != INIT_MAGIC) { 266 _glthread_InitTSD(tsd); 267 } 268 return _ threadstore();260 return (unsigned long) __threadstore(); 261 } 262 263 264 void 265 _glthread_InitTSD(_glthread_TSD *tsd) 266 { 267 tsd->key = (ULONG) (__threadstore()); 268 tsd->initMagic = INIT_MAGIC; 269 } 270 271 272 void * 273 _glthread_GetTSD(_glthread_TSD *tsd) 274 { 275 if (tsd->initMagic != INIT_MAGIC) { 276 _glthread_InitTSD(tsd); 277 } 278 return __threadstore(); 269 279 } 270 280 … … 279 289 } 280 290 281 (*_ threadstore())=(void *)ptr;291 (*__threadstore())=(void *)ptr; 282 292 } 283 293
Note:
See TracChangeset
for help on using the changeset viewer.