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.

334 lines
7.1 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/curvelist.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 Mapdesc;
  92. struct Curve;
  93. struct Curvelist;
  94. struct Curvelist {
  95. struct Curve *curve__9Curvelist ;
  96. float range__9Curvelist [3];
  97. int needsSubdivision__9Curvelist ;
  98. float stepsize__9Curvelist ;
  99. };
  100. struct Mapdesc;
  101. struct Curve;
  102. struct Curve {
  103. struct Curve *next__5Curve ;
  104. struct Mapdesc *mapdesc__5Curve ;
  105. int stride__5Curve ;
  106. int order__5Curve ;
  107. int cullval__5Curve ;
  108. int needsSampling__5Curve ;
  109. REAL cpts__5Curve [120];
  110. REAL spts__5Curve [120];
  111. REAL stepsize__5Curve ;
  112. REAL minstepsize__5Curve ;
  113. REAL range__5Curve [3];
  114. };
  115. struct Curve *__gl__ct__5CurveFP5QuiltfT2P5C0 (struct Curve *, struct Quilt *, REAL , REAL , struct Curve *);
  116. extern struct __mptr* __ptbl_vec_____core_curvelist_c_____ct_[];
  117. struct Curvelist *__gl__ct__9CurvelistFP5QuiltfT0 (struct Curvelist *__0this , struct Quilt *__1quilts , REAL __1pta , REAL __1ptb )
  118. {
  119. void *__1__Xp00uzigaiaa ;
  120. if (__0this || (__0this = (struct Curvelist *)( (__1__Xp00uzigaiaa = malloc ( (sizeof (struct Curvelist))) ), (__1__Xp00uzigaiaa ?(((void *)__1__Xp00uzigaiaa )):(((void *)__1__Xp00uzigaiaa )))) )){
  121. __0this -> curve__9Curvelist = 0 ;
  122. { { struct Quilt *__1q ;
  123. struct Curve *__0__X5 ;
  124. __1q = __1quilts ;
  125. for(;__1q ;__1q = __1q -> next__5Quilt )
  126. __0this -> curve__9Curvelist = __gl__ct__5CurveFP5QuiltfT2P5C0 ( (struct Curve *)0 , __1q , __1pta , __1ptb , __0this -> curve__9Curvelist ) ;
  127. (__0this -> range__9Curvelist [0 ])= __1pta ;
  128. (__0this -> range__9Curvelist [1 ])= __1ptb ;
  129. (__0this -> range__9Curvelist [2 ])= (__1ptb - __1pta );
  130. }
  131. }
  132. } return __0this ;
  133. }
  134. struct Curve *__gl__ct__5CurveFR5CurvefP5Cur0 (struct Curve *, struct Curve *, REAL , struct Curve *);
  135. struct Curvelist *__gl__ct__9CurvelistFR9Curveli0 (struct Curvelist *__0this , struct Curvelist *__1upper , REAL __1value )
  136. {
  137. struct Curvelist *__1lower ;
  138. void *__1__Xp00uzigaiaa ;
  139. if (__0this || (__0this = (struct Curvelist *)( (__1__Xp00uzigaiaa = malloc ( (sizeof (struct Curvelist))) ), (__1__Xp00uzigaiaa ?(((void *)__1__Xp00uzigaiaa )):(((void *)__1__Xp00uzigaiaa )))) )){
  140. __1lower = (struct Curvelist *)__0this ;
  141. __0this -> curve__9Curvelist = 0 ;
  142. { { struct Curve *__1c ;
  143. struct Curve *__0__X6 ;
  144. __1c = ((*__1upper )). curve__9Curvelist ;
  145. for(;__1c ;__1c = __1c -> next__5Curve )
  146. __0this -> curve__9Curvelist = __gl__ct__5CurveFR5CurvefP5Cur0 ( (struct Curve *)0 , (struct Curve *)__1c , __1value , __0this -> curve__9Curvelist ) ;
  147. (((*__1lower )). range__9Curvelist [0 ])= (((*__1upper )). range__9Curvelist [0 ]);
  148. (((*__1lower )). range__9Curvelist [1 ])= __1value ;
  149. (((*__1lower )). range__9Curvelist [2 ])= (__1value - (((*__1upper )). range__9Curvelist [0 ]));
  150. (((*__1upper )). range__9Curvelist [0 ])= __1value ;
  151. (((*__1upper )). range__9Curvelist [2 ])= ((((*__1upper )). range__9Curvelist [1 ])- __1value );
  152. }
  153. }
  154. } return __0this ;
  155. }
  156. void __gl__dt__9CurvelistFv (struct Curvelist *__0this ,
  157. int __0__free )
  158. { if (__0this ){
  159. while (__0this -> curve__9Curvelist ){
  160. struct Curve *__2c ;
  161. __2c = __0this -> curve__9Curvelist ;
  162. __0this -> curve__9Curvelist = __0this -> curve__9Curvelist -> next__5Curve ;
  163. ( (((void *)__2c )?( free ( ((void *)__2c )) , 0 ) :( 0 ) )) ;
  164. }
  165. if (__0this )if (__0__free & 1)( (((void *)__0this )?( free ( ((void *)__0this )) , 0 ) :( 0 ) ))
  166. ;
  167. }
  168. }
  169. int __glcullCheck__5CurveFv (struct Curve *);
  170. int __glcullCheck__9CurvelistFv (struct Curvelist *__0this )
  171. {
  172. { { struct Curve *__1c ;
  173. __1c = __0this -> curve__9Curvelist ;
  174. for(;__1c ;__1c = __1c -> next__5Curve )
  175. if (__glcullCheck__5CurveFv ( (struct Curve *)__1c ) == 0 )
  176. return 0 ;
  177. return 2 ;
  178. }
  179. }
  180. }
  181. void __glgetstepsize__5CurveFv (struct Curve *);
  182. void __glclamp__5CurveFv (struct Curve *);
  183. int __glneedsSamplingSubdivision__0 (struct Curve *);
  184. void __glgetstepsize__9CurvelistFv (struct Curvelist *__0this )
  185. {
  186. __0this -> stepsize__9Curvelist = (__0this -> range__9Curvelist [2 ]);
  187. { { struct Curve *__1c ;
  188. __1c = __0this -> curve__9Curvelist ;
  189. for(;__1c ;__1c = __1c -> next__5Curve ) {
  190. __glgetstepsize__5CurveFv ( (struct Curve *)__1c ) ;
  191. __glclamp__5CurveFv ( (struct Curve *)__1c ) ;
  192. __0this -> stepsize__9Curvelist = ((__1c -> stepsize__5Curve < __0this -> stepsize__9Curvelist )?__1c -> stepsize__5Curve :__0this -> stepsize__9Curvelist );
  193. if (__glneedsSamplingSubdivision__0 ( (struct Curve *)__1c ) )break ;
  194. }
  195. __0this -> needsSubdivision__9Curvelist = (__1c ?1 :0 );
  196. }
  197. }
  198. }
  199. int __glneedsSamplingSubdivision__1 (struct Curvelist *__0this )
  200. {
  201. return __0this -> needsSubdivision__9Curvelist ;
  202. }
  203. /* the end */