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.

261 lines
5.0 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/uarray.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. typedef float REAL ;
  37. typedef void (*Pfvv )(void );
  38. typedef void (*Pfvf )(float *);
  39. typedef int (*cmpfunc )(void *, void *);
  40. typedef REAL Knot ;
  41. typedef REAL *Knot_ptr ;
  42. struct Arc;
  43. struct Uarray;
  44. struct Uarray {
  45. long size__6Uarray ;
  46. long ulines__6Uarray ;
  47. REAL *uarray__6Uarray ;
  48. };
  49. struct Buffer;
  50. struct Buffer {
  51. struct Buffer *next__6Buffer ;
  52. };
  53. struct Pool;
  54. enum __Q2_4Pool5Magic { is_allocated__Q2_4Pool5Magic = 62369, is_free__Q2_4Pool5Magic = 61858} ;
  55. struct Pool {
  56. struct Buffer *freelist__4Pool ;
  57. char *blocklist__4Pool [32];
  58. int nextblock__4Pool ;
  59. char *curblock__4Pool ;
  60. int buffersize__4Pool ;
  61. int nextsize__4Pool ;
  62. int nextfree__4Pool ;
  63. int initsize__4Pool ;
  64. char *name__4Pool ;
  65. int magic__4Pool ;
  66. };
  67. void __glgrow__4PoolFv (struct Pool *);
  68. struct PooledObj;
  69. struct PooledObj {
  70. char __W3__9PooledObj ;
  71. };
  72. struct TrimVertex;
  73. struct PwlArc;
  74. struct PwlArc {
  75. char __W3__9PooledObj ;
  76. struct TrimVertex *pts__6PwlArc ;
  77. int npts__6PwlArc ;
  78. long type__6PwlArc ;
  79. };
  80. struct TrimVertex;
  81. struct TrimVertex {
  82. REAL param__10TrimVertex [2];
  83. long nuid__10TrimVertex ;
  84. };
  85. typedef struct TrimVertex *TrimVertex_p ;
  86. struct Bin;
  87. struct Arc;
  88. struct BezierArc;
  89. typedef struct Arc *Arc_ptr ;
  90. enum arc_side { arc_none = 0, arc_right = 1, arc_top = 2, arc_left = 3, arc_bottom = 4} ;
  91. struct Arc;
  92. struct Arc {
  93. char __W3__9PooledObj ;
  94. Arc_ptr prev__3Arc ;
  95. Arc_ptr next__3Arc ;
  96. Arc_ptr link__3Arc ;
  97. struct BezierArc *bezierArc__3Arc ;
  98. struct PwlArc *pwlArc__3Arc ;
  99. long type__3Arc ;
  100. long nuid__3Arc ;
  101. };
  102. extern int __glbezier_tag__3Arc ;
  103. extern int __glarc_tag__3Arc ;
  104. extern int __gltail_tag__3Arc ;
  105. extern struct __mptr* __ptbl_vec_____core_uarray_c_____ct_[];
  106. struct Uarray *__gl__ct__6UarrayFv (struct Uarray *__0this )
  107. {
  108. void *__1__Xp00uzigaiaa ;
  109. if (__0this || (__0this = (struct Uarray *)( (__1__Xp00uzigaiaa = malloc ( (sizeof (struct Uarray))) ), (__1__Xp00uzigaiaa ?(((void *)__1__Xp00uzigaiaa )):(((void *)__1__Xp00uzigaiaa )))) )){
  110. __0this -> uarray__6Uarray = 0 ;
  111. __0this -> size__6Uarray = 0 ;
  112. } return __0this ;
  113. }
  114. void __gl__dt__6UarrayFv (struct Uarray *__0this ,
  115. int __0__free )
  116. {
  117. void *__1__X5 ;
  118. if (__0this ){
  119. if (__0this -> uarray__6Uarray )( (__1__X5 = (void *)__0this -> uarray__6Uarray ), ( (__1__X5 ?( free ( __1__X5 ) ,
  120. 0 ) :( 0 ) )) ) ;
  121. if (__0this )if (__0__free & 1)( (((void *)__0this )?( free ( ((void *)__0this )) , 0 ) :( 0 ) ))
  122. ;
  123. }
  124. }
  125. long __glinit__6UarrayFfP3ArcT2 (struct Uarray *__0this , REAL __1delta , Arc_ptr __1lo , Arc_ptr __1hi )
  126. {
  127. __0this -> ulines__6Uarray = ((((long )(((( (((REAL *)(((struct Arc *)__1hi )-> pwlArc__3Arc ->
  128. pts__6PwlArc [0 ]). param__10TrimVertex ))) [0 ])- (( (((REAL *)(((struct Arc *)__1lo )-> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [0 ]))/ __1delta )))+ 3 );
  129. if (__0this -> size__6Uarray < __0this -> ulines__6Uarray ){
  130. void *__1__X6 ;
  131. void *__1__Xp00uzigaiaa ;
  132. __0this -> size__6Uarray = (__0this -> ulines__6Uarray * 2 );
  133. if (__0this -> uarray__6Uarray )( (__1__X6 = (void *)__0this -> uarray__6Uarray ), ( (__1__X6 ?( free ( __1__X6 ) , 0 ) :(
  134. 0 ) )) ) ;
  135. __0this -> uarray__6Uarray = (((float *)( (__1__Xp00uzigaiaa = malloc ( ((sizeof (float ))* __0this -> size__6Uarray )) ), (__1__Xp00uzigaiaa ?(((void *)__1__Xp00uzigaiaa )):(((void
  136. *)__1__Xp00uzigaiaa )))) ));
  137. ((void )0 );
  138. }
  139. (__0this -> uarray__6Uarray [0 ])= ((( (((REAL *)(((struct Arc *)__1lo )-> pwlArc__3Arc -> pts__6PwlArc [0 ]). param__10TrimVertex ))) [0 ])- (__1delta / 2.0 ));
  140. { { long __1i ;
  141. __1i = 1 ;
  142. for(;__1i != __0this -> ulines__6Uarray ;__1i ++ )
  143. (__0this -> uarray__6Uarray [__1i ])= ((__0this -> uarray__6Uarray [0 ])+ (__1i * __1delta ));
  144. return __0this -> ulines__6Uarray ;
  145. }
  146. }
  147. }
  148. /* the end */