Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

962 lines
27 KiB

  1. /*
  2. ** Copyright 1992, Silicon Graphics, Inc.
  3. ** All Rights Reserved.
  4. **
  5. ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6. ** the contents of this file may not be disclosed to third parties, copied or
  7. ** duplicated in any form, in whole or in part, without the prior written
  8. ** permission of Silicon Graphics, Inc.
  9. **
  10. ** RESTRICTED RIGHTS LEGEND:
  11. ** Use, duplication or disclosure by the Government is subject to restrictions
  12. ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13. ** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14. ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15. ** rights reserved under the Copyright Laws of the United States.
  16. **
  17. */
  18. #include <stdlib.h>
  19. #include <setjmp.h>
  20. struct JumpBuffer {
  21. jmp_buf buf;
  22. };
  23. #define mysetjmp(x) setjmp((x)->buf)
  24. #define mylongjmp(x,y) longjmp((x)->buf, y)
  25. /* <<AT&T USL C++ Language System <3.0.1> 02/03/92>> */
  26. /* < ../core/splitarcs.c++ > */
  27. void *__vec_new (void *, int , int , void *);
  28. void __vec_ct (void *, int , int , void *);
  29. void __vec_dt (void *, int , int , void *);
  30. void __vec_delete (void *, int , int , void *, int , int );
  31. typedef int (*__vptp)(void);
  32. struct __mptr {short d; short i; __vptp f; };
  33. typedef unsigned int size_t ;
  34. // extern void *malloc (size_t );
  35. // extern void free (void *);
  36. struct JumpBuffer;
  37. struct Buffer;
  38. struct Buffer {
  39. struct Buffer *next__6Buffer ;
  40. };
  41. struct Pool;
  42. enum __Q2_4Pool5Magic { is_allocated__Q2_4Pool5Magic = 62369, is_free__Q2_4Pool5Magic = 61858} ;
  43. struct Pool {
  44. struct Buffer *freelist__4Pool ;
  45. char *blocklist__4Pool [32];
  46. int nextblock__4Pool ;
  47. char *curblock__4Pool ;
  48. int buffersize__4Pool ;
  49. int nextsize__4Pool ;
  50. int nextfree__4Pool ;
  51. int initsize__4Pool ;
  52. char *name__4Pool ;
  53. int magic__4Pool ;
  54. };
  55. void __glgrow__4PoolFv (struct Pool *);
  56. struct PooledObj;
  57. struct PooledObj {
  58. char __W3__9PooledObj ;
  59. };
  60. typedef float REAL ;
  61. typedef void (*Pfvv )(void );
  62. typedef void (*Pfvf )(float *);
  63. typedef int (*cmpfunc )(void *, void *);
  64. typedef REAL Knot ;
  65. typedef REAL *Knot_ptr ;
  66. struct TrimVertex;
  67. struct PwlArc;
  68. struct PwlArc {
  69. char __W3__9PooledObj ;
  70. struct TrimVertex *pts__6PwlArc ;
  71. int npts__6PwlArc ;
  72. long type__6PwlArc ;
  73. };
  74. struct TrimVertex;
  75. struct TrimVertex {
  76. REAL param__10TrimVertex [2];
  77. long nuid__10TrimVertex ;
  78. };
  79. typedef struct TrimVertex *TrimVertex_p ;
  80. struct Bin;
  81. struct Arc;
  82. struct BezierArc;
  83. typedef struct Arc *Arc_ptr ;
  84. enum arc_side { arc_none = 0, arc_right = 1, arc_top = 2, arc_left = 3, arc_bottom = 4} ;
  85. struct Arc;
  86. struct Arc {
  87. char __W3__9PooledObj ;
  88. Arc_ptr prev__3Arc ;
  89. Arc_ptr next__3Arc ;
  90. Arc_ptr link__3Arc ;
  91. struct BezierArc *bezierArc__3Arc ;
  92. struct PwlArc *pwlArc__3Arc ;
  93. long type__3Arc ;
  94. long nuid__3Arc ;
  95. };
  96. extern int __glbezier_tag__3Arc ;
  97. extern int __glarc_tag__3Arc ;
  98. extern int __gltail_tag__3Arc ;
  99. struct Bin;
  100. struct Bin {
  101. struct Arc *head__3Bin ;
  102. struct Arc *current__3Bin ;
  103. };
  104. struct Sorter;
  105. struct Sorter {
  106. int es__6Sorter ;
  107. struct __mptr *__vptr__6Sorter ;
  108. };
  109. struct FlistSorter;
  110. struct FlistSorter {
  111. int es__6Sorter ;
  112. struct __mptr *__vptr__6Sorter ;
  113. };
  114. struct Flist;
  115. struct Flist {
  116. REAL *pts__5Flist ;
  117. int npts__5Flist ;
  118. int start__5Flist ;
  119. int end__5Flist ;
  120. struct FlistSorter sorter__5Flist ;
  121. };
  122. struct Backend;
  123. struct Jarcloc;
  124. struct Jarcloc {
  125. struct Arc *arc__7Jarcloc ;
  126. struct TrimVertex *p__7Jarcloc ;
  127. struct TrimVertex *plast__7Jarcloc ;
  128. };
  129. struct Trimline;
  130. struct Trimline {
  131. struct TrimVertex **pts__8Trimline ;
  132. long numverts__8Trimline ;
  133. long i__8Trimline ;
  134. long size__8Trimline ;
  135. struct Jarcloc jarcl__8Trimline ;
  136. struct TrimVertex t__8Trimline ;
  137. struct TrimVertex b__8Trimline ;
  138. struct TrimVertex *tinterp__8Trimline ;
  139. struct TrimVertex *binterp__8Trimline ;
  140. };
  141. struct Gridline;
  142. struct Gridline {
  143. long v__8Gridline ;
  144. REAL vval__8Gridline ;
  145. long vindex__8Gridline ;
  146. long ustart__8Gridline ;
  147. long uend__8Gridline ;
  148. };
  149. struct Uarray;
  150. struct Uarray {
  151. long size__6Uarray ;
  152. long ulines__6Uarray ;
  153. REAL *uarray__6Uarray ;
  154. };
  155. struct Backend;
  156. struct TrimRegion;
  157. void __gl__dt__8TrimlineFv (struct Trimline *, int );
  158. void __gl__dt__6UarrayFv (struct Uarray *, int );
  159. struct TrimRegion {
  160. struct Trimline left__10TrimRegion ;
  161. struct Trimline right__10TrimRegion ;
  162. struct Gridline top__10TrimRegion ;
  163. struct Gridline bot__10TrimRegion ;
  164. struct Uarray uarray__10TrimRegion ;
  165. REAL oneOverDu__10TrimRegion ;
  166. };
  167. struct GridTrimVertex;
  168. struct __Q2_4Hull4Side;
  169. struct __Q2_4Hull4Side {
  170. struct Trimline *left__Q2_4Hull4Side ;
  171. struct Gridline *line__Q2_4Hull4Side ;
  172. struct Trimline *right__Q2_4Hull4Side ;
  173. long index__Q2_4Hull4Side ;
  174. };
  175. struct Hull;
  176. struct Hull {
  177. struct __Q2_4Hull4Side lower__4Hull ;
  178. struct __Q2_4Hull4Side upper__4Hull ;
  179. struct Trimline fakeleft__4Hull ;
  180. struct Trimline fakeright__4Hull ;
  181. struct TrimRegion *PTrimRegion;
  182. struct TrimRegion OTrimRegion;
  183. };
  184. struct Backend;
  185. struct GridTrimVertex;
  186. struct Mesher;
  187. struct Mesher {
  188. struct __Q2_4Hull4Side lower__4Hull ;
  189. struct __Q2_4Hull4Side upper__4Hull ;
  190. struct Trimline fakeleft__4Hull ;
  191. struct Trimline fakeright__4Hull ;
  192. struct TrimRegion *PTrimRegion;
  193. struct Backend *backend__6Mesher ;
  194. struct Pool p__6Mesher ;
  195. unsigned int stacksize__6Mesher ;
  196. struct GridTrimVertex **vdata__6Mesher ;
  197. struct GridTrimVertex *last__6Mesher [2];
  198. int itop__6Mesher ;
  199. int lastedge__6Mesher ;
  200. struct TrimRegion OTrimRegion;
  201. };
  202. extern float __glZERO__6Mesher ;
  203. struct Backend;
  204. struct GridVertex;
  205. struct GridTrimVertex;
  206. struct CoveAndTiler;
  207. struct CoveAndTiler {
  208. struct Backend *backend__12CoveAndTiler ;
  209. struct TrimRegion *PTrimRegion;
  210. struct TrimRegion OTrimRegion;
  211. };
  212. extern int __glMAXSTRIPSIZE__12CoveAndTil0 ;
  213. struct Backend;
  214. struct Slicer;
  215. struct Slicer {
  216. struct Backend *backend__12CoveAndTiler ;
  217. struct TrimRegion *PTrimRegion;
  218. struct Mesher OMesher;
  219. struct Backend *backend__6Slicer ;
  220. REAL oneOverDu__6Slicer ;
  221. REAL du__6Slicer ;
  222. REAL dv__6Slicer ;
  223. int isolines__6Slicer ;
  224. };
  225. struct BezierArc;
  226. struct TrimVertexPool;
  227. struct ArcTessellator;
  228. struct ArcTessellator {
  229. struct Pool *pwlarcpool__14ArcTessellator ;
  230. struct TrimVertexPool *trimvertexpool__14ArcTessellator ;
  231. };
  232. extern REAL __glgl_Bernstein__14ArcTessell0 [][24][24];
  233. struct TrimVertexPool;
  234. struct TrimVertexPool {
  235. struct Pool pool__14TrimVertexPool ;
  236. struct TrimVertex **vlist__14TrimVertexPool ;
  237. int nextvlistslot__14TrimVertexPool ;
  238. int vlistsize__14TrimVertexPool ;
  239. };
  240. struct Renderhints;
  241. struct Backend;
  242. struct Quilt;
  243. struct Patchlist;
  244. struct Curvelist;
  245. struct JumpBuffer;
  246. struct Subdivider;
  247. enum __Q2_10Subdivider3dir { down__Q2_10Subdivider3dir = 0, same__Q2_10Subdivider3dir = 1, up__Q2_10Subdivider3dir = 2, none__Q2_10Subdivider3dir = 3} ;
  248. struct Subdivider {
  249. struct Slicer slicer__10Subdivider ;
  250. struct ArcTessellator arctessellator__10Subdivider ;
  251. struct Pool arcpool__10Subdivider ;
  252. struct Pool bezierarcpool__10Subdivider ;
  253. struct Pool pwlarcpool__10Subdivider ;
  254. struct TrimVertexPool trimvertexpool__10Subdivider ;
  255. struct JumpBuffer *jumpbuffer__10Subdivider ;
  256. struct Renderhints *renderhints__10Subdivider ;
  257. struct Backend *backend__10Subdivider ;
  258. struct Bin initialbin__10Subdivider ;
  259. struct Arc *pjarc__10Subdivider ;
  260. int s_index__10Subdivider ;
  261. int t_index__10Subdivider ;
  262. struct Quilt *qlist__10Subdivider ;
  263. struct Flist spbrkpts__10Subdivider ;
  264. struct Flist tpbrkpts__10Subdivider ;
  265. struct Flist smbrkpts__10Subdivider ;
  266. struct Flist tmbrkpts__10Subdivider ;
  267. REAL stepsizes__10Subdivider [4];
  268. int showDegenerate__10Subdivider ;
  269. int isArcTypeBezier__10Subdivider ;
  270. };
  271. struct ArcSorter;
  272. struct ArcSorter {
  273. int es__6Sorter ;
  274. struct __mptr *__vptr__6Sorter ;
  275. struct Subdivider *subdivider__9ArcSorter ;
  276. };
  277. struct ArcSdirSorter;
  278. struct ArcSdirSorter {
  279. int es__6Sorter ;
  280. struct __mptr *__vptr__6Sorter ;
  281. struct Subdivider *subdivider__9ArcSorter ;
  282. };
  283. struct ArcTdirSorter;
  284. struct ArcTdirSorter {
  285. int es__6Sorter ;
  286. struct __mptr *__vptr__6Sorter ;
  287. struct Subdivider *subdivider__9ArcSorter ;
  288. };
  289. struct Bin *__gl__ct__3BinFv (struct Bin *);
  290. void __glpartition__10SubdividerFR30 (struct Subdivider *, struct Bin *, struct Bin *, struct Bin *, struct Bin *, struct Bin *, int
  291. , REAL );
  292. int __glnumarcs__3BinFv (struct Bin *);
  293. struct ArcSdirSorter *__gl__ct__13ArcSdirSorterFR10S0 (struct ArcSdirSorter *, struct Subdivider *);
  294. void __glqsort__9ArcSorterFPP3Arci (struct ArcSorter *, struct Arc **, int );
  295. void __glcheck_s__10SubdividerFP3Ar0 (struct Subdivider *, struct Arc *, struct Arc *);
  296. void __gljoin_s__10SubdividerFR3Bin0 (struct Subdivider *, struct Bin *, struct Bin *, struct Arc *, struct Arc *);
  297. struct ArcTdirSorter *__gl__ct__13ArcTdirSorterFR10S0 (struct ArcTdirSorter *, struct Subdivider *);
  298. void __glcheck_t__10SubdividerFP3Ar0 (struct Subdivider *, struct Arc *, struct Arc *);
  299. void __gljoin_t__10SubdividerFR3Bin0 (struct Subdivider *, struct Bin *, struct Bin *, struct Arc *, struct Arc *);
  300. void __gladopt__3BinFv (struct Bin *);
  301. extern struct __mptr* __ptbl_vec_____core_splitarcs_c___split_[];
  302. void __gl__dt__3BinFv (struct Bin *, int );
  303. void __glsplit__10SubdividerFR3BinN0 (struct Subdivider *__0this , struct Bin *__1bin , struct Bin *__1left , struct Bin *__1right , int __1param , REAL __1value )
  304. {
  305. struct Bin __1intersections ;
  306. struct Bin __1unknown ;
  307. __gl__ct__3BinFv ( (struct Bin *)(& __1intersections )) ;
  308. __gl__ct__3BinFv ( (struct Bin *)(& __1unknown )) ;
  309. __glpartition__10SubdividerFR30 ( __0this , __1bin , __1left , (struct Bin *)(& __1intersections ), __1right , (struct Bin *)(& __1unknown ), __1param , __1value ) ;
  310. { int __1count ;
  311. __1count = __glnumarcs__3BinFv ( (struct Bin *)(& __1intersections )) ;
  312. if (__1count % 2 ){
  313. mylongjmp ( __0this -> jumpbuffer__10Subdivider , 29 ) ;
  314. }
  315. { Arc_ptr __1arclist [10];
  316. Arc_ptr *__1list ;
  317. Arc_ptr __1jarc ;
  318. if (__1count >= 10 ){
  319. void *__1__Xp00uzigaiaa ;
  320. __1list = (((struct Arc **)( (__1__Xp00uzigaiaa = malloc ( ((sizeof (struct Arc *))* __1count )) ), (__1__Xp00uzigaiaa ?(((void *)__1__Xp00uzigaiaa )):(((void *)__1__Xp00uzigaiaa )))) ));
  321. }
  322. else
  323. {
  324. __1list = __1arclist ;
  325. }
  326. ;
  327. { { Arc_ptr *__1last ;
  328. struct Arc *__1__Xjarc00efckaice ;
  329. __1last = __1list ;
  330. for(;__1jarc = ( (__1__Xjarc00efckaice = ((struct Bin *)(& __1intersections ))-> head__3Bin ), ( (__1__Xjarc00efckaice ?( (((struct Bin *)(& __1intersections ))-> head__3Bin = __1__Xjarc00efckaice ->
  331. link__3Arc ), 0 ) :( 0 ) ), __1__Xjarc00efckaice ) ) ;__1last ++ )
  332. ((*__1last ))= __1jarc ;
  333. if (__1param == 0 ){
  334. struct ArcSdirSorter __2sorter ;
  335. __gl__ct__13ArcSdirSorterFR10S0 ( (struct ArcSdirSorter *)(& __2sorter ), (struct Subdivider *)__0this ) ;
  336. __glqsort__9ArcSorterFPP3Arci ( (struct ArcSorter *)(& __2sorter ), __1list , __1count ) ;
  337. { { Arc_ptr *__2lptr ;
  338. __2lptr = __1list ;
  339. for(;__2lptr < __1last ;__2lptr += 2 )
  340. __glcheck_s__10SubdividerFP3Ar0 ( __0this , __2lptr [0 ], __2lptr [1 ]) ;
  341. for(__2lptr = __1list ;__2lptr < __1last ;__2lptr += 2 )
  342. __gljoin_s__10SubdividerFR3Bin0 ( __0this , __1left , __1right , __2lptr [0 ], __2lptr [1 ]) ;
  343. for(__2lptr = __1list ;__2lptr != __1last ;__2lptr ++ ) {
  344. if (((( (((REAL *)(((struct Arc *)((*__2lptr )))-> next__3Arc -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [0 ])<=
  345. __1value )&& ((( (((REAL *)(((struct Arc *)((*__2lptr )))-> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [0 ])<= __1value ))
  346. ( (((*__2lptr ))-> link__3Arc = ((struct Bin *)__1left )-> head__3Bin ),
  347. (((struct Bin *)__1left )-> head__3Bin = ((*__2lptr )))) ;
  348. else
  349. ( (((*__2lptr ))-> link__3Arc = ((struct Bin *)__1right )-> head__3Bin ), (((struct Bin *)__1right )-> head__3Bin = ((*__2lptr )))) ;
  350. }
  351. }
  352. }
  353. }
  354. else
  355. {
  356. struct ArcTdirSorter __2sorter ;
  357. __gl__ct__13ArcTdirSorterFR10S0 ( (struct ArcTdirSorter *)(& __2sorter ), (struct Subdivider *)__0this ) ;
  358. __glqsort__9ArcSorterFPP3Arci ( (struct ArcSorter *)(& __2sorter ), __1list , __1count ) ;
  359. { { Arc_ptr *__2lptr ;
  360. __2lptr = __1list ;
  361. for(;__2lptr < __1last ;__2lptr += 2 )
  362. __glcheck_t__10SubdividerFP3Ar0 ( __0this , __2lptr [0 ], __2lptr [1 ]) ;
  363. for(__2lptr = __1list ;__2lptr < __1last ;__2lptr += 2 )
  364. __gljoin_t__10SubdividerFR3Bin0 ( __0this , __1left , __1right , __2lptr [0 ], __2lptr [1 ]) ;
  365. for(__2lptr = __1list ;__2lptr != __1last ;__2lptr ++ ) {
  366. if (((( (((REAL *)(((struct Arc *)((*__2lptr )))-> next__3Arc -> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [1 ])<=
  367. __1value )&& ((( (((REAL *)(((struct Arc *)((*__2lptr )))-> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [1 ])<= __1value ))
  368. ( (((*__2lptr ))-> link__3Arc = ((struct Bin *)__1left )-> head__3Bin ),
  369. (((struct Bin *)__1left )-> head__3Bin = ((*__2lptr )))) ;
  370. else
  371. ( (((*__2lptr ))-> link__3Arc = ((struct Bin *)__1right )-> head__3Bin ), (((struct Bin *)__1right )-> head__3Bin = ((*__2lptr )))) ;
  372. }
  373. }
  374. }
  375. }
  376. if (__1list != __1arclist )( (((void *)__1list )?( free ( ((void *)__1list )) , 0 ) :( 0 ) )) ;
  377. __gladopt__3BinFv ( (struct Bin *)(& __1unknown )) ;
  378. }
  379. }
  380. }
  381. }
  382. __gl__dt__3BinFv ( (struct Bin *)(& __1unknown ), 2) ;
  383. __gl__dt__3BinFv ( (struct Bin *)(& __1intersections ), 2) ;
  384. }
  385. void __glcheck_s__10SubdividerFP3Ar0 (struct Subdivider *__0this , Arc_ptr __1jarc1 , Arc_ptr __1jarc2 )
  386. {
  387. ((void )0 );
  388. ((void )0 );
  389. ((void )0 );
  390. ((void )0 );
  391. ((void )0 );
  392. if (! ((( (((REAL *)(((struct Arc *)__1jarc1 )-> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [0 ])< (( (((REAL *)(((struct Arc *)__1jarc1 )-> next__3Arc -> pwlArc__3Arc ->
  393. pts__6PwlArc [0 ]). param__10TrimVertex ))) [0 ]))){
  394. mylongjmp ( __0this -> jumpbuffer__10Subdivider , 28 ) ;
  395. }
  396. if (! ((( (((REAL *)(((struct Arc *)__1jarc2 )-> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [0 ])> (( (((REAL *)(((struct Arc *)__1jarc2 )-> next__3Arc -> pwlArc__3Arc ->
  397. pts__6PwlArc [0 ]). param__10TrimVertex ))) [0 ]))){
  398. mylongjmp ( __0this -> jumpbuffer__10Subdivider , 28 ) ;
  399. }
  400. }
  401. void __glbezier__14ArcTessellatorFP0 (struct ArcTessellator *, struct Arc *, REAL , REAL , REAL , REAL );
  402. void __glpwl_right__14ArcTessellato0 (struct ArcTessellator *, struct Arc *, REAL , REAL , REAL , REAL );
  403. void __glpwl_left__14ArcTessellator0 (struct ArcTessellator *, struct Arc *, REAL , REAL , REAL , REAL );
  404. void __gljoin_s__10SubdividerFR3Bin0 (struct Subdivider *__0this , struct Bin *__1left , struct Bin *__1right , Arc_ptr __1jarc1 , Arc_ptr __1jarc2 )
  405. {
  406. ((void )0 );
  407. ((void )0 );
  408. ((void )0 );
  409. if (! ( (((int )(((struct Arc *)__1jarc1 )-> type__3Arc & __gltail_tag__3Arc )))) )
  410. __1jarc1 = __1jarc1 -> next__3Arc ;
  411. if (! ( (((int )(((struct Arc *)__1jarc2 )-> type__3Arc & __gltail_tag__3Arc )))) )
  412. __1jarc2 = __1jarc2 -> next__3Arc ;
  413. { REAL __1s ;
  414. REAL __1t1 ;
  415. REAL __1t2 ;
  416. __1s = (( (((REAL *)(((struct Arc *)__1jarc1 )-> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [0 ]);
  417. __1t1 = (( (((REAL *)(((struct Arc *)__1jarc1 )-> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [1 ]);
  418. __1t2 = (( (((REAL *)(((struct Arc *)__1jarc2 )-> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [1 ]);
  419. if (__1t1 == __1t2 ){
  420. struct Arc *__1__X16 ;
  421. struct Arc *__1__X17 ;
  422. struct Arc *__1__Xtmp002o1qailf ;
  423. ( (__1__X16 = __1jarc1 ), ( (__1__X17 = __1jarc2 ), ( (__1__Xtmp002o1qailf = __1__X17 -> prev__3Arc ), ( (__1__X17 -> prev__3Arc = __1__X16 ->
  424. prev__3Arc ), ( (__1__X16 -> prev__3Arc = __1__Xtmp002o1qailf ), ( (__1__X17 -> prev__3Arc -> next__3Arc = __1__X17 ), (__1__X16 -> prev__3Arc -> next__3Arc = __1__X16 ))
  425. ) ) ) ) ) ;
  426. }
  427. else
  428. {
  429. Arc_ptr __2newright ;
  430. Arc_ptr __2newleft ;
  431. struct Arc *__1__X18 ;
  432. struct Arc *__1__X19 ;
  433. struct Arc *__1__X20 ;
  434. struct Arc *__1__X21 ;
  435. struct Arc *__0__X22 ;
  436. void *__1__Xbuffer00eohgaiaa ;
  437. struct Arc *__0__X23 ;
  438. __2newright = ((__0__X22 = (struct Arc *)( (((void *)( (((void )0 )), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))->
  439. freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool ))), (((struct Pool *)((struct Pool *)(& __0this ->
  440. arcpool__10Subdivider )))-> freelist__4Pool = ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((!
  441. ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))) , 0 )
  442. :( 0 ) ), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool -= ((struct Pool *)((struct Pool *)(& __0this ->
  443. arcpool__10Subdivider )))-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> curblock__4Pool + ((struct Pool *)((struct Pool *)(&
  444. __0this -> arcpool__10Subdivider )))-> nextfree__4Pool ))))) ) ) , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (((struct
  445. Arc *)__0__X22 )-> bezierArc__3Arc = 0 ), ( (((struct Arc *)__0__X22 )-> pwlArc__3Arc = 0 ), ( (((struct Arc *)__0__X22 )-> type__3Arc = 0 ), (
  446. ( ( (((struct Arc *)__0__X22 )-> type__3Arc &= -1793)) , (((struct Arc *)__0__X22 )-> type__3Arc |= ((((long )((int )1)))<< 8 )))
  447. , ( (((struct Arc *)__0__X22 )-> nuid__3Arc = ((long )0.0 )), ((((struct Arc *)__0__X22 )))) ) ) ) ) :0 );
  448. __2newleft = ((__0__X23 = (struct Arc *)( (((void *)( (((void )0 )), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))->
  449. freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool ))), (((struct Pool *)((struct Pool *)(& __0this ->
  450. arcpool__10Subdivider )))-> freelist__4Pool = ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((!
  451. ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))) , 0 )
  452. :( 0 ) ), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool -= ((struct Pool *)((struct Pool *)(& __0this ->
  453. arcpool__10Subdivider )))-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> curblock__4Pool + ((struct Pool *)((struct Pool *)(&
  454. __0this -> arcpool__10Subdivider )))-> nextfree__4Pool ))))) ) ) , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (((struct
  455. Arc *)__0__X23 )-> bezierArc__3Arc = 0 ), ( (((struct Arc *)__0__X23 )-> pwlArc__3Arc = 0 ), ( (((struct Arc *)__0__X23 )-> type__3Arc = 0 ), (
  456. ( ( (((struct Arc *)__0__X23 )-> type__3Arc &= -1793)) , (((struct Arc *)__0__X23 )-> type__3Arc |= ((((long )((int )3)))<< 8 )))
  457. , ( (((struct Arc *)__0__X23 )-> nuid__3Arc = ((long )0.0 )), ((((struct Arc *)__0__X23 )))) ) ) ) ) :0 );
  458. ((void )0 );
  459. if (( __0this -> isArcTypeBezier__10Subdivider ) ){
  460. __glbezier__14ArcTessellatorFP0 ( (struct ArcTessellator *)(& __0this -> arctessellator__10Subdivider ), __2newright , __1s , __1s , __1t1 ,
  461. __1t2 ) ;
  462. __glbezier__14ArcTessellatorFP0 ( (struct ArcTessellator *)(& __0this -> arctessellator__10Subdivider ), __2newleft , __1s , __1s , __1t2 , __1t1 ) ;
  463. }
  464. else
  465. {
  466. __glpwl_right__14ArcTessellato0 ( (struct ArcTessellator *)(& __0this -> arctessellator__10Subdivider ), __2newright , __1s , __1t1 , __1t2 , __0this -> stepsizes__10Subdivider [0 ]) ;
  467. __glpwl_left__14ArcTessellator0 ( (struct ArcTessellator *)(& __0this -> arctessellator__10Subdivider ), __2newleft , __1s , __1t2 , __1t1 , __0this -> stepsizes__10Subdivider [2 ]) ;
  468. }
  469. ( (__1__X18 = __1jarc1 ), ( (__1__X19 = __1jarc2 ), ( (__1__X20 = __2newright ), ( (__1__X21 = __2newleft ), ( (__1__X20 ->
  470. nuid__3Arc = (__1__X21 -> nuid__3Arc = 0 )), ( (__1__X20 -> next__3Arc = __1__X19 ), ( (__1__X21 -> next__3Arc = __1__X18 ), ( (__1__X20 ->
  471. prev__3Arc = __1__X18 -> prev__3Arc ), ( (__1__X21 -> prev__3Arc = __1__X19 -> prev__3Arc ), ( (__1__X21 -> next__3Arc -> prev__3Arc = __1__X21 ), (
  472. (__1__X20 -> next__3Arc -> prev__3Arc = __1__X20 ), ( (__1__X21 -> prev__3Arc -> next__3Arc = __1__X21 ), (__1__X20 -> prev__3Arc -> next__3Arc = __1__X20 )) )
  473. ) ) ) ) ) ) ) ) ) ) ;
  474. ( (__2newright -> link__3Arc = ((struct Bin *)__1left )-> head__3Bin ), (((struct Bin *)__1left )-> head__3Bin = __2newright )) ;
  475. ( (__2newleft -> link__3Arc = ((struct Bin *)__1right )-> head__3Bin ), (((struct Bin *)__1right )-> head__3Bin = __2newleft )) ;
  476. }
  477. ((void )0 );
  478. ((void )0 );
  479. ((void )0 );
  480. ((void )0 );
  481. }
  482. }
  483. void __glcheck_t__10SubdividerFP3Ar0 (struct Subdivider *__0this , Arc_ptr __1jarc1 , Arc_ptr __1jarc2 )
  484. {
  485. ((void )0 );
  486. ((void )0 );
  487. ((void )0 );
  488. ((void )0 );
  489. ((void )0 );
  490. if (! ((( (((REAL *)(((struct Arc *)__1jarc1 )-> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [1 ])< (( (((REAL *)(((struct Arc *)__1jarc1 )-> next__3Arc -> pwlArc__3Arc ->
  491. pts__6PwlArc [0 ]). param__10TrimVertex ))) [1 ]))){
  492. mylongjmp ( __0this -> jumpbuffer__10Subdivider , 28 ) ;
  493. }
  494. if (! ((( (((REAL *)(((struct Arc *)__1jarc2 )-> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [1 ])> (( (((REAL *)(((struct Arc *)__1jarc2 )-> next__3Arc -> pwlArc__3Arc ->
  495. pts__6PwlArc [0 ]). param__10TrimVertex ))) [1 ]))){
  496. mylongjmp ( __0this -> jumpbuffer__10Subdivider , 28 ) ;
  497. }
  498. }
  499. void __glpwl_top__14ArcTessellatorF0 (struct ArcTessellator *, struct Arc *, REAL , REAL , REAL , REAL );
  500. void __glpwl_bottom__14ArcTessellat0 (struct ArcTessellator *, struct Arc *, REAL , REAL , REAL , REAL );
  501. void __gljoin_t__10SubdividerFR3Bin0 (struct Subdivider *__0this , struct Bin *__1bottom , struct Bin *__1top , Arc_ptr __1jarc1 , Arc_ptr __1jarc2 )
  502. {
  503. ((void )0 );
  504. ((void )0 );
  505. ((void )0 );
  506. ((void )0 );
  507. ((void )0 );
  508. if (! ( (((int )(((struct Arc *)__1jarc1 )-> type__3Arc & __gltail_tag__3Arc )))) )
  509. __1jarc1 = __1jarc1 -> next__3Arc ;
  510. if (! ( (((int )(((struct Arc *)__1jarc2 )-> type__3Arc & __gltail_tag__3Arc )))) )
  511. __1jarc2 = __1jarc2 -> next__3Arc ;
  512. { REAL __1s1 ;
  513. REAL __1s2 ;
  514. REAL __1t ;
  515. __1s1 = (( (((REAL *)(((struct Arc *)__1jarc1 )-> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [0 ]);
  516. __1s2 = (( (((REAL *)(((struct Arc *)__1jarc2 )-> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [0 ]);
  517. __1t = (( (((REAL *)(((struct Arc *)__1jarc1 )-> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [1 ]);
  518. if (__1s1 == __1s2 ){
  519. struct Arc *__1__X24 ;
  520. struct Arc *__1__X25 ;
  521. struct Arc *__1__Xtmp002o1qailf ;
  522. ( (__1__X24 = __1jarc1 ), ( (__1__X25 = __1jarc2 ), ( (__1__Xtmp002o1qailf = __1__X25 -> prev__3Arc ), ( (__1__X25 -> prev__3Arc = __1__X24 ->
  523. prev__3Arc ), ( (__1__X24 -> prev__3Arc = __1__Xtmp002o1qailf ), ( (__1__X25 -> prev__3Arc -> next__3Arc = __1__X25 ), (__1__X24 -> prev__3Arc -> next__3Arc = __1__X24 ))
  524. ) ) ) ) ) ;
  525. }
  526. else
  527. {
  528. Arc_ptr __2newtop ;
  529. Arc_ptr __2newbot ;
  530. struct Arc *__1__X26 ;
  531. struct Arc *__1__X27 ;
  532. struct Arc *__1__X28 ;
  533. struct Arc *__1__X29 ;
  534. struct Arc *__0__X30 ;
  535. void *__1__Xbuffer00eohgaiaa ;
  536. struct Arc *__0__X31 ;
  537. __2newtop = ((__0__X30 = (struct Arc *)( (((void *)( (((void )0 )), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))->
  538. freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool ))), (((struct Pool *)((struct Pool *)(& __0this ->
  539. arcpool__10Subdivider )))-> freelist__4Pool = ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((!
  540. ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))) , 0 )
  541. :( 0 ) ), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool -= ((struct Pool *)((struct Pool *)(& __0this ->
  542. arcpool__10Subdivider )))-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> curblock__4Pool + ((struct Pool *)((struct Pool *)(&
  543. __0this -> arcpool__10Subdivider )))-> nextfree__4Pool ))))) ) ) , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (((struct
  544. Arc *)__0__X30 )-> bezierArc__3Arc = 0 ), ( (((struct Arc *)__0__X30 )-> pwlArc__3Arc = 0 ), ( (((struct Arc *)__0__X30 )-> type__3Arc = 0 ), (
  545. ( ( (((struct Arc *)__0__X30 )-> type__3Arc &= -1793)) , (((struct Arc *)__0__X30 )-> type__3Arc |= ((((long )((int )2)))<< 8 )))
  546. , ( (((struct Arc *)__0__X30 )-> nuid__3Arc = ((long )0.0 )), ((((struct Arc *)__0__X30 )))) ) ) ) ) :0 );
  547. __2newbot = ((__0__X31 = (struct Arc *)( (((void *)( (((void )0 )), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))->
  548. freelist__4Pool ?( ( (__1__Xbuffer00eohgaiaa = (((void *)((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool ))), (((struct Pool *)((struct Pool *)(& __0this ->
  549. arcpool__10Subdivider )))-> freelist__4Pool = ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> freelist__4Pool -> next__6Buffer )) , 0 ) :( ( ((!
  550. ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool )?( __glgrow__4PoolFv ( ((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))) , 0 )
  551. :( 0 ) ), ( (((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> nextfree__4Pool -= ((struct Pool *)((struct Pool *)(& __0this ->
  552. arcpool__10Subdivider )))-> buffersize__4Pool ), ( (__1__Xbuffer00eohgaiaa = (((void *)(((struct Pool *)((struct Pool *)(& __0this -> arcpool__10Subdivider )))-> curblock__4Pool + ((struct Pool *)((struct Pool *)(&
  553. __0this -> arcpool__10Subdivider )))-> nextfree__4Pool ))))) ) ) , 0 ) ), (((void *)__1__Xbuffer00eohgaiaa ))) ) ))) )?( (((struct
  554. Arc *)__0__X31 )-> bezierArc__3Arc = 0 ), ( (((struct Arc *)__0__X31 )-> pwlArc__3Arc = 0 ), ( (((struct Arc *)__0__X31 )-> type__3Arc = 0 ), (
  555. ( ( (((struct Arc *)__0__X31 )-> type__3Arc &= -1793)) , (((struct Arc *)__0__X31 )-> type__3Arc |= ((((long )((int )4)))<< 8 )))
  556. , ( (((struct Arc *)__0__X31 )-> nuid__3Arc = ((long )0.0 )), ((((struct Arc *)__0__X31 )))) ) ) ) ) :0 );
  557. ((void )0 );
  558. if (( __0this -> isArcTypeBezier__10Subdivider ) ){
  559. __glbezier__14ArcTessellatorFP0 ( (struct ArcTessellator *)(& __0this -> arctessellator__10Subdivider ), __2newtop , __1s1 , __1s2 , __1t ,
  560. __1t ) ;
  561. __glbezier__14ArcTessellatorFP0 ( (struct ArcTessellator *)(& __0this -> arctessellator__10Subdivider ), __2newbot , __1s2 , __1s1 , __1t , __1t ) ;
  562. }
  563. else
  564. {
  565. __glpwl_top__14ArcTessellatorF0 ( (struct ArcTessellator *)(& __0this -> arctessellator__10Subdivider ), __2newtop , __1t , __1s1 , __1s2 , __0this -> stepsizes__10Subdivider [1 ]) ;
  566. __glpwl_bottom__14ArcTessellat0 ( (struct ArcTessellator *)(& __0this -> arctessellator__10Subdivider ), __2newbot , __1t , __1s2 , __1s1 , __0this -> stepsizes__10Subdivider [3 ]) ;
  567. }
  568. ( (__1__X26 = __1jarc1 ), ( (__1__X27 = __1jarc2 ), ( (__1__X28 = __2newtop ), ( (__1__X29 = __2newbot ), ( (__1__X28 ->
  569. nuid__3Arc = (__1__X29 -> nuid__3Arc = 0 )), ( (__1__X28 -> next__3Arc = __1__X27 ), ( (__1__X29 -> next__3Arc = __1__X26 ), ( (__1__X28 ->
  570. prev__3Arc = __1__X26 -> prev__3Arc ), ( (__1__X29 -> prev__3Arc = __1__X27 -> prev__3Arc ), ( (__1__X29 -> next__3Arc -> prev__3Arc = __1__X29 ), (
  571. (__1__X28 -> next__3Arc -> prev__3Arc = __1__X28 ), ( (__1__X29 -> prev__3Arc -> next__3Arc = __1__X29 ), (__1__X28 -> prev__3Arc -> next__3Arc = __1__X28 )) )
  572. ) ) ) ) ) ) ) ) ) ) ;
  573. ( (__2newtop -> link__3Arc = ((struct Bin *)__1bottom )-> head__3Bin ), (((struct Bin *)__1bottom )-> head__3Bin = __2newtop )) ;
  574. ( (__2newbot -> link__3Arc = ((struct Bin *)__1top )-> head__3Bin ), (((struct Bin *)__1top )-> head__3Bin = __2newbot )) ;
  575. }
  576. ((void )0 );
  577. ((void )0 );
  578. ((void )0 );
  579. ((void )0 );
  580. }
  581. }
  582. /* the end */