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.

339 lines
5.6 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 <setjmp.h>
  19. struct JumpBuffer {
  20. jmp_buf buf;
  21. };
  22. #define mysetjmp(x) setjmp((x)->buf)
  23. #define mylongjmp(x,y) longjmp((x)->buf, y)
  24. /* <<AT&T USL C++ Language System <3.0.1> 02/03/92>> */
  25. /* < ../core/reader.c++ > */
  26. void *__vec_new (void *, int , int , void *);
  27. void __vec_ct (void *, int , int , void *);
  28. void __vec_dt (void *, int , int , void *);
  29. void __vec_delete (void *, int , int , void *, int , int );
  30. typedef int (*__vptp)(void);
  31. struct __mptr {short d; short i; __vptp f; };
  32. typedef unsigned int size_t ;
  33. // extern void *malloc (size_t );
  34. // extern void free (void *);
  35. struct Buffer;
  36. struct Buffer {
  37. struct Buffer *next__6Buffer ;
  38. };
  39. struct Pool;
  40. enum __Q2_4Pool5Magic { is_allocated__Q2_4Pool5Magic = 62369, is_free__Q2_4Pool5Magic = 61858} ;
  41. struct Pool {
  42. struct Buffer *freelist__4Pool ;
  43. char *blocklist__4Pool [32];
  44. int nextblock__4Pool ;
  45. char *curblock__4Pool ;
  46. int buffersize__4Pool ;
  47. int nextsize__4Pool ;
  48. int nextfree__4Pool ;
  49. int initsize__4Pool ;
  50. char *name__4Pool ;
  51. int magic__4Pool ;
  52. };
  53. void __glgrow__4PoolFv (struct Pool *);
  54. struct PooledObj;
  55. struct PooledObj {
  56. char __W3__9PooledObj ;
  57. };
  58. typedef float REAL ;
  59. typedef void (*Pfvv )(void );
  60. typedef void (*Pfvf )(float *);
  61. typedef int (*cmpfunc )(void *, void *);
  62. typedef REAL Knot ;
  63. typedef REAL *Knot_ptr ;
  64. enum Curvetype { ct_nurbscurve = 0, ct_pwlcurve = 1, ct_none = 2} ;
  65. struct Property;
  66. struct O_surface;
  67. struct O_nurbssurface;
  68. struct O_trim;
  69. struct O_pwlcurve;
  70. struct O_nurbscurve;
  71. struct O_curve;
  72. struct Quilt;
  73. struct TrimVertex;
  74. union __Q2_7O_curve4__C1;
  75. union __Q2_7O_curve4__C1 {
  76. struct O_nurbscurve *o_nurbscurve ;
  77. struct O_pwlcurve *o_pwlcurve ;
  78. };
  79. struct O_curve;
  80. struct O_curve {
  81. char __W3__9PooledObj ;
  82. union __Q2_7O_curve4__C1 curve__7O_curve ;
  83. int curvetype__7O_curve ;
  84. struct O_curve *next__7O_curve ;
  85. struct O_surface *owner__7O_curve ;
  86. int used__7O_curve ;
  87. int save__7O_curve ;
  88. long nuid__7O_curve ;
  89. };
  90. struct O_nurbscurve;
  91. struct O_nurbscurve {
  92. char __W3__9PooledObj ;
  93. struct Quilt *bezier_curves__12O_nurbscurve ;
  94. long type__12O_nurbscurve ;
  95. REAL tesselation__12O_nurbscurve ;
  96. int method__12O_nurbscurve ;
  97. struct O_nurbscurve *next__12O_nurbscurve ;
  98. int used__12O_nurbscurve ;
  99. int save__12O_nurbscurve ;
  100. struct O_curve *owner__12O_nurbscurve ;
  101. };
  102. struct O_pwlcurve;
  103. struct O_pwlcurve {
  104. char __W3__9PooledObj ;
  105. struct TrimVertex *pts__10O_pwlcurve ;
  106. int npts__10O_pwlcurve ;
  107. struct O_pwlcurve *next__10O_pwlcurve ;
  108. int used__10O_pwlcurve ;
  109. int save__10O_pwlcurve ;
  110. struct O_curve *owner__10O_pwlcurve ;
  111. };
  112. struct O_trim;
  113. struct O_trim {
  114. char __W3__9PooledObj ;
  115. struct O_curve *o_curve__6O_trim ;
  116. struct O_trim *next__6O_trim ;
  117. int save__6O_trim ;
  118. };
  119. struct O_nurbssurface;
  120. struct O_nurbssurface {
  121. char __W3__9PooledObj ;
  122. struct Quilt *bezier_patches__14O_nurbssurface ;
  123. long type__14O_nurbssurface ;
  124. struct O_surface *owner__14O_nurbssurface ;
  125. struct O_nurbssurface *next__14O_nurbssurface ;
  126. int save__14O_nurbssurface ;
  127. int used__14O_nurbssurface ;
  128. };
  129. struct O_surface;
  130. struct O_surface {
  131. char __W3__9PooledObj ;
  132. struct O_nurbssurface *o_nurbssurface__9O_surface ;
  133. struct O_trim *o_trim__9O_surface ;
  134. int save__9O_surface ;
  135. long nuid__9O_surface ;
  136. };
  137. struct Property;
  138. struct Property {
  139. char __W3__9PooledObj ;
  140. long type__8Property ;
  141. long tag__8Property ;
  142. REAL value__8Property ;
  143. int save__8Property ;
  144. };
  145. struct NurbsTessellator;
  146. struct TrimVertex;
  147. struct TrimVertex {
  148. REAL param__10TrimVertex [2];
  149. long nuid__10TrimVertex ;
  150. };
  151. typedef struct TrimVertex *TrimVertex_p ;
  152. extern struct __mptr* __ptbl_vec_____core_reader_c_____ct_[];
  153. struct O_pwlcurve *__gl__ct__10O_pwlcurveFlT1PfT10 (struct O_pwlcurve *__0this , long __1_type , long __1count , float *__1array , long __1byte_stride , struct TrimVertex *__1trimpts )
  154. {
  155. __0this ->
  156. next__10O_pwlcurve = 0 ;
  157. __0this -> used__10O_pwlcurve = 0 ;
  158. __0this -> owner__10O_pwlcurve = 0 ;
  159. __0this -> pts__10O_pwlcurve = __1trimpts ;
  160. __0this -> npts__10O_pwlcurve = (((int )__1count ));
  161. switch (__1_type ){
  162. case 0x8 :{
  163. struct TrimVertex *__3v ;
  164. __3v = __0this -> pts__10O_pwlcurve ;
  165. { { struct TrimVertex *__3lastv ;
  166. __3lastv = (__3v + __1count );
  167. for(;__3v != __3lastv ;__3v ++ ) {
  168. (__3v -> param__10TrimVertex [0 ])= (((float )(__1array [0 ])));
  169. (__3v -> param__10TrimVertex [1 ])= (((float )(__1array [1 ])));
  170. __1array = (((float *)((((char *)__1array ))+ __1byte_stride )));
  171. }
  172. break ;
  173. }
  174. }
  175. }
  176. case 0xd :{
  177. struct TrimVertex *__3v ;
  178. __3v = __0this -> pts__10O_pwlcurve ;
  179. { { struct TrimVertex *__3lastv ;
  180. __3lastv = (__3v + __1count );
  181. for(;__3v != __3lastv ;__3v ++ ) {
  182. (__3v -> param__10TrimVertex [0 ])= ((((float )(__1array [0 ])))/ (((float )(__1array [2 ]))));
  183. (__3v -> param__10TrimVertex [1 ])= ((((float )(__1array [1 ])))/ (((float )(__1array [2 ]))));
  184. __1array = (((float *)((((char *)__1array ))+ __1byte_stride )));
  185. }
  186. break ;
  187. }
  188. }
  189. }
  190. }
  191. return __0this ;
  192. }
  193. /* the end */