Changeset 4311 for trunk/src/opengl/glu
- Timestamp:
- Sep 22, 2000, 10:51:27 PM (25 years ago)
- File:
-
- 1 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
Note:
See TracChangeset
for help on using the changeset viewer.