PageRenderTime 26ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/dev-libs/vdk/files/vdk-2.4-gcc3.4.patch

https://github.com/1000timesdead/portage
Patch | 165 lines | 158 code | 7 blank | 0 comment | 0 complexity | c3617790721213fc5725772e45f7b02b MD5 | raw file
  1. --- vdk/chart.cc_old 2002-05-22 17:26:12.000000000 +0900
  2. +++ vdk/chart.cc 2004-08-05 19:16:35.000000000 +0900
  3. @@ -45,7 +45,10 @@
  4. size = Usize;
  5. printf("\nsize:%d,%d",size.x,size.y);
  6. fflush(stdout);
  7. - axis = ChartAxis(this,size.X(),size.Y());
  8. + // patch Bug#262091
  9. + // axis = ChartAxis(this,size.X(),size.Y());
  10. + ChartAxis axis_tmp( this, size.X(), size.Y() );
  11. + axis = axis_tmp;
  12. axis.Draw();
  13. DrawTitle();
  14. DrawChart();
  15. @@ -115,7 +118,10 @@
  16. void VDKChart::SetChartBorder(int b)
  17. {
  18. size = Usize;
  19. -axis = ChartAxis(this,size.X(),size.Y());
  20. +// patch Bug#262091
  21. +// axis = ChartAxis(this,size.X(),size.Y());
  22. +ChartAxis axis_tmp(this,size.X(),size.Y());
  23. +axis = axis_tmp;
  24. DrawChart();
  25. }
  26. /*
  27. @@ -415,10 +421,18 @@
  28. ChartAxis::ChartAxis(VDKChart* owner,int w, int h):
  29. owner(owner)
  30. {
  31. +// patch Bug#262091
  32. +/*
  33. domain = VDKRect(owner->ChartBorder,
  34. h-owner->ChartBorder,
  35. w-owner->ChartBorder*2,
  36. h-owner->ChartBorder*2);
  37. +*/
  38. +VDKRect r(owner->ChartBorder,
  39. + h-owner->ChartBorder,
  40. + w-owner->ChartBorder*2,
  41. + h-owner->ChartBorder*2);
  42. +domain = r;
  43. }
  44. /*
  45. copy-initializer
  46. --- vdk/vdkbtrees.h_old 2000-11-22 14:10:33.000000000 +0900
  47. +++ vdk/vdkbtrees.h 2004-08-05 19:16:36.000000000 +0900
  48. @@ -717,7 +717,7 @@
  49. class AbstractRedBlackTree : public AbstractBinaryTree<T, Node> {
  50. protected:
  51. virtual Node *FindNode(T q)
  52. - { return (root) ? (Node *) root->find(q) : NULL; }
  53. + { return (this->root) ? (Node *) this->root->find(q) : NULL; }
  54. };
  55. /*!
  56. @@ -985,14 +985,14 @@
  57. BlackHeight = -1;
  58. // Check binary tree properties.
  59. - if (parent != _parent)
  60. + if (this->parent != _parent)
  61. return NULL;
  62. - if (left) {
  63. - if (object < left->object)
  64. + if (this->left) {
  65. + if (this->object < this->left->object)
  66. return NULL;
  67. }
  68. - if (right) {
  69. - if (right->object < object)
  70. + if (this->right) {
  71. + if (this->right->object < this->object)
  72. return NULL;
  73. }
  74. @@ -1001,15 +1001,15 @@
  75. // If a node is red, then both its children are black
  76. // (NULL nodes are black).
  77. if (clr == Red) {
  78. - if ((left && left->clr != Black) ||
  79. - (right && right->clr != Black))
  80. + if ((this->left && this->left->clr != Black) ||
  81. + (this->right && this->right->clr != Black))
  82. return NULL;
  83. }
  84. // The black-heights of all leaf nodes are equal.
  85. int bh = NULL;
  86. - if ((! left) && (! right)) {
  87. + if ((! this->left) && (! this->right)) {
  88. // Compute black-height of node
  89. for (Node *sc = (Node *) this; sc; sc = sc->parent)
  90. if (sc->clr == Black)
  91. @@ -1023,9 +1023,9 @@
  92. return NULL;
  93. }
  94. }
  95. - if (left && (! left->CheckTreeProperties((Node *) this)))
  96. + if (this->left && (! this->left->CheckTreeProperties((Node *) this)))
  97. return NULL;
  98. - if (right && (! right->CheckTreeProperties((Node *) this)))
  99. + if (this->right && (! this->right->CheckTreeProperties((Node *) this)))
  100. return NULL;
  101. return 1;
  102. }
  103. --- vdk/vdkheap.h_old 2000-11-22 14:10:52.000000000 +0900
  104. +++ vdk/vdkheap.h 2004-08-05 19:16:36.000000000 +0900
  105. @@ -85,7 +85,7 @@
  106. VDKHeap<T>::VDKHeap(T* source, int size): VDKContainer<T>(size)
  107. {
  108. for(int i = 0; i < size; i++)
  109. - data[i] = source[i];
  110. + this->data[i] = source[i];
  111. BuildHeap();
  112. }
  113. @@ -94,13 +94,13 @@
  114. void VDKHeap<T>::Heapify(int i, int heapsize)
  115. {
  116. int l = left(i), r = right(i), largest = i;
  117. - if( (l < heapsize) && (data[l] > data[i])) largest = l;
  118. - if( (r < heapsize) && (data[r] > data[largest])) largest = r;
  119. + if( (l < heapsize) && (this->data[l] > this->data[i])) largest = l;
  120. + if( (r < heapsize) && (this->data[r] > this->data[largest])) largest = r;
  121. if(largest != i)
  122. {
  123. - T temp = data[i];
  124. - data[i] = data[largest];
  125. - data[largest] = temp;
  126. + T temp = this->data[i];
  127. + this->data[i] = this->data[largest];
  128. + this->data[largest] = temp;
  129. Heapify(largest,heapsize);
  130. }
  131. }
  132. @@ -109,21 +109,21 @@
  133. template <class T>
  134. void VDKHeap<T>::BuildHeap(void)
  135. {
  136. - for (int i = (size()-1)/2 ; i >= 0; i--)
  137. - Heapify(i,size());
  138. + for (int i = (this->size()-1)/2 ; i >= 0; i--)
  139. + Heapify(i,this->size());
  140. }
  141. // HEAPSORT
  142. template <class T>
  143. void VDKHeap<T>::Sort(void)
  144. {
  145. - int heapsize = size();
  146. + int heapsize = this->size();
  147. int i = heapsize-1;
  148. for(; i > 0; i--)
  149. {
  150. - T temp = data[0];
  151. - data[0] = data[i];
  152. - data[i] = temp;
  153. + T temp = this->data[0];
  154. + this->data[0] = this->data[i];
  155. + this->data[i] = temp;
  156. heapsize--;
  157. Heapify(0,heapsize);
  158. }