From patchwork Mon Mar 30 16:58:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: R Veera Kumar X-Patchwork-Id: 20995 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D326C27BBE4; Mon, 30 Mar 2020 18:02:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 0528A27BBE1 for ; Mon, 30 Mar 2020 18:02:13 +0100 (BST) Received: from localhost ([::1]:53168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIxng-0001eF-E8 for patchwork@mira.cbaines.net; Mon, 30 Mar 2020 13:02:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55534) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIxld-0007Vd-C0 for guix-patches@gnu.org; Mon, 30 Mar 2020 13:00:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jIxla-0003Bw-Gf for guix-patches@gnu.org; Mon, 30 Mar 2020 13:00:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51625) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jIxla-0003Al-8l for guix-patches@gnu.org; Mon, 30 Mar 2020 13:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jIxla-0003XB-5d for guix-patches@gnu.org; Mon, 30 Mar 2020 13:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#40322] [PATCH v2] gnu: Add Xplanet References: <20200330081929.GA7259@tulip> In-Reply-To: <20200330081929.GA7259@tulip> Resent-From: R Veera Kumar Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 30 Mar 2020 17:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40322 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40322@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 40322-submit@debbugs.gnu.org id=B40322.158558757513497 (code B ref 40322); Mon, 30 Mar 2020 17:00:02 +0000 Received: (at 40322) by debbugs.gnu.org; 30 Mar 2020 16:59:35 +0000 Received: from localhost ([127.0.0.1]:34938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jIxl8-0003Vc-Sy for submit@debbugs.gnu.org; Mon, 30 Mar 2020 12:59:35 -0400 Received: from vkten.in ([104.244.73.96]:56734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jIxl6-0003VO-Lg for 40322@debbugs.gnu.org; Mon, 30 Mar 2020 12:59:33 -0400 Received: (qmail 19430 invoked from network); 30 Mar 2020 16:59:11 -0000 Received: from unknown (HELO tulip) (vkor@vkten.in@117.246.179.23) de/crypted with TLSv1.3: TLS_AES_256_GCM_SHA384 [256/256] DN=none by vkten with ESMTPSA; 30 Mar 2020 16:59:11 -0000 Date: Mon, 30 Mar 2020 22:28:08 +0530 From: R Veera Kumar Message-ID: <20200330165808.GA10546@tulip> MIME-Version: 1.0 Content-Disposition: inline X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Xplanet renders an image of a planet into an X window or file. Signed-off-by: R Veera Kumar --- Changes in v2: - Add origin, author and year in patches --- gnu/packages/astronomy.scm | 51 ++++++ ...t-1.3.1-libdisplay_DisplayOutput.cpp.patch | 16 ++ .../xplanet-1.3.1-libimage_gif.c.patch | 54 ++++++ ...planet-1.3.1-readConfig-fixclang.cpp.patch | 78 +++++++++ ...xplanet-1.3.1-remove-null-comparison.patch | 161 ++++++++++++++++++ ...t-1.3.1-xpUtil-Add2017LeapSecond.cpp.patch | 15 ++ 6 files changed, 375 insertions(+) create mode 100644 gnu/packages/patches/xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch create mode 100644 gnu/packages/patches/xplanet-1.3.1-libimage_gif.c.patch create mode 100644 gnu/packages/patches/xplanet-1.3.1-readConfig-fixclang.cpp.patch create mode 100644 gnu/packages/patches/xplanet-1.3.1-remove-null-comparison.patch create mode 100644 gnu/packages/patches/xplanet-1.3.1-xpUtil-Add2017LeapSecond.cpp.patch diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index 3bb236fde9..b6ae59ba22 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -25,9 +25,11 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) + #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages image) #:use-module (gnu packages compression) + #:use-module (gnu packages fontutils) #:use-module (gnu packages gettext) #:use-module (gnu packages version-control) #:use-module (gnu packages pkg-config) @@ -41,6 +43,7 @@ #:use-module (gnu packages gtk) #:use-module (gnu packages gnome) #:use-module (gnu packages maths) + #:use-module (gnu packages xorg) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (srfi srfi-1)) @@ -289,3 +292,51 @@ Mechanics, Astrometry and Astrodynamics library.") (license (list license:lgpl2.0+ license:gpl2+)))) ; examples/transforms.c & lntest/*.c +(define-public xplanet + (package + (name "xplanet") + (version "1.3.1") + (source + (origin + (method url-fetch) + (uri + (string-append + "mirror://sourceforge/xplanet/xplanet/" + version "/xplanet-" version ".tar.gz")) + (sha256 + (base32 "1rzc1alph03j67lrr66499zl0wqndiipmj99nqgvh9xzm1qdb023")) + (patches + (search-patches + "xplanet-1.3.1-remove-null-comparison.patch" + "xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch" + "xplanet-1.3.1-libimage_gif.c.patch" + "xplanet-1.3.1-readConfig-fixclang.cpp.patch" + "xplanet-1.3.1-xpUtil-Add2017LeapSecond.cpp.patch")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("libx11" ,libx11) + ("libxscrnsaver" ,libxscrnsaver) + ("libxext" ,libxext) + ("libice" ,libice) + ("freetype" ,freetype) + ("pango" ,pango) + ("giflib" ,giflib) + ("libjpeg", libjpeg) + ("libpng" ,libpng) + ("libtiff" ,libtiff) + ("zlib" ,zlib))) + (arguments + `(#:configure-flags + (list + "--without-pnm" ;; no proper pnm library in guix + "--without-cspice"))) ;; no jpl cspice support + (home-page "http://xplanet.sourceforge.net/") + (synopsis "Planetary body renderer") + (description + "Xplanet renders an image of a planet into an X window or file. +All of the major planets and most satellites can be drawn and different map +projections are also supported, including azimuthal, hemisphere, Lambert, +Mercator, Mollweide, Peters, polyconic, orthographic and rectangular.") + (license license:gpl2+))) diff --git a/gnu/packages/patches/xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch b/gnu/packages/patches/xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch new file mode 100644 index 0000000000..bf52b0ca27 --- /dev/null +++ b/gnu/packages/patches/xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch @@ -0,0 +1,16 @@ +Origin: $NetBSD: patch-src_libdisplay_DisplayOutput.cpp,v 1.1 2019/11/16 17:36:28 ng0 Exp $ + +Modified by: R Veera Kumar 2020-03-28; change to patch -p1 + +diff -uNr xplanet-1.3.1/src/libdisplay/DisplayOutput.cpp xplanet-1.3.1.new/src/libdisplay/DisplayOutput.cpp +--- xplanet-1.3.1/src/libdisplay/DisplayOutput.cpp 2013-02-17 01:07:47.000000000 +0530 ++++ xplanet-1.3.1.new/src/libdisplay/DisplayOutput.cpp 2020-03-28 22:08:44.432499170 +0530 +@@ -51,7 +51,7 @@ + string outputFilename = options->OutputBase(); + int startIndex = options->OutputStartIndex(); + int stopIndex = options->NumTimes() + startIndex - 1; +- if (stopIndex > 1) ++ if (stopIndex > 0) + { + const int digits = (int) (log10((double) stopIndex) + 1); + char buffer[64]; diff --git a/gnu/packages/patches/xplanet-1.3.1-libimage_gif.c.patch b/gnu/packages/patches/xplanet-1.3.1-libimage_gif.c.patch new file mode 100644 index 0000000000..58efc906dc --- /dev/null +++ b/gnu/packages/patches/xplanet-1.3.1-libimage_gif.c.patch @@ -0,0 +1,54 @@ +Origin: $NetBSD: patch-src_libimage_gif.c,v 1.4 2019/11/16 17:36:28 ng0 Exp $ + +Modified by: R Veera Kumar 2020-03-28; change to patch -p1 + +diff -uNr xplanet-1.3.1/src/libimage/gif.c xplanet-1.3.1.new/src/libimage/gif.c +--- xplanet-1.3.1/src/libimage/gif.c 2013-02-17 01:07:47.000000000 +0530 ++++ xplanet-1.3.1.new/src/libimage/gif.c 2020-03-28 22:15:24.444309199 +0530 +@@ -21,7 +21,7 @@ + #include + #include + #include +- ++#include + #include + + /* +@@ -178,8 +178,12 @@ + *BufferP++ = ColorMapEntry->Blue; + } + } +- ++ ++#if GIFLIB_MAJOR >= 5 ++ if (DGifCloseFile(GifFile, NULL) == GIF_ERROR) { ++#else + if (DGifCloseFile(GifFile) == GIF_ERROR) { ++#endif + return(0); + } + +@@ -493,7 +497,11 @@ + static void QuitGifError(GifFileType *GifFile) + { + fprintf(stderr, "Error writing GIF file\n"); ++#if GIFLIB_MAJOR >= 5 ++ if (GifFile != NULL) EGifCloseFile(GifFile, NULL); ++#else + if (GifFile != NULL) EGifCloseFile(GifFile); ++#endif + } + + int +@@ -589,7 +597,11 @@ + Ptr += width; + } + ++#if GIFLIB_MAJOR >= 5 ++ if (EGifCloseFile(GifFile, NULL) == GIF_ERROR) ++#else + if (EGifCloseFile(GifFile) == GIF_ERROR) ++#endif + + { + QuitGifError(GifFile); diff --git a/gnu/packages/patches/xplanet-1.3.1-readConfig-fixclang.cpp.patch b/gnu/packages/patches/xplanet-1.3.1-readConfig-fixclang.cpp.patch new file mode 100644 index 0000000000..102887b780 --- /dev/null +++ b/gnu/packages/patches/xplanet-1.3.1-readConfig-fixclang.cpp.patch @@ -0,0 +1,78 @@ +Origin: $NetBSD: patch-src_readConfig-fixclang.cpp,v 1.2 2019/11/16 17:36:28 ng0 Exp $ + +Modified by: R Veera Kumar 2020-03-28; change to patch -p1 + +diff -uNr xplanet-1.3.1/src/readConfig.cpp xplanet-1.3.1.new/src/readConfig.cpp +--- xplanet-1.3.1/src/readConfig.cpp 2013-02-17 01:07:47.000000000 +0530 ++++ xplanet-1.3.1.new/src/readConfig.cpp 2020-03-28 22:17:19.919078929 +0530 +@@ -4,6 +4,7 @@ + #include + #include + #include ++#include + using namespace std; + + #include "body.h" +@@ -20,6 +21,8 @@ + static PlanetProperties *defaultProperties; + static PlanetProperties *currentProperties; + ++static inline unsigned char i2b( int x ) { return static_cast(x) & 0xffU; } ++ + static void + readConfig(const char *line, PlanetProperties *planetProperties[]) + { +@@ -49,7 +52,7 @@ + int r, g, b; + if (sscanf(returnString, "%d,%d,%d", &r, &g, &b) == 3) + { +- unsigned char color[3] = { r & 0xff, g & 0xff, b & 0xff }; ++ unsigned char color[3] = { i2b(r), i2b(g), i2b(b) }; + currentProperties->ArcColor(color); + } + else +@@ -179,7 +182,7 @@ + int r, g, b; + if (sscanf(returnString, "%d,%d,%d", &r, &g, &b) == 3) + { +- unsigned char color[3] = { r & 0xff, g & 0xff, b & 0xff }; ++ unsigned char color[3] = { i2b(r), i2b(g), i2b(b) }; + currentProperties->Color(color); + } + else +@@ -244,7 +247,7 @@ + int r, g, b; + if (sscanf(returnString, "%d,%d,%d", &r, &g, &b) == 3) + { +- unsigned char color[3] = { r & 0xff, g & 0xff, b & 0xff }; ++ unsigned char color[3] = { i2b(r), i2b(g), i2b(b) }; + currentProperties->GridColor(color); + } + else +@@ -296,7 +299,7 @@ + int r, g, b; + if (sscanf(returnString, "%d,%d,%d", &r, &g, &b) == 3) + { +- unsigned char color[3] = { r & 0xff, g & 0xff, b & 0xff }; ++ unsigned char color[3] = { i2b(r), i2b(g), i2b(b) }; + currentProperties->MarkerColor(color); + } + else +@@ -403,7 +406,7 @@ + int r, g, b; + if (sscanf(returnString, "%d,%d,%d", &r, &g, &b) == 3) + { +- unsigned char color[3] = { r & 0xff, g & 0xff, b & 0xff }; ++ unsigned char color[3] = { i2b(r), i2b(g), i2b(b) }; + currentProperties->OrbitColor(color); + } + else +@@ -473,7 +476,7 @@ + int r, g, b; + if (sscanf(returnString, "%d,%d,%d", &r, &g, &b) == 3) + { +- unsigned char color[3] = { r & 0xff, g & 0xff, b & 0xff }; ++ unsigned char color[3] = { i2b(r), i2b(g), i2b(b) }; + currentProperties->TextColor(color); + } + else diff --git a/gnu/packages/patches/xplanet-1.3.1-remove-null-comparison.patch b/gnu/packages/patches/xplanet-1.3.1-remove-null-comparison.patch new file mode 100644 index 0000000000..002701ed0c --- /dev/null +++ b/gnu/packages/patches/xplanet-1.3.1-remove-null-comparison.patch @@ -0,0 +1,161 @@ +Origin: Gentoo Harri Nieminen 2017-02-28 +Url: https://gitweb.gentoo.org/repo/gentoo.git/log/x11-misc/xplanet/files/ ++xplanet-1.3.1-remove-null-comparison.patch + +Index: src/libannotate/addArcs.cpp +=================================================================== +diff --git a/src/libannotate/addArcs.cpp b/src/libannotate/addArcs.cpp +--- a/src/libannotate/addArcs.cpp (revision 206) ++++ b/src/libannotate/addArcs.cpp (revision 207) +@@ -258,7 +258,7 @@ + { + ifstream inFile(arcFile.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')) + readArcFile(line, planet, view, projection, + planetProperties, annotationMap); + +@@ -292,7 +292,7 @@ + { + ifstream inFile(arcFile.c_str()); + char *line = new char[256]; +- while (inFile.getline (line, 256, '\n') != NULL) ++ while (inFile.getline (line, 256, '\n')) + readArcFile(line, NULL, view, NULL, NULL, annotationMap); + + inFile.close(); +Index: src/libannotate/addMarkers.cpp +=================================================================== +diff --git a/src/libannotate/addMarkers.cpp b/src/libannotate/addMarkers.cpp +--- a/src/libannotate/addMarkers.cpp (revision 206) ++++ b/src/libannotate/addMarkers.cpp (revision 207) +@@ -429,7 +429,7 @@ + { + ifstream inFile(markerFile.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')) + { + unsigned char color[3]; + memcpy(color, planetProperties->MarkerColor(), 3); +@@ -475,7 +475,7 @@ + { + ifstream inFile(markerFile.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')) + { + unsigned char color[3]; + memcpy(color, options->Color(), 3); +Index: src/libannotate/addSatellites.cpp +=================================================================== +diff --git a/src/libannotate/addSatellites.cpp b/src/libannotate/addSatellites.cpp +--- a/src/libannotate/addSatellites.cpp (revision 206) ++++ b/src/libannotate/addSatellites.cpp (revision 207) +@@ -488,10 +488,10 @@ + { + 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 @@ + { + 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); + +Index: src/libannotate/addSpiceObjects.cpp +=================================================================== +diff --git a/src/libannotate/addSpiceObjects.cpp b/src/libannotate/addSpiceObjects.cpp +--- a/src/libannotate/addSpiceObjects.cpp (revision 206) ++++ b/src/libannotate/addSpiceObjects.cpp (revision 207) +@@ -524,7 +524,7 @@ + { + ifstream inFile(kernelFile.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')) + { + int ii = 0; + while (isDelimiter(line[ii])) +@@ -576,7 +576,7 @@ + { + ifstream inFile(spiceFile.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')) + readSpiceFile(line, planetsFromSunMap, view, projection, + annotationMap); + inFile.close(); +Index: src/libmultiple/RayleighScattering.cpp +=================================================================== +diff --git a/src/libmultiple/RayleighScattering.cpp b/src/libmultiple/RayleighScattering.cpp +--- a/src/libmultiple/RayleighScattering.cpp (revision 206) ++++ b/src/libmultiple/RayleighScattering.cpp (revision 207) +@@ -369,7 +369,7 @@ + + diskTemplate_.clear(); + limbTemplate_.clear(); +- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline(line, MAX_LINE_LENGTH, '\n')) + { + int i = 0; + while (isDelimiter(line[i])) +@@ -439,7 +439,7 @@ + values.clear(); + + char line[MAX_LINE_LENGTH]; +- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline(line, MAX_LINE_LENGTH, '\n')) + { + int i = 0; + while (isDelimiter(line[i])) +@@ -470,7 +470,7 @@ + double &value) + { + char line[MAX_LINE_LENGTH]; +- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline(line, MAX_LINE_LENGTH, '\n')) + { + int i = 0; + while (isDelimiter(line[i])) +Index: src/libmultiple/drawStars.cpp +=================================================================== +diff --git a/src/libmultiple/drawStars.cpp b/src/libmultiple/drawStars.cpp +--- a/src/libmultiple/drawStars.cpp (revision 206) ++++ b/src/libmultiple/drawStars.cpp (revision 207) +@@ -41,7 +41,7 @@ + ifstream inFile(starMap.c_str()); + + char line[MAX_LINE_LENGTH]; +- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline(line, MAX_LINE_LENGTH, '\n')) + { + if (line[0] == '#') continue; + +Index: src/readConfig.cpp +=================================================================== +diff --git a/src/readConfig.cpp b/src/readConfig.cpp +--- a/src/readConfig.cpp (revision 206) ++++ b/src/readConfig.cpp (revision 207) +@@ -550,7 +550,7 @@ + + ifstream inFile(configFile.c_str()); + char *line = new char[256]; +- while (inFile.getline(line, 256, '\n') != NULL) ++ while (inFile.getline(line, 256, '\n')) + readConfig(line, planetProperties); + + // This condition will only be true if [default] is the only diff --git a/gnu/packages/patches/xplanet-1.3.1-xpUtil-Add2017LeapSecond.cpp.patch b/gnu/packages/patches/xplanet-1.3.1-xpUtil-Add2017LeapSecond.cpp.patch new file mode 100644 index 0000000000..a47623fa00 --- /dev/null +++ b/gnu/packages/patches/xplanet-1.3.1-xpUtil-Add2017LeapSecond.cpp.patch @@ -0,0 +1,15 @@ +$NetBSD: patch-src_xpUtil-Add2017LeapSecond.cpp,v 1.1 2019/11/16 17:36:28 ng0 Exp $ + +Modified by: R Veera Kumar 2020-03-28; change to patch -p1 + +diff -uNr xplanet-1.3.1/src/xpUtil.cpp xplanet-1.3.1.new/src/xpUtil.cpp +--- xplanet-1.3.1/src/xpUtil.cpp 2016-03-12 08:36:47.000000000 +0530 ++++ xplanet-1.3.1.new/src/xpUtil.cpp 2020-03-28 22:19:10.629891166 +0530 +@@ -434,6 +434,7 @@ + if (jd >= toJulian(2009, 1, 1, 0, 0, 0)) delta_at++; // 34 + if (jd >= toJulian(2012, 7, 1, 0, 0, 0)) delta_at++; // 35 + if (jd >= toJulian(2015, 7, 1, 0, 0, 0)) delta_at++; // 36 ++ if (jd >= toJulian(2017, 1, 1, 0, 0, 0)) delta_at++; // 37 + + const double J2000 = toJulian(2000, 1, 1, 12, 0, 0); + const double m = m0 + m1 * (jd - J2000) * 86400;