7964
|
1 |
--- xplanet-1.2.2/src/Options.cpp 2010-10-07 00:33:33.000000000 +0200
|
|
2 |
+++ xplanet-1.2.2-patch/src/Options.cpp 2011-12-04 11:31:45.916019745 +0100
|
|
3 |
@@ -6,6 +6,8 @@
|
|
4 |
#include <sstream>
|
|
5 |
using namespace std;
|
|
6 |
|
|
7 |
+#include <stdlib.h>
|
|
8 |
+
|
|
9 |
#include <sys/time.h>
|
|
10 |
|
|
11 |
#include "config.h"
|
|
12 |
--- xplanet-1.2.2/src/Ring.cpp 2009-03-30 15:44:35.000000000 +0200
|
|
13 |
+++ xplanet-1.2.2-patch/src/Ring.cpp 2011-12-04 11:37:00.821352008 +0100
|
|
14 |
@@ -171,6 +171,7 @@
|
|
15 |
Ring::getValue(const double *array, const int size, const int window,
|
|
16 |
const double dr, const double r, const double lon)
|
|
17 |
{
|
|
18 |
+ bool *shaded;
|
|
19 |
int i = static_cast<int> ((r_out - r)/dr);
|
|
20 |
|
|
21 |
if (i < 0 || i >= size) return(-1.0);
|
|
22 |
@@ -180,7 +181,10 @@
|
|
23 |
if (j1 < 0) j1 = 0;
|
|
24 |
if (j2 >= size) j2 = size - 1;
|
|
25 |
|
|
26 |
- bool shaded[j2-j1];
|
|
27 |
+ shaded = (bool *)malloc((j2-j1) * sizeof (bool));
|
|
28 |
+ if (shaded == NULL)
|
|
29 |
+ abort();
|
|
30 |
+
|
|
31 |
for (int j = 0; j < j2-j1; j++) shaded[j] = false;
|
|
32 |
|
|
33 |
const double cosLon = cos(lon);
|
|
34 |
--- xplanet-1.2.2/src/Satellite.cpp 2009-07-14 13:38:35.000000000 +0200
|
|
35 |
+++ xplanet-1.2.2-patch/src/Satellite.cpp 2011-12-04 11:37:38.725340490 +0100
|
|
36 |
@@ -4,6 +4,7 @@
|
|
37 |
#include <iostream>
|
|
38 |
using namespace std;
|
|
39 |
|
|
40 |
+#include <stdio.h>
|
|
41 |
#include <sys/time.h>
|
|
42 |
|
|
43 |
#include "xpUtil.h"
|
|
44 |
--- xplanet-1.2.2/src/drawMultipleBodies.cpp 2010-10-07 00:33:33.000000000 +0200
|
|
45 |
+++ xplanet-1.2.2-patch/src/drawMultipleBodies.cpp 2011-12-04 11:38:14.397953141 +0100
|
|
46 |
@@ -8,6 +8,8 @@
|
|
47 |
#include <vector>
|
|
48 |
using namespace std;
|
|
49 |
|
|
50 |
+#include <stdio.h>
|
|
51 |
+
|
|
52 |
#include "body.h"
|
|
53 |
#include "buildPlanetMap.h"
|
|
54 |
#include "config.h"
|
|
55 |
--- xplanet-1.2.2/src/libannotate/addMarkers.cpp 2009-08-30 04:28:23.000000000 +0200
|
|
56 |
+++ xplanet-1.2.2-patch/src/libannotate/addMarkers.cpp 2011-12-04 11:15:54.694776565 +0100
|
|
57 |
@@ -10,6 +10,8 @@
|
1
|
58 |
#include <vector>
|
|
59 |
using namespace std;
|
|
60 |
|
|
61 |
+#include <stdlib.h>
|
|
62 |
+
|
|
63 |
#include "buildPlanetMap.h"
|
|
64 |
#include "findFile.h"
|
|
65 |
#include "keywords.h"
|
7964
|
66 |
--- xplanet-1.2.2/src/libannotate/addSatellites.cpp 2010-07-30 23:49:06.000000000 +0200
|
|
67 |
+++ xplanet-1.2.2-patch/src/libannotate/addSatellites.cpp 2011-12-04 11:20:29.029088477 +0100
|
|
68 |
@@ -10,6 +10,8 @@
|
1
|
69 |
#include <vector>
|
|
70 |
using namespace std;
|
|
71 |
|
7964
|
72 |
+#include <stdio.h>
|
1
|
73 |
+
|
|
74 |
#include "findFile.h"
|
|
75 |
#include "keywords.h"
|
|
76 |
#include "Options.h"
|
7964
|
77 |
--- xplanet-1.2.2/src/libdisplay/DisplayBase.cpp 2009-08-30 04:09:11.000000000 +0200
|
|
78 |
+++ xplanet-1.2.2-patch/src/libdisplay/DisplayBase.cpp 2011-12-04 11:24:30.776600052 +0100
|
1
|
79 |
@@ -7,6 +7,9 @@
|
|
80 |
#include <vector>
|
|
81 |
using namespace std;
|
|
82 |
|
|
83 |
+#include <stdio.h>
|
|
84 |
+#include <stdlib.h>
|
|
85 |
+
|
|
86 |
#include "body.h"
|
|
87 |
#include "findFile.h"
|
|
88 |
#include "keywords.h"
|
7964
|
89 |
--- xplanet-1.2.2/src/libdisplay/DisplayOutput.cpp 2008-11-14 00:45:20.000000000 +0100
|
|
90 |
+++ xplanet-1.2.2-patch/src/libdisplay/DisplayOutput.cpp 2011-12-04 11:25:13.176822608 +0100
|
|
91 |
@@ -5,6 +5,8 @@
|
1
|
92 |
#include <sstream>
|
|
93 |
using namespace std;
|
|
94 |
|
|
95 |
+#include <stdio.h>
|
|
96 |
+
|
|
97 |
#include "keywords.h"
|
|
98 |
#include "Options.h"
|
|
99 |
#include "PlanetProperties.h"
|
7964
|
100 |
--- xplanet-1.2.2/src/libmultiple/drawEllipsoid.cpp 2006-03-26 07:03:20.000000000 +0200
|
|
101 |
+++ xplanet-1.2.2-patch/src/libmultiple/drawEllipsoid.cpp 2011-12-04 11:27:25.440968769 +0100
|
|
102 |
@@ -84,7 +84,7 @@
|
|
103 |
|
|
104 |
if (determinant < 0) continue;
|
|
105 |
|
|
106 |
- double u = -(b + sqrt(determinant));
|
|
107 |
+ double u = -(b + std::sqrt(determinant));
|
|
108 |
u /= a;
|
|
109 |
|
|
110 |
// if the intersection point is behind the observer, don't
|
|
111 |
@@ -116,7 +116,7 @@
|
|
112 |
double opacity = 1;
|
|
113 |
if (pR * determinant/centerDet < 10)
|
|
114 |
{
|
|
115 |
- opacity = 1 - pow(1-determinant/centerDet, pR);
|
|
116 |
+ opacity = 1 - std::pow(1-determinant/centerDet, pR);
|
|
117 |
}
|
|
118 |
display->setPixel(i, j, color, opacity);
|
|
119 |
}
|
|
120 |
--- xplanet-1.2.2/src/libmultiple/drawSphere.cpp 2006-03-26 07:03:20.000000000 +0200
|
|
121 |
+++ xplanet-1.2.2-patch/src/libmultiple/drawSphere.cpp 2011-12-04 11:27:04.049112351 +0100
|
|
122 |
@@ -70,7 +70,7 @@
|
|
123 |
|
|
124 |
if (determinant < 0) continue;
|
|
125 |
|
|
126 |
- double u = -(b + sqrt(determinant));
|
|
127 |
+ double u = -(b + std::sqrt(determinant));
|
|
128 |
u /= a;
|
|
129 |
|
|
130 |
// if the intersection point is behind the observer, don't
|
|
131 |
@@ -105,7 +105,7 @@
|
|
132 |
double opacity = 1;
|
|
133 |
if (pR * determinant/centerDet < 10)
|
|
134 |
{
|
|
135 |
- opacity = 1 - pow(1-determinant/centerDet, pR);
|
|
136 |
+ opacity = 1 - std::pow(1-determinant/centerDet, pR);
|
|
137 |
}
|
|
138 |
display->setPixel(i, j, color, opacity);
|
|
139 |
}
|
|
140 |
--- xplanet-1.2.2/src/libprojection/ProjectionBonne.cpp 2006-03-26 07:03:20.000000000 +0200
|
|
141 |
+++ xplanet-1.2.2-patch/src/libprojection/ProjectionBonne.cpp 2011-12-04 11:28:17.497449483 +0100
|
1
|
142 |
@@ -13,6 +13,8 @@
|
|
143 |
#include <vector>
|
|
144 |
using namespace std;
|
|
145 |
|
|
146 |
+#include <stdio.h>
|
|
147 |
+
|
|
148 |
#include "Options.h"
|
|
149 |
#include "ProjectionBonne.h"
|
|
150 |
#include "xpUtil.h"
|
7964
|
151 |
--- xplanet-1.2.2/src/libprojection/ProjectionGnomonic.cpp 2006-03-26 07:03:20.000000000 +0200
|
|
152 |
+++ xplanet-1.2.2-patch/src/libprojection/ProjectionGnomonic.cpp 2011-12-04 11:28:42.609666622 +0100
|
1
|
153 |
@@ -12,6 +12,8 @@
|
|
154 |
#include <sstream>
|
|
155 |
using namespace std;
|
|
156 |
|
|
157 |
+#include <stdio.h>
|
|
158 |
+
|
|
159 |
#include "Options.h"
|
|
160 |
#include "ProjectionGnomonic.h"
|
|
161 |
#include "xpUtil.h"
|
7964
|
162 |
--- xplanet-1.2.2/src/libprojection/ProjectionMercator.cpp 2006-03-26 07:03:20.000000000 +0200
|
|
163 |
+++ xplanet-1.2.2-patch/src/libprojection/ProjectionMercator.cpp 2011-12-04 11:29:41.162354654 +0100
|
1
|
164 |
@@ -3,6 +3,8 @@
|
|
165 |
#include <sstream>
|
|
166 |
using namespace std;
|
|
167 |
|
|
168 |
+#include <stdio.h>
|
|
169 |
+
|
|
170 |
#include "Options.h"
|
|
171 |
#include "ProjectionMercator.h"
|
|
172 |
#include "xpUtil.h"
|
7964
|
173 |
--- xplanet-1.2.2/src/libprojection/getProjection.cpp 2008-11-14 00:50:36.000000000 +0100
|
|
174 |
+++ xplanet-1.2.2-patch/src/libprojection/getProjection.cpp 2011-12-04 11:30:58.402591739 +0100
|
|
175 |
@@ -5,6 +5,8 @@
|
|
176 |
#include <vector>
|
1
|
177 |
using namespace std;
|
|
178 |
|
|
179 |
+#include <stdlib.h>
|
7964
|
180 |
+
|
|
181 |
#include "keywords.h"
|
1
|
182 |
#include "xpUtil.h"
|
|
183 |
|
7964
|
184 |
--- xplanet-1.2.2/src/parse.cpp 2010-07-30 23:49:14.000000000 +0200
|
|
185 |
+++ xplanet-1.2.2-patch/src/parse.cpp 2011-12-04 11:38:48.790296464 +0100
|
1
|
186 |
@@ -4,6 +4,8 @@
|
|
187 |
#include <string>
|
|
188 |
using namespace std;
|
|
189 |
|
|
190 |
+#include <stdio.h>
|
|
191 |
+
|
|
192 |
#include "keywords.h"
|
|
193 |
#include "parseColor.h"
|
|
194 |
#include "xpUtil.h"
|
7964
|
195 |
--- xplanet-1.2.2/src/setPositions.cpp 2008-11-14 00:55:40.000000000 +0100
|
|
196 |
+++ xplanet-1.2.2-patch/src/setPositions.cpp 2011-12-04 11:39:28.806338685 +0100
|
|
197 |
@@ -4,6 +4,8 @@
|
|
198 |
#include <sstream>
|
|
199 |
using namespace std;
|
|
200 |
|
|
201 |
+#include <stdlib.h>
|
|
202 |
+
|
|
203 |
#include "buildPlanetMap.h"
|
|
204 |
#include "findBodyXYZ.h"
|
|
205 |
#include "keywords.h"
|
|
206 |
--- xplanet-1.2.2/src/xpUtil.cpp 2008-11-14 00:56:09.000000000 +0100
|
|
207 |
+++ xplanet-1.2.2-patch/src/xpUtil.cpp 2011-12-04 11:39:59.086909231 +0100
|
|
208 |
@@ -10,6 +10,9 @@
|
1
|
209 |
#include <string>
|
|
210 |
using namespace std;
|
|
211 |
|
|
212 |
+#include <stdlib.h>
|
|
213 |
+#include <stdio.h>
|
7964
|
214 |
+
|
1
|
215 |
#include <unistd.h>
|
|
216 |
extern char **environ;
|
|
217 |
|