SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
39
x11/xplanet/patches/patch-src_libannotate_addSatellites_cpp
Normal file
39
x11/xplanet/patches/patch-src_libannotate_addSatellites_cpp
Normal file
|
@ -0,0 +1,39 @@
|
|||
64bit time_t
|
||||
|
||||
error: invalid operands to binary expression ('std::__1::basic_istream<char>' and 'nullptr_t')
|
||||
|
||||
Index: src/libannotate/addSatellites.cpp
|
||||
--- src/libannotate/addSatellites.cpp.orig
|
||||
+++ src/libannotate/addSatellites.cpp
|
||||
@@ -392,7 +392,7 @@ readSatelliteFile(const char *line, Planet *planet,
|
||||
if (outputFile.is_open())
|
||||
{
|
||||
char line[128];
|
||||
- snprintf(line, 128, "%12.3f%12.3f%12.3f%12ld%30s",
|
||||
+ snprintf(line, 128, "%12.3f%12.3f%12.3f%12lld%30s",
|
||||
lat/deg_to_rad, lon/deg_to_rad, 6378.14 * (rad - 1),
|
||||
t, asctime(gmtime((time_t *) &t)));
|
||||
outputFile << line;
|
||||
@@ -488,10 +488,10 @@ loadSatelliteVector(PlanetProperties *planetProperties
|
||||
{
|
||||
ifstream inFile(tleFile.c_str());
|
||||
char lines[3][80];
|
||||
- while (inFile.getline(lines[0], 80) != NULL)
|
||||
+ while (inFile.getline(lines[0], 80))
|
||||
{
|
||||
- if ((inFile.getline(lines[1], 80) == NULL)
|
||||
- || (inFile.getline(lines[2], 80) == NULL))
|
||||
+ if ((!inFile.getline(lines[1], 80))
|
||||
+ || (!inFile.getline(lines[2], 80)))
|
||||
{
|
||||
ostringstream errStr;
|
||||
errStr << "Malformed TLE file (" << tleFile << ")?\n";
|
||||
@@ -542,7 +542,7 @@ addSatellites(PlanetProperties *planetProperties, Plan
|
||||
{
|
||||
ifstream inFile(satFile.c_str());
|
||||
char *line = new char[MAX_LINE_LENGTH];
|
||||
- while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL)
|
||||
+ while (inFile.getline (line, MAX_LINE_LENGTH, '\n'))
|
||||
readSatelliteFile(line, planet, view, projection,
|
||||
planetProperties, annotationMap);
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue