gnokii-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-90


From: Pawel Kot
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-90-g712ffac
Date: Sun, 09 Jan 2011 11:59:33 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".

The branch, master has been updated
       via  712ffaccb06b12966b7d0d5839e0f21cfd2bedb8 (commit)
      from  d8e8bbac0f9571df9038f11562a8de3a19630b5b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=712ffaccb06b12966b7d0d5839e0f21cfd2bedb8


commit 712ffaccb06b12966b7d0d5839e0f21cfd2bedb8
Author: Pawel Kot <address@hidden>
Date:   Sun Jan 9 12:58:09 2011 +0100

    Use libiconv on WIN32 to fix encoding problems.

diff --git a/ChangeLog b/ChangeLog
index 6101376..9bcbb1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,7 @@
     o when encoding to hex format make sure we're using uppercase
       that should be compliant with the lagrer number of the
       devices                                 (Msquared, Paweł Kot)
+    o use libiconv on WIN32                             (Paweł Kot)
  * nk6510 driver updates
     o fix parsing SMS date from saved messages, bug #29830
                                                         (Paweł Kot)
diff --git a/Windows/MSVC2010Express/README b/Windows/MSVC2010Express/README
index faba028..a1c2823 100644
--- a/Windows/MSVC2010Express/README
+++ b/Windows/MSVC2010Express/README
@@ -17,11 +17,16 @@ Compilation prerequisits
 3.1 Download from 
http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.2.0/
  - libusb-win32 binaries 
(http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.2.0/libusb-win32-bin-1.2.2.0.zip/download)
  
-4. Create ext directory in top-level gnokii directory
-4.1 Create glib subdirectory in ext directory and extract there glib dev zip
-4.2 Create libusb subdirectory in ext directory and extract there libusb-win32 
binaries:
+4. iconv dependencies
+4.1 Download from 
http://sourceforge.net/projects/gettext/http://sourceforge.net/projects/gettext/
+ - libiconv-1.9.1.bin.woe32 binaries 
(http://sourceforge.net/projects/gettext/files/libiconv-win32/1.9.1/libiconv-1.9.1.bin.woe32.zip/download)
+ 
+5. Create ext directory in top-level gnokii directory
+5.1 Create glib subdirectory in ext directory and extract there glib dev zip
+5.2 Create libusb subdirectory in ext directory and extract there libusb-win32 
binaries:
  - libusb-win32-bin-1.2.2.0/include/usb.h -> usb.h
  - libusb-win32-bin-1.2.2.0/lib/msvc/libusb.lib -> libusb.lib
+5.3 Create iconv subdirectory in ext directory and extract there libiconv zip
 
 Runtime prerequsits
 ===================
@@ -30,6 +35,7 @@ Make sure that following files are present in the same 
directory as gnokii.exe a
  - intl.dll (from gettext-runtime runtime)
  - libglib-2.0-0.dll (from glib runtime)
  - libusb0.dll (from libusb-win32: 
libusb-win32-bin-1.2.2.0/bin/x86/libusb0_x86.dll)
+ - iconv.dll (from libiconv binaries)
 
 Place the sample config file (gnokiirc from Windows directory) into one of the 
locations:
  - %AppDataFolder%\gnokii\config (C:\Documents and 
Settings\<username>\Application Data\gnokii\config or 
C:\Users\<username>\AppData\Roaming\gnokii\config)
diff --git a/Windows/MSVC2010Express/config.h b/Windows/MSVC2010Express/config.h
index d2784ea..2b790d4 100644
--- a/Windows/MSVC2010Express/config.h
+++ b/Windows/MSVC2010Express/config.h
@@ -125,6 +125,10 @@
 /* Define to 1 if you have libusb installed */
 #define HAVE_LIBUSB 1
 
+/* Define to 1 if you have libiconv installed */
+#define HAVE_ICONV 1
+#define HAVE_LOCALE_CHARSET 1
+
 /* FIXME: Disable some odd warnings, comment these lines if u wanna fix the 
bad code lines */
 #pragma warning(disable : 4244) // conversion from 'int ' to 'float ', 
possible loss of data
 #pragma warning(disable : 4761) // integral size mismatch in argument; 
conversion supplied
diff --git a/Windows/MSVC2010Express/libgnokii/libgnokii.vcxproj 
b/Windows/MSVC2010Express/libgnokii/libgnokii.vcxproj
index f8746d0..a98c3f5 100644
--- a/Windows/MSVC2010Express/libgnokii/libgnokii.vcxproj
+++ b/Windows/MSVC2010Express/libgnokii/libgnokii.vcxproj
@@ -37,11 +37,11 @@
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    
<IncludePath>..;..\..\..\include;..\..\..\ext\glib\include\glib-2.0;..\..\..\ext\glib\lib\glib-2.0\include;..\..\..\ext\libusb;$(IncludePath)</IncludePath>
+    
<IncludePath>..;..\..\..\include;..\..\..\ext\glib\include\glib-2.0;..\..\..\ext\glib\lib\glib-2.0\include;..\..\..\ext\libusb;..\..\..\ext\iconv\include;$(IncludePath)</IncludePath>
     <TargetExt>.dll</TargetExt>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    
<IncludePath>..;..\..\..\include;..\..\..\ext\glib\include\glib-2.0;..\..\..\ext\glib\lib\glib-2.0\include;..\..\..\ext\libusb;$(IncludePath)</IncludePath>
+    
<IncludePath>..;..\..\..\include;..\..\..\ext\glib\include\glib-2.0;..\..\..\ext\glib\lib\glib-2.0\include;..\..\..\ext\libusb;..\..\..\ext\iconv\include;$(IncludePath)</IncludePath>
     <TargetExt>.dll</TargetExt>
   </PropertyGroup>
   <ItemDefinitionGroup 
Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -52,8 +52,8 @@
     </ClCompile>
     <Link>
       <GenerateDebugInformation>true</GenerateDebugInformation>
-      
<AdditionalLibraryDirectories>..\..\..\ext\glib\lib;..\..\..\ext\libusb;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      
<AdditionalDependencies>WS2_32.lib;winmm.lib;glib-2.0.lib;libusb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      
<AdditionalLibraryDirectories>..\..\..\ext\glib\lib;..\..\..\ext\libusb;..\..\..\ext\iconv\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      
<AdditionalDependencies>WS2_32.lib;winmm.lib;glib-2.0.lib;libusb.lib;iconv.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup 
Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -68,8 +68,8 @@
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
-      
<AdditionalLibraryDirectories>..\..\..\ext\glib\lib;..\..\..\ext\libusb;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      
<AdditionalDependencies>WS2_32.lib;winmm.lib;glib-2.0.lib;libusb.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      
<AdditionalLibraryDirectories>..\..\..\ext\glib\lib;..\..\..\ext\libusb;..\..\..\ext\iconv\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      
<AdditionalDependencies>WS2_32.lib;winmm.lib;glib-2.0.lib;libusb.lib;iconv.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
diff --git a/common/gsm-encoding.c b/common/gsm-encoding.c
index 78382a4..d38d891 100644
--- a/common/gsm-encoding.c
+++ b/common/gsm-encoding.c
@@ -234,14 +234,7 @@ static const char *get_langinfo_codeset(void)
 #ifdef HAVE_LANGINFO_CODESET
                codeset = nl_langinfo(CODESET);
 #else
-#  ifdef WIN32
-               /* As suggested by Ben Bryant, 
http://codesnipers.com/?q=node/46 */
-               char szCP[10];
-               snprintf(szCP, sizeof(szCP), ".%d", GetACP());
-               codeset = setlocale(LC_ALL, szCP);
-#  else
                codeset = locale_charset();
-#  endif
 #endif
        }
        return codeset;
@@ -290,6 +283,10 @@ int char_mblen(const char *src)
        return len;
 }
 
+#ifndef ICONV_CONST
+#  define ICONV_CONST const
+#endif
+
 /**
  * char_mbtowc:
  * @wchar_t: buffer for the converted wide char string
@@ -984,6 +981,9 @@ unsigned int char_unicode_encode(unsigned char* dest, const 
unsigned char* src,
                        dest[pos++] =  wc & 0xFF;
                        offset++;
                        break;
+               case 0: /* Avoid infinite loop */
+                       offset++;
+                       break;
                default:
                        dest[pos++] =  wc >> 8 & 0xFF;
                        dest[pos++] =  wc & 0xFF;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |    1 +
 Windows/MSVC2010Express/README                     |   12 +++++++++---
 Windows/MSVC2010Express/config.h                   |    4 ++++
 .../MSVC2010Express/libgnokii/libgnokii.vcxproj    |   12 ++++++------
 common/gsm-encoding.c                              |   14 +++++++-------
 5 files changed, 27 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]