[Chinese-commits] [lunar] 01/02: Merge fix for incorrect year in lunar-to-solar conversion

ChangZhuo Chen czchen at moszumanska.debian.org
Sat Jan 23 17:54:39 UTC 2016


This is an automated email from the git hooks/post-receive script.

czchen pushed a commit to branch debian/jessie
in repository lunar.

commit 371d3d05d33a4e1492f77dafc81e5e548fba3a71
Author: ChangZhuo Chen (陳昌倬) <czchen at debian.org>
Date:   Sun Jan 24 01:48:55 2016 +0800

    Merge fix for incorrect year in lunar-to-solar conversion
    
    Closes: #809551
---
 debian/patches/02_fix_compiler_warnings.diff | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/debian/patches/02_fix_compiler_warnings.diff b/debian/patches/02_fix_compiler_warnings.diff
index 6b0b59a..e872670 100644
--- a/debian/patches/02_fix_compiler_warnings.diff
+++ b/debian/patches/02_fix_compiler_warnings.diff
@@ -9,9 +9,16 @@ Description: Fix GCC compiler warnings found in lunar.c
   * variable ‘nYear’ set but not used
  .
  First applied since 2.2-1; revised in 2.2-3 and 2.2-4.
-Author: Anthony Fok <foka at debian.org>
-Origin: vendor
-Last-Update: 2013-10-04
+ .
+ In July 2015, Xie Xun found a bug where lunar 2.2-4 always outputs
+ Solar Year 1900 no matter what the date of lunar-to-solar conversion is,
+ and traced to a bug that I (Anthony) introduced in 2.2-4: When I removed
+ the unused ‘nYear’ variable, I had mistakenly removed the necessary call
+ to make_yday().  Xie Xun’s report and patch in Bug #792472 fixes the bug.
+Author: Anthony Fok <foka at debian.org>, Xie Xun <xiexun162534 at gmail.com>
+Origin: vendor, https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;bug=792472
+Bug-Debian: https://bugs.debian.org/792472
+Last-Update: 2015-09-19
 ---
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/lunar.c
@@ -60,7 +67,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  #define BYEAR		1201
  /* BYEAR % 4 == 1  and BYEAR % 400 == 1 for easy calculation of leap years */
  /* assert(BYEAR <= SolarFirstDate.year) */
-@@ -328,9 +326,8 @@ long Lunar2Day(d)
+@@ -328,9 +326,9 @@ long Lunar2Day(d)
  Date *d;
  {
      long offset = 0;
@@ -68,6 +75,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 +    int year, i, m, leapMonth;
  
 -    nYear = make_yday();
++    make_yday();
      year = d->year - LunarFirstDate.year;
      for (i=0; i<year; i++)
  	offset += yday[i];

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/chinese/lunar.git



More information about the Chinese-commits mailing list