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.

969 lines
26 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/tobezier.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 Buffer;
  37. struct Buffer {
  38. struct Buffer *next__6Buffer ;
  39. };
  40. struct Pool;
  41. enum __Q2_4Pool5Magic { is_allocated__Q2_4Pool5Magic = 62369, is_free__Q2_4Pool5Magic = 61858} ;
  42. struct Pool {
  43. struct Buffer *freelist__4Pool ;
  44. char *blocklist__4Pool [32];
  45. int nextblock__4Pool ;
  46. char *curblock__4Pool ;
  47. int buffersize__4Pool ;
  48. int nextsize__4Pool ;
  49. int nextfree__4Pool ;
  50. int initsize__4Pool ;
  51. char *name__4Pool ;
  52. int magic__4Pool ;
  53. };
  54. void __glgrow__4PoolFv (struct Pool *);
  55. struct PooledObj;
  56. struct PooledObj {
  57. char __W3__9PooledObj ;
  58. };
  59. typedef float REAL ;
  60. typedef void (*Pfvv )(void );
  61. typedef void (*Pfvf )(float *);
  62. typedef int (*cmpfunc )(void *, void *);
  63. typedef REAL Knot ;
  64. typedef REAL *Knot_ptr ;
  65. struct Backend;
  66. struct Mapdesc;
  67. struct Flist;
  68. struct Knotvector;
  69. struct Quiltspec;
  70. struct Quiltspec {
  71. int stride__9Quiltspec ;
  72. int width__9Quiltspec ;
  73. int offset__9Quiltspec ;
  74. int order__9Quiltspec ;
  75. int index__9Quiltspec ;
  76. int bdry__9Quiltspec [2];
  77. REAL step_size__9Quiltspec ;
  78. Knot *breakpoints__9Quiltspec ;
  79. };
  80. typedef struct Quiltspec *Quiltspec_ptr ;
  81. struct Quilt;
  82. struct Quilt {
  83. char __W3__9PooledObj ;
  84. struct Mapdesc *mapdesc__5Quilt ;
  85. REAL *cpts__5Quilt ;
  86. struct Quiltspec qspec__5Quilt [2];
  87. Quiltspec_ptr eqspec__5Quilt ;
  88. struct Quilt *next__5Quilt ;
  89. };
  90. typedef struct Quilt *Quilt_ptr ;
  91. struct Knotvector;
  92. struct Knotvector {
  93. long order__10Knotvector ;
  94. long knotcount__10Knotvector ;
  95. long stride__10Knotvector ;
  96. Knot *knotlist__10Knotvector ;
  97. };
  98. struct Breakpt;
  99. struct Breakpt {
  100. Knot value__7Breakpt ;
  101. int multi__7Breakpt ;
  102. int def__7Breakpt ;
  103. };
  104. struct Knotspec;
  105. struct Knotspec {
  106. long order__8Knotspec ;
  107. Knot_ptr inkbegin__8Knotspec ;
  108. Knot_ptr inkend__8Knotspec ;
  109. Knot_ptr outkbegin__8Knotspec ;
  110. Knot_ptr outkend__8Knotspec ;
  111. Knot_ptr kleft__8Knotspec ;
  112. Knot_ptr kright__8Knotspec ;
  113. Knot_ptr kfirst__8Knotspec ;
  114. Knot_ptr klast__8Knotspec ;
  115. Knot_ptr sbegin__8Knotspec ;
  116. struct Breakpt *bbegin__8Knotspec ;
  117. struct Breakpt *bend__8Knotspec ;
  118. int ncoords__8Knotspec ;
  119. int prestride__8Knotspec ;
  120. int poststride__8Knotspec ;
  121. int preoffset__8Knotspec ;
  122. int postoffset__8Knotspec ;
  123. int prewidth__8Knotspec ;
  124. int postwidth__8Knotspec ;
  125. int istransformed__8Knotspec ;
  126. struct Knotspec *next__8Knotspec ;
  127. struct Knotspec *kspectotrans__8Knotspec ;
  128. };
  129. struct Splinespec;
  130. struct Splinespec {
  131. struct Knotspec *kspec__10Splinespec ;
  132. int dim__10Splinespec ;
  133. REAL *outcpts__10Splinespec ;
  134. };
  135. struct Splinespec *__gl__ct__10SplinespecFi (struct Splinespec *, int );
  136. void __glkspecinit__10SplinespecFR10 (struct Splinespec *, struct Knotvector *);
  137. void __glselect__10SplinespecFv (struct Splinespec *);
  138. void __gllayout__10SplinespecFl (struct Splinespec *, long );
  139. void __glsetupquilt__10SplinespecFP0 (struct Splinespec *, Quilt_ptr );
  140. void __glcopy__10SplinespecFPf (struct Splinespec *, float *);
  141. void __gltransform__10SplinespecFv (struct Splinespec *);
  142. extern struct __mptr* __ptbl_vec_____core_tobezier_c___toBezier_[];
  143. void __gltoBezier__5QuiltFR10Knotve0 (struct Quilt *__0this ,
  144. struct Knotvector *__1knotvector ,
  145. float *__1ctlpts ,
  146. long __1ncoords )
  147. {
  148. struct Splinespec __1spline ;
  149. __gl__ct__10SplinespecFi ( (struct Splinespec *)(& __1spline ), 1 ) ;
  150. __glkspecinit__10SplinespecFR10 ( (struct Splinespec *)(& __1spline ), __1knotvector ) ;
  151. __glselect__10SplinespecFv ( (struct Splinespec *)(& __1spline )) ;
  152. __gllayout__10SplinespecFl ( (struct Splinespec *)(& __1spline ), __1ncoords ) ;
  153. __glsetupquilt__10SplinespecFP0 ( (struct Splinespec *)(& __1spline ), (struct Quilt *)__0this ) ;
  154. __glcopy__10SplinespecFPf ( (struct Splinespec *)(& __1spline ), __1ctlpts ) ;
  155. __gltransform__10SplinespecFv ( (struct Splinespec *)(& __1spline )) ;
  156. }
  157. void __glkspecinit__10SplinespecFR11 (struct Splinespec *, struct Knotvector *, struct Knotvector *);
  158. void __gltoBezier__5QuiltFR10Knotve1 (struct Quilt *__0this ,
  159. struct Knotvector *__1sknotvector ,
  160. struct Knotvector *__1tknotvector ,
  161. float *__1ctlpts ,
  162. long __1ncoords )
  163. {
  164. struct Splinespec __1spline ;
  165. __gl__ct__10SplinespecFi ( (struct Splinespec *)(& __1spline ), 2 ) ;
  166. __glkspecinit__10SplinespecFR11 ( (struct Splinespec *)(& __1spline ), __1sknotvector , __1tknotvector ) ;
  167. __glselect__10SplinespecFv ( (struct Splinespec *)(& __1spline )) ;
  168. __gllayout__10SplinespecFl ( (struct Splinespec *)(& __1spline ), __1ncoords ) ;
  169. __glsetupquilt__10SplinespecFP0 ( (struct Splinespec *)(& __1spline ), (struct Quilt *)__0this ) ;
  170. __glcopy__10SplinespecFPf ( (struct Splinespec *)(& __1spline ), __1ctlpts ) ;
  171. __gltransform__10SplinespecFv ( (struct Splinespec *)(& __1spline )) ;
  172. }
  173. struct Splinespec *__gl__ct__10SplinespecFi (struct Splinespec *__0this , int __1dimen )
  174. {
  175. void *__1__Xp00uzigaiaa ;
  176. if (__0this || (__0this = (struct Splinespec *)( (__1__Xp00uzigaiaa = malloc ( (sizeof (struct Splinespec))) ), (__1__Xp00uzigaiaa ?(((void *)__1__Xp00uzigaiaa )):(((void *)__1__Xp00uzigaiaa )))) ))
  177. __0this ->
  178. dim__10Splinespec = __1dimen ;
  179. return __0this ;
  180. }
  181. struct Knotspec *__gl__ct__8KnotspecFv (struct Knotspec *);
  182. void __glkspecinit__10SplinespecFR10 (struct Splinespec *__0this , struct Knotvector *__1knotvector )
  183. {
  184. struct Knotspec *__0__X5 ;
  185. __0this -> kspec__10Splinespec = __gl__ct__8KnotspecFv ( (struct Knotspec *)0 ) ;
  186. __0this -> kspec__10Splinespec -> inkbegin__8Knotspec = ((*__1knotvector )). knotlist__10Knotvector ;
  187. __0this -> kspec__10Splinespec -> inkend__8Knotspec = (((*__1knotvector )). knotlist__10Knotvector + ((*__1knotvector )). knotcount__10Knotvector );
  188. __0this -> kspec__10Splinespec -> prestride__8Knotspec = (((int )((*__1knotvector )). stride__10Knotvector ));
  189. __0this -> kspec__10Splinespec -> order__8Knotspec = ((*__1knotvector )). order__10Knotvector ;
  190. __0this -> kspec__10Splinespec -> next__8Knotspec = 0 ;
  191. }
  192. void __glkspecinit__10SplinespecFR11 (struct Splinespec *__0this , struct Knotvector *__1sknotvector , struct Knotvector *__1tknotvector )
  193. {
  194. struct Knotspec *__0__X6 ;
  195. __0this -> kspec__10Splinespec = __gl__ct__8KnotspecFv ( (struct Knotspec *)0 ) ;
  196. { struct Knotspec *__1tkspec ;
  197. struct Knotspec *__0__X7 ;
  198. __1tkspec = __gl__ct__8KnotspecFv ( (struct Knotspec *)0 ) ;
  199. __0this -> kspec__10Splinespec -> inkbegin__8Knotspec = ((*__1sknotvector )). knotlist__10Knotvector ;
  200. __0this -> kspec__10Splinespec -> inkend__8Knotspec = (((*__1sknotvector )). knotlist__10Knotvector + ((*__1sknotvector )). knotcount__10Knotvector );
  201. __0this -> kspec__10Splinespec -> prestride__8Knotspec = (((int )((*__1sknotvector )). stride__10Knotvector ));
  202. __0this -> kspec__10Splinespec -> order__8Knotspec = ((*__1sknotvector )). order__10Knotvector ;
  203. __0this -> kspec__10Splinespec -> next__8Knotspec = __1tkspec ;
  204. __1tkspec -> inkbegin__8Knotspec = ((*__1tknotvector )). knotlist__10Knotvector ;
  205. __1tkspec -> inkend__8Knotspec = (((*__1tknotvector )). knotlist__10Knotvector + ((*__1tknotvector )). knotcount__10Knotvector );
  206. __1tkspec -> prestride__8Knotspec = (((int )((*__1tknotvector )). stride__10Knotvector ));
  207. __1tkspec -> order__8Knotspec = ((*__1tknotvector )). order__10Knotvector ;
  208. __1tkspec -> next__8Knotspec = 0 ;
  209. }
  210. }
  211. void __glpreselect__8KnotspecFv (struct Knotspec *);
  212. void __glselect__8KnotspecFv (struct Knotspec *);
  213. void __glselect__10SplinespecFv (struct Splinespec *__0this )
  214. {
  215. { { struct Knotspec *__1knotspec ;
  216. __1knotspec = __0this -> kspec__10Splinespec ;
  217. for(;__1knotspec ;__1knotspec = __1knotspec -> next__8Knotspec ) {
  218. __glpreselect__8KnotspecFv ( (struct Knotspec *)__1knotspec ) ;
  219. __glselect__8KnotspecFv ( (struct Knotspec *)__1knotspec ) ;
  220. }
  221. }
  222. }
  223. }
  224. void __gllayout__10SplinespecFl (struct Splinespec *__0this , long __1ncoords )
  225. {
  226. long __1stride ;
  227. __1stride = __1ncoords ;
  228. { { struct Knotspec *__1knotspec ;
  229. void *__1__Xp00uzigaiaa ;
  230. __1knotspec = __0this -> kspec__10Splinespec ;
  231. for(;__1knotspec ;__1knotspec = __1knotspec -> next__8Knotspec ) {
  232. __1knotspec -> poststride__8Knotspec = (((int )__1stride ));
  233. __1stride *= (((__1knotspec -> bend__8Knotspec - __1knotspec -> bbegin__8Knotspec )* __1knotspec -> order__8Knotspec )+ __1knotspec -> postoffset__8Knotspec );
  234. __1knotspec -> preoffset__8Knotspec *= __1knotspec -> prestride__8Knotspec ;
  235. __1knotspec -> prewidth__8Knotspec *= __1knotspec -> poststride__8Knotspec ;
  236. __1knotspec -> postwidth__8Knotspec *= __1knotspec -> poststride__8Knotspec ;
  237. __1knotspec -> postoffset__8Knotspec *= __1knotspec -> poststride__8Knotspec ;
  238. __1knotspec -> ncoords__8Knotspec = (((int )__1ncoords ));
  239. }
  240. __0this -> outcpts__10Splinespec = (((float *)( (__1__Xp00uzigaiaa = malloc ( ((sizeof (float ))* __1stride )) ), (__1__Xp00uzigaiaa ?(((void *)__1__Xp00uzigaiaa )):(((void *)__1__Xp00uzigaiaa ))))
  241. ));
  242. ((void )0 );
  243. }
  244. }
  245. }
  246. void __glcopy__8KnotspecFPfT1 (struct Knotspec *, float *, REAL *);
  247. void __glcopy__10SplinespecFPf (struct Splinespec *__0this , float *__1incpts )
  248. {
  249. __glcopy__8KnotspecFPfT1 ( (struct Knotspec *)__0this -> kspec__10Splinespec , __1incpts , __0this -> outcpts__10Splinespec ) ;
  250. }
  251. void __glsetupquilt__10SplinespecFP0 (struct Splinespec *__0this , Quilt_ptr __1quilt )
  252. {
  253. Quiltspec_ptr __1qspec ;
  254. __1qspec = __1quilt -> qspec__5Quilt ;
  255. __1quilt -> eqspec__5Quilt = (__1qspec + __0this -> dim__10Splinespec );
  256. { { struct Knotspec *__1knotspec ;
  257. __1knotspec = __0this -> kspec__10Splinespec ;
  258. for(;__1knotspec ;( (__1knotspec = __1knotspec -> next__8Knotspec ), (__1qspec ++ )) ) {
  259. void *__1__Xp00uzigaiaa ;
  260. __1qspec -> stride__9Quiltspec = __1knotspec -> poststride__8Knotspec ;
  261. __1qspec -> width__9Quiltspec = (__1knotspec -> bend__8Knotspec - __1knotspec -> bbegin__8Knotspec );
  262. __1qspec -> order__9Quiltspec = (((int )__1knotspec -> order__8Knotspec ));
  263. __1qspec -> offset__9Quiltspec = __1knotspec -> postoffset__8Knotspec ;
  264. __1qspec -> index__9Quiltspec = 0 ;
  265. (__1qspec -> bdry__9Quiltspec [0 ])= ((__1knotspec -> kleft__8Knotspec == __1knotspec -> kfirst__8Knotspec )?1 :0 );
  266. (__1qspec -> bdry__9Quiltspec [1 ])= ((__1knotspec -> kright__8Knotspec == __1knotspec -> klast__8Knotspec )?1 :0 );
  267. __1qspec -> breakpoints__9Quiltspec = (((float *)( (__1__Xp00uzigaiaa = malloc ( ((sizeof (float ))* (__1qspec -> width__9Quiltspec + 1 ))) ), (__1__Xp00uzigaiaa ?(((void
  268. *)__1__Xp00uzigaiaa )):(((void *)__1__Xp00uzigaiaa )))) ));
  269. { Knot_ptr __2k ;
  270. __2k = __1qspec -> breakpoints__9Quiltspec ;
  271. { { struct Breakpt *__2bk ;
  272. __2bk = __1knotspec -> bbegin__8Knotspec ;
  273. for(;__2bk <= __1knotspec -> bend__8Knotspec ;__2bk ++ )
  274. ((*(__2k ++ )))= __2bk -> value__7Breakpt ;
  275. }
  276. }
  277. }
  278. }
  279. __1quilt -> cpts__5Quilt = __0this -> outcpts__10Splinespec ;
  280. __1quilt -> next__5Quilt = 0 ;
  281. }
  282. }
  283. }
  284. void __gltransform__8KnotspecFPf (struct Knotspec *, REAL *);
  285. void __gltransform__10SplinespecFv (struct Splinespec *__0this )
  286. {
  287. { { struct Knotspec *__1knotspec ;
  288. __1knotspec = __0this -> kspec__10Splinespec ;
  289. for(;__1knotspec ;__1knotspec = __1knotspec -> next__8Knotspec )
  290. __1knotspec -> istransformed__8Knotspec = 0 ;
  291. for(__1knotspec = __0this -> kspec__10Splinespec ;__1knotspec ;__1knotspec = __1knotspec -> next__8Knotspec ) {
  292. { { struct Knotspec *__2kspec2 ;
  293. __2kspec2 = __0this -> kspec__10Splinespec ;
  294. for(;__2kspec2 ;__2kspec2 = __2kspec2 -> next__8Knotspec )
  295. __2kspec2 -> kspectotrans__8Knotspec = __1knotspec ;
  296. __gltransform__8KnotspecFPf ( (struct Knotspec *)__0this -> kspec__10Splinespec , __0this -> outcpts__10Splinespec ) ;
  297. __1knotspec -> istransformed__8Knotspec = 1 ;
  298. }
  299. }
  300. }
  301. }
  302. }
  303. }
  304. struct Knotspec *__gl__ct__8KnotspecFv (struct Knotspec *__0this )
  305. {
  306. void *__1__Xp00uzigaiaa ;
  307. if (__0this || (__0this = (struct Knotspec *)( (__1__Xp00uzigaiaa = malloc ( (sizeof (struct Knotspec))) ), (__1__Xp00uzigaiaa ?(((void *)__1__Xp00uzigaiaa )):(((void *)__1__Xp00uzigaiaa )))) )){
  308. __0this -> bbegin__8Knotspec = 0 ;
  309. __0this -> sbegin__8Knotspec = 0 ;
  310. __0this -> outkbegin__8Knotspec = 0 ;
  311. } return __0this ;
  312. }
  313. void __glpt_io_copy__8KnotspecFPfT1 (struct Knotspec *, REAL *, float *);
  314. void __glcopy__8KnotspecFPfT1 (struct Knotspec *__0this , float *__1inpt , REAL *__1outpt )
  315. {
  316. __1inpt = (((float *)((((long )__1inpt ))+ __0this -> preoffset__8Knotspec )));
  317. if (__0this -> next__8Knotspec ){
  318. { { REAL *__2lpt ;
  319. __2lpt = (__1outpt + __0this -> prewidth__8Knotspec );
  320. for(;__1outpt != __2lpt ;__1outpt += __0this -> poststride__8Knotspec ) {
  321. __glcopy__8KnotspecFPfT1 ( (struct Knotspec *)__0this -> next__8Knotspec , __1inpt , __1outpt ) ;
  322. __1inpt = (((float *)((((long )__1inpt ))+ __0this -> prestride__8Knotspec )));
  323. }
  324. }
  325. }
  326. }
  327. else
  328. {
  329. { { REAL *__2lpt ;
  330. __2lpt = (__1outpt + __0this -> prewidth__8Knotspec );
  331. for(;__1outpt != __2lpt ;__1outpt += __0this -> poststride__8Knotspec ) {
  332. __glpt_io_copy__8KnotspecFPfT1 ( __0this , __1outpt , __1inpt ) ;
  333. __1inpt = (((float *)((((long )__1inpt ))+ __0this -> prestride__8Knotspec )));
  334. }
  335. }
  336. }
  337. }
  338. }
  339. void __glshowpts__8KnotspecFPf (struct Knotspec *, REAL *);
  340. void __glshowpts__8KnotspecFPf (struct Knotspec *__0this , REAL *__1outpt )
  341. {
  342. if (__0this -> next__8Knotspec ){
  343. { { REAL *__2lpt ;
  344. __2lpt = (__1outpt + __0this -> prewidth__8Knotspec );
  345. for(;__1outpt != __2lpt ;__1outpt += __0this -> poststride__8Knotspec )
  346. __glshowpts__8KnotspecFPf ( (struct Knotspec *)__0this -> next__8Knotspec , __1outpt ) ;
  347. }
  348. }
  349. }
  350. else
  351. {
  352. { { REAL *__2lpt ;
  353. __2lpt = (__1outpt + __0this -> prewidth__8Knotspec );
  354. for(;__1outpt != __2lpt ;__1outpt += __0this -> poststride__8Knotspec )
  355. ( 0 ) ;
  356. }
  357. }
  358. }
  359. }
  360. void __glfactors__8KnotspecFv (struct Knotspec *__0this )
  361. {
  362. Knot *__1mid ;
  363. Knot_ptr __1fptr ;
  364. __1mid = (((__0this -> outkend__8Knotspec - 1 )- __0this -> order__8Knotspec )+ __0this -> bend__8Knotspec -> multi__7Breakpt );
  365. __1fptr = __0this -> sbegin__8Knotspec ;
  366. { { struct Breakpt *__1bpt ;
  367. __1bpt = __0this -> bend__8Knotspec ;
  368. for(;__1bpt >= __0this -> bbegin__8Knotspec ;__1bpt -- ) {
  369. __1mid -= __1bpt -> multi__7Breakpt ;
  370. { int __2def ;
  371. __2def = (__1bpt -> def__7Breakpt - 1 );
  372. if (__2def <= 0 )continue ;
  373. { Knot __2kv ;
  374. Knot *__2kf ;
  375. __2kv = __1bpt -> value__7Breakpt ;
  376. __2kf = ((__1mid - __2def )+ (__0this -> order__8Knotspec - 1 ));
  377. { { Knot *__2kl ;
  378. __2kl = (__2kf + __2def );
  379. for(;__2kl != __2kf ;__2kl -- ) {
  380. Knot *__3kh ;
  381. Knot *__3kt ;
  382. for(( (__3kt = __2kl ), (__3kh = __1mid )) ;__3kt != __2kf ;( (__3kh -- ), (__3kt -- )) )
  383. ((*(__1fptr ++ )))=
  384. ((__2kv - ((*__3kh )))/ (((*__3kt ))- ((*__3kh ))));
  385. ((*__2kl ))= __2kv ;
  386. }
  387. }
  388. }
  389. }
  390. }
  391. }
  392. }
  393. }
  394. }
  395. void __glpt_oo_sum__8KnotspecFPfN210 (struct Knotspec *, REAL *, REAL *, REAL *, Knot , Knot );
  396. void __glpt_oo_copy__8KnotspecFPfT1 (struct Knotspec *, REAL *, REAL *);
  397. void __glinsert__8KnotspecFPf (struct Knotspec *__0this , REAL *__1p )
  398. {
  399. Knot_ptr __1fptr ;
  400. REAL *__1srcpt ;
  401. REAL *__1dstpt ;
  402. struct Breakpt *__1bpt ;
  403. __1fptr = __0this -> sbegin__8Knotspec ;
  404. __1srcpt = ((__1p + __0this -> prewidth__8Knotspec )- __0this -> poststride__8Knotspec );
  405. __1dstpt = (((__1p + __0this -> postwidth__8Knotspec )+ __0this -> postoffset__8Knotspec )- __0this -> poststride__8Knotspec );
  406. __1bpt = __0this -> bend__8Knotspec ;
  407. { { REAL *__1pend ;
  408. __1pend = (__1srcpt - (__0this -> poststride__8Knotspec * __1bpt -> def__7Breakpt ));
  409. for(;__1srcpt != __1pend ;__1pend += __0this -> poststride__8Knotspec ) {
  410. REAL *__2p1 ;
  411. __2p1 = __1srcpt ;
  412. { { REAL *__2p2 ;
  413. __2p2 = (__1srcpt - __0this -> poststride__8Knotspec );
  414. for(;__2p2 != __1pend ;( (__2p1 = __2p2 ), (__2p2 -= __0this -> poststride__8Knotspec )) ) {
  415. __glpt_oo_sum__8KnotspecFPfN210 ( __0this , __2p1 , __2p1 , __2p2 ,
  416. (*__1fptr ), (float )(1.0 - ((*__1fptr )))) ;
  417. __1fptr ++ ;
  418. }
  419. }
  420. }
  421. }
  422. for(-- __1bpt ;__1bpt >= __0this -> bbegin__8Knotspec ;__1bpt -- ) {
  423. { { int __2multi ;
  424. __2multi = __1bpt -> multi__7Breakpt ;
  425. for(;__2multi > 0 ;__2multi -- ) {
  426. __glpt_oo_copy__8KnotspecFPfT1 ( __0this , __1dstpt , __1srcpt ) ;
  427. __1dstpt -= __0this -> poststride__8Knotspec ;
  428. __1srcpt -= __0this -> poststride__8Knotspec ;
  429. }
  430. { { REAL *__2pend ;
  431. __2pend = (__1srcpt - (__0this -> poststride__8Knotspec * __1bpt -> def__7Breakpt ));
  432. for(;__1srcpt != __2pend ;( (__2pend += __0this -> poststride__8Knotspec ), (__1dstpt -= __0this -> poststride__8Knotspec )) ) {
  433. __glpt_oo_copy__8KnotspecFPfT1 ( __0this , __1dstpt , __1srcpt )
  434. ;
  435. { REAL *__3p1 ;
  436. __3p1 = __1srcpt ;
  437. { { REAL *__3p2 ;
  438. __3p2 = (__1srcpt - __0this -> poststride__8Knotspec );
  439. for(;__3p2 != __2pend ;( (__3p1 = __3p2 ), (__3p2 -= __0this -> poststride__8Knotspec )) ) {
  440. __glpt_oo_sum__8KnotspecFPfN210 ( __0this , __3p1 , __3p1 , __3p2 ,
  441. (*__1fptr ), (float )(1.0 - ((*__1fptr )))) ;
  442. __1fptr ++ ;
  443. }
  444. }
  445. }
  446. }
  447. }
  448. }
  449. }
  450. }
  451. }
  452. }
  453. }
  454. }
  455. }
  456. void __glpreselect__8KnotspecFv (struct Knotspec *__0this )
  457. {
  458. Knot __1kval ;
  459. for(( (__0this -> klast__8Knotspec = (__0this -> inkend__8Knotspec - __0this -> order__8Knotspec )), (__1kval = ((*__0this -> klast__8Knotspec )))) ;__0this -> klast__8Knotspec != __0this -> inkend__8Knotspec ;__0this ->
  460. klast__8Knotspec ++ )
  461. if (! ( (((((*__0this -> klast__8Knotspec ))- __1kval )< 10.0e-5 )?1 :0 )) )break ;
  462. for(( (__0this -> kfirst__8Knotspec = ((__0this -> inkbegin__8Knotspec + __0this -> order__8Knotspec )- 1 )), (__1kval = ((*__0this -> kfirst__8Knotspec )))) ;__0this -> kfirst__8Knotspec != __0this ->
  463. inkend__8Knotspec ;__0this -> kfirst__8Knotspec ++ )
  464. if (! ( (((((*__0this -> kfirst__8Knotspec ))- __1kval )< 10.0e-5 )?1 :0 )) )break ;
  465. { { Knot_ptr __1k ;
  466. unsigned int __0__X8 ;
  467. struct Breakpt *__0__X9 ;
  468. unsigned int __1__X10 ;
  469. void *__1__Xp00uzigaiaa ;
  470. __1k = (__0this -> kfirst__8Knotspec - 1 );
  471. for(;__1k >= __0this -> inkbegin__8Knotspec ;__1k -- )
  472. if (! ( (((__1kval - ((*__1k )))< 10.0e-5 )?1 :0 )) )break ;
  473. __1k ++ ;
  474. __0this -> bbegin__8Knotspec = ( (__0__X9 = (struct Breakpt *)( (__1__X10 = ((sizeof (struct Breakpt ))* (__0__X8 = ((__0this -> klast__8Knotspec - __0this ->
  475. kfirst__8Knotspec )+ 1 )))), ( (__1__Xp00uzigaiaa = malloc ( __1__X10 ) ), (__1__Xp00uzigaiaa ?(((void *)__1__Xp00uzigaiaa )):(((void *)__1__Xp00uzigaiaa )))) ) ), __0__X9 ) ;
  476. __0this -> bbegin__8Knotspec -> multi__7Breakpt = (__0this -> kfirst__8Knotspec - __1k );
  477. __0this -> bbegin__8Knotspec -> value__7Breakpt = __1kval ;
  478. __0this -> bend__8Knotspec = __0this -> bbegin__8Knotspec ;
  479. __0this -> kleft__8Knotspec = (__0this -> kright__8Knotspec = __0this -> kfirst__8Knotspec );
  480. }
  481. }
  482. }
  483. void __glbreakpoints__8KnotspecFv (struct Knotspec *);
  484. void __glknots__8KnotspecFv (struct Knotspec *);
  485. void __glselect__8KnotspecFv (struct Knotspec *__0this )
  486. {
  487. __glbreakpoints__8KnotspecFv ( __0this ) ;
  488. __glknots__8KnotspecFv ( __0this ) ;
  489. __glfactors__8KnotspecFv ( __0this ) ;
  490. __0this -> preoffset__8Knotspec = (__0this -> kleft__8Knotspec - (__0this -> inkbegin__8Knotspec + __0this -> order__8Knotspec ));
  491. __0this -> postwidth__8Knotspec = (((int )((__0this -> bend__8Knotspec - __0this -> bbegin__8Knotspec )* __0this -> order__8Knotspec )));
  492. __0this -> prewidth__8Knotspec = (((int )((__0this -> outkend__8Knotspec - __0this -> outkbegin__8Knotspec )- __0this -> order__8Knotspec )));
  493. __0this -> postoffset__8Knotspec = ((__0this -> bbegin__8Knotspec -> def__7Breakpt > 1 )?(__0this -> bbegin__8Knotspec -> def__7Breakpt - 1 ):0 );
  494. }
  495. void __glbreakpoints__8KnotspecFv (struct Knotspec *__0this )
  496. {
  497. struct Breakpt *__1ubpt ;
  498. struct Breakpt *__1ubend ;
  499. long __1nfactors ;
  500. __1ubpt = __0this -> bbegin__8Knotspec ;
  501. __1ubend = __0this -> bend__8Knotspec ;
  502. __1nfactors = 0 ;
  503. __1ubpt -> value__7Breakpt = __1ubend -> value__7Breakpt ;
  504. __1ubpt -> multi__7Breakpt = __1ubend -> multi__7Breakpt ;
  505. __0this -> kleft__8Knotspec = __0this -> kright__8Knotspec ;
  506. for(;__0this -> kright__8Knotspec != __0this -> klast__8Knotspec ;__0this -> kright__8Knotspec ++ ) {
  507. if (( (((((*__0this -> kright__8Knotspec ))- __1ubpt -> value__7Breakpt )< 10.0e-5 )?1 :0 ))
  508. ){
  509. __1ubpt -> multi__7Breakpt ++ ;
  510. }
  511. else
  512. {
  513. __1ubpt -> def__7Breakpt = (((int )(__0this -> order__8Knotspec - __1ubpt -> multi__7Breakpt )));
  514. __1nfactors += ((__1ubpt -> def__7Breakpt * (__1ubpt -> def__7Breakpt - 1 ))/ 2 );
  515. (++ __1ubpt )-> value__7Breakpt = ((*__0this -> kright__8Knotspec ));
  516. __1ubpt -> multi__7Breakpt = 1 ;
  517. }
  518. }
  519. __1ubpt -> def__7Breakpt = (((int )(__0this -> order__8Knotspec - __1ubpt -> multi__7Breakpt )));
  520. __1nfactors += ((__1ubpt -> def__7Breakpt * (__1ubpt -> def__7Breakpt - 1 ))/ 2 );
  521. __0this -> bend__8Knotspec = __1ubpt ;
  522. if (__1nfactors ){
  523. void *__1__Xp00uzigaiaa ;
  524. __0this -> sbegin__8Knotspec = (float *)(((float *)( (__1__Xp00uzigaiaa = malloc ( ((sizeof (float ))* __1nfactors )) ), (__1__Xp00uzigaiaa ?(((void *)__1__Xp00uzigaiaa )):(((void
  525. *)__1__Xp00uzigaiaa )))) ));
  526. }
  527. else
  528. {
  529. __0this -> sbegin__8Knotspec = 0 ;
  530. }
  531. }
  532. void __glknots__8KnotspecFv (struct Knotspec *__0this )
  533. {
  534. Knot_ptr __1inkpt ;
  535. Knot_ptr __1inkend ;
  536. void *__1__Xp00uzigaiaa ;
  537. __1inkpt = (__0this -> kleft__8Knotspec - __0this -> order__8Knotspec );
  538. __1inkend = (__0this -> kright__8Knotspec + __0this -> bend__8Knotspec -> def__7Breakpt );
  539. __0this -> outkbegin__8Knotspec = (float *)(((float *)( (__1__Xp00uzigaiaa = malloc ( ((sizeof (float ))* (__1inkend - __1inkpt ))) ), (__1__Xp00uzigaiaa ?(((void
  540. *)__1__Xp00uzigaiaa )):(((void *)__1__Xp00uzigaiaa )))) ));
  541. { { Knot_ptr __1outkpt ;
  542. __1outkpt = __0this -> outkbegin__8Knotspec ;
  543. for(;__1inkpt != __1inkend ;( (__1inkpt ++ ), (__1outkpt ++ )) )
  544. ((*__1outkpt ))= ((*__1inkpt ));
  545. __0this -> outkend__8Knotspec = __1outkpt ;
  546. }
  547. }
  548. }
  549. void __gltransform__8KnotspecFPf (struct Knotspec *__0this , REAL *__1p )
  550. {
  551. if (__0this -> next__8Knotspec ){
  552. if (__0this == (struct Knotspec *)__0this -> kspectotrans__8Knotspec ){
  553. __gltransform__8KnotspecFPf ( (struct
  554. Knotspec *)__0this -> next__8Knotspec , __1p ) ;
  555. }
  556. else
  557. {
  558. if (__0this -> istransformed__8Knotspec ){
  559. __1p += __0this -> postoffset__8Knotspec ;
  560. { { REAL *__4pend ;
  561. __4pend = (__1p + __0this -> postwidth__8Knotspec );
  562. for(;__1p != __4pend ;__1p += __0this -> poststride__8Knotspec )
  563. __gltransform__8KnotspecFPf ( (struct Knotspec *)__0this -> next__8Knotspec , __1p ) ;
  564. }
  565. }
  566. }
  567. else
  568. {
  569. REAL *__4pend ;
  570. __4pend = (__1p + __0this -> prewidth__8Knotspec );
  571. for(;__1p != __4pend ;__1p += __0this -> poststride__8Knotspec )
  572. __gltransform__8KnotspecFPf ( (struct Knotspec *)__0this -> next__8Knotspec , __1p ) ;
  573. }
  574. }
  575. }
  576. else
  577. {
  578. if (__0this == (struct Knotspec *)__0this -> kspectotrans__8Knotspec ){
  579. __glinsert__8KnotspecFPf ( __0this , __1p ) ;
  580. }
  581. else
  582. {
  583. if (__0this -> istransformed__8Knotspec ){
  584. __1p += __0this -> postoffset__8Knotspec ;
  585. { { REAL *__4pend ;
  586. __4pend = (__1p + __0this -> postwidth__8Knotspec );
  587. for(;__1p != __4pend ;__1p += __0this -> poststride__8Knotspec )
  588. __glinsert__8KnotspecFPf ( (struct Knotspec *)__0this -> kspectotrans__8Knotspec , __1p ) ;
  589. }
  590. }
  591. }
  592. else
  593. {
  594. REAL *__4pend ;
  595. __4pend = (__1p + __0this -> prewidth__8Knotspec );
  596. for(;__1p != __4pend ;__1p += __0this -> poststride__8Knotspec )
  597. __glinsert__8KnotspecFPf ( (struct Knotspec *)__0this -> kspectotrans__8Knotspec , __1p ) ;
  598. }
  599. }
  600. }
  601. }
  602. void __gl__dt__8KnotspecFv (struct Knotspec *__0this ,
  603. int __0__free )
  604. {
  605. void *__1__X11 ;
  606. void *__1__X12 ;
  607. void *__1__X13 ;
  608. if (__0this ){
  609. if (__0this -> bbegin__8Knotspec )( (__1__X11 = (void *)__0this -> bbegin__8Knotspec ), ( (__1__X11 ?( free ( __1__X11 ) ,
  610. 0 ) :( 0 ) )) ) ;
  611. if (__0this -> sbegin__8Knotspec )( (__1__X12 = (void *)__0this -> sbegin__8Knotspec ), ( (__1__X12 ?( free ( __1__X12 ) , 0 ) :(
  612. 0 ) )) ) ;
  613. if (__0this -> outkbegin__8Knotspec )( (__1__X13 = (void *)__0this -> outkbegin__8Knotspec ), ( (__1__X13 ?( free ( __1__X13 ) , 0 ) :(
  614. 0 ) )) ) ;
  615. if (__0this )if (__0__free & 1)( (((void *)__0this )?( free ( ((void *)__0this )) , 0 ) :( 0 ) ))
  616. ;
  617. }
  618. }
  619. void __glpt_io_copy__8KnotspecFPfT1 (struct Knotspec *__0this , REAL *__1topt , float *__1frompt )
  620. {
  621. switch (__0this -> ncoords__8Knotspec ){
  622. case 4 :
  623. (__1topt [3 ])= (((float )(__1frompt [3 ])));
  624. case 3 :
  625. (__1topt [2 ])= (((float )(__1frompt [2 ])));
  626. case 2 :
  627. (__1topt [1 ])= (((float )(__1frompt [1 ])));
  628. case 1 :
  629. (__1topt [0 ])= (((float )(__1frompt [0 ])));
  630. break ;
  631. default :{
  632. { { int __3i ;
  633. __3i = 0 ;
  634. for(;__3i < __0this -> ncoords__8Knotspec ;__3i ++ )
  635. ((*(__1topt ++ )))= (((float )((*(__1frompt ++ )))));
  636. }
  637. }
  638. }
  639. }
  640. }
  641. // extern void *memcpy (void *, void *, size_t );
  642. void __glpt_oo_copy__8KnotspecFPfT1 (struct Knotspec *__0this , REAL *__1topt , REAL *__1frompt )
  643. {
  644. switch (__0this -> ncoords__8Knotspec ){
  645. case 4 :
  646. (__1topt [3 ])= (__1frompt [3 ]);
  647. case 3 :
  648. (__1topt [2 ])= (__1frompt [2 ]);
  649. case 2 :
  650. (__1topt [1 ])= (__1frompt [1 ]);
  651. case 1 :
  652. (__1topt [0 ])= (__1frompt [0 ]);
  653. break ;
  654. default :
  655. memcpy ( (void *)__1topt , (void *)__1frompt , __0this -> ncoords__8Knotspec * (sizeof (REAL ))) ;
  656. }
  657. }
  658. void __glpt_oo_sum__8KnotspecFPfN210 (struct Knotspec *__0this , REAL *__1x , REAL *__1y , REAL *__1z , Knot __1a , Knot __1b )
  659. {
  660. switch (__0this -> ncoords__8Knotspec ){
  661. case 4 :
  662. (__1x [3 ])= ((__1a *
  663. (__1y [3 ]))+ (__1b * (__1z [3 ])));
  664. case 3 :
  665. (__1x [2 ])= ((__1a * (__1y [2 ]))+ (__1b * (__1z [2 ])));
  666. case 2 :
  667. (__1x [1 ])= ((__1a * (__1y [1 ]))+ (__1b * (__1z [1 ])));
  668. case 1 :
  669. (__1x [0 ])= ((__1a * (__1y [0 ]))+ (__1b * (__1z [0 ])));
  670. break ;
  671. default :{
  672. { { int __3i ;
  673. __3i = 0 ;
  674. for(;__3i < __0this -> ncoords__8Knotspec ;__3i ++ )
  675. ((*(__1x ++ )))= ((__1a * ((*(__1y ++ ))))+ (__1b * ((*(__1z ++ )))));
  676. }
  677. }
  678. }
  679. }
  680. }
  681. /* the end */