[Debian-islamic-commits] [itools] 01/02: Added ipraytime-unicode.patch patch to fix unicode support for printing the degree (0xB0) character.

أحمد المحمودي (Ahmed El-Mahmoudy) aelmahmoudy at sabily.org
Fri Oct 31 03:52:52 UTC 2014


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

aelmahmoudy-guest pushed a commit to branch master
in repository itools.

commit 7fae4bc1cba1cfa487d4e7e74657274fdacda39b
Author: أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy at users.sourceforge.net>
Date:   Thu Oct 30 21:43:09 2014 +0200

    Added ipraytime-unicode.patch patch to fix unicode support for printing the degree (0xB0) character.
    
    Closes: #755269
    Thanks: Adam Borowski <kilobyte at angband.pl>
---
 debian/patches/ipraytime-unicode.patch | 55 ++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/debian/patches/ipraytime-unicode.patch b/debian/patches/ipraytime-unicode.patch
new file mode 100644
index 0000000..9ae0611
--- /dev/null
+++ b/debian/patches/ipraytime-unicode.patch
@@ -0,0 +1,55 @@
+Description: Fix unicode support for printing the degree (0xB0) character
+Author: Adam Borowski <kilobyte at angband.pl>
+Bug-Debian: https://bugs.debian.org/755269
+diff -Nurd itools-1.0.orig/ipraytime.c itools-1.0/ipraytime.c
+--- itools-1.0.orig/ipraytime.c	2009-07-06 22:41:13.000000000 +0200
++++ itools-1.0/ipraytime.c	2014-10-30 16:58:13.301433287 +0100
+@@ -30,6 +30,7 @@
+ #include <string.h>             /* for strlen/strcat/etc */
+ #include <unistd.h>             /* for getuid */
+ #include <pwd.h>                /* for getpwuid */
++#include <locale.h>             /* for setlocale */
+ 
+ /* For time_t */
+ #ifdef TM_IN_SYS_TIME
+@@ -460,7 +461,7 @@
+ 
+    int deg, min;
+    double sec;
+-   const char symb = (char)0xB0;
++   const wchar_t symb = 0xB0;
+ 
+    printf("\n");
+    printf("Prayer schedule for,\n");
+@@ -470,11 +471,11 @@
+       printf(" City             : %s\n", city_name);
+     
+    decimal2Dms(loc->degreeLat, &deg, &min, &sec);
+-   printf(" Latitude         : %03d%c %02d\' %02d\" %c\n", abs(deg), symb,
++   printf(" Latitude         : %03d%lc %02d\' %02d\" %c\n", abs(deg), symb,
+           abs(min), abs(sec), (loc->degreeLat >=0 ? 'N' : 'S'));
+ 
+    decimal2Dms(loc->degreeLong, &deg, &min, &sec);
+-   printf(" Longitude        : %03d%c %02d\' %02d\" %c\n", abs(deg), symb,
++   printf(" Longitude        : %03d%lc %02d\' %02d\" %c\n", abs(deg), symb,
+           abs(min), abs(sec), (loc->degreeLong >=0 ? 'E' : 'W'));
+ 
+    printf(" Angle Method     : %s\n", method_name);
+@@ -485,7 +486,7 @@
+    /* Deal with Qibla Information */
+    qibla        = getNorthQibla(loc);
+    decimal2Dms (qibla, &deg, &min, &sec);
+-   printf(" Qibla            : %03d%c %02d\' %02d\" %c of true North\n",
++   printf(" Qibla            : %03d%lc %02d\' %02d\" %c of true North\n",
+           abs (deg), symb, abs (min), abs (sec), (qibla >=0 ? 'W' : 'E'));
+ 
+    printf("\n");
+@@ -645,6 +646,8 @@
+    Date         dst_end;
+    sPref        user_input;
+ 
++   setlocale(LC_CTYPE, "");
++
+    /* Read-in the init RC file */
+    do_init_file(&user_input, &loc, &date);
+ 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-islamic/packages/itools.git



More information about the Debian-islamic-commits mailing list