]> git.lyx.org Git - features.git/commitdiff
Set svn:eol-style
authorVincent van Ravesteijn <vfr@lyx.org>
Sat, 20 Nov 2010 01:49:10 +0000 (01:49 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sat, 20 Nov 2010 01:49:10 +0000 (01:49 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36400 a592a061-630c-0410-9148-cb99ea01b6c8

development/Win32/patches/mingw/aspell-0.60.4.patch

index 3f5b7167a1f143bb56b5043c1de5a3fc7c3a4d2c..3a0fcea2b97a0653e3f33f05ac4eae0c105c929b 100644 (file)
@@ -13,60 +13,60 @@ diff -riwbBuN -Xex aspell-0.60.4/common/aspell_win.cpp aspell-0.60.4-modified/co
 --- aspell-0.60.4/common/aspell_win.cpp        Thu Jan  1 01:00:00 1970
 +++ aspell-0.60.4-modified/common/aspell_win.cpp       Fri Jun 16 01:19:04 2006
 @@ -0,0 +1,54 @@
-+#ifdef _WIN32\r
-+\r
-+#include <windows.h>\r
-+#include "string.hpp"\r
-+\r
-+namespace acommon {\r
-+\r
-+  String ReadRegString(HKEY hive, String key, String name)\r
-+  {\r
-+  \r
-+    // Reads a string from the Windows registry (used to get paths)  \r
-+      \r
-+    HKEY hKey;\r
-+    unsigned long lType;\r
-+    DWORD dwSize;\r
-+    unsigned char* szValue = NULL;\r
-+      \r
-+    if (::RegOpenKeyEx(hive, key.c_str(), 0, KEY_READ, &hKey) == ERROR_SUCCESS)\r
-+    {\r
-+      if(::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, NULL, &dwSize) == ERROR_SUCCESS)\r
-+      {\r
-+        szValue = new unsigned char[dwSize + 1];\r
-+        ::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, szValue, &dwSize);\r
-+        String RegistryReturn((char*)szValue);\r
-+        delete[] szValue;\r
-+        return RegistryReturn;\r
-+        } else {\r
-+          return "";\r
-+      }\r
-+    } else {\r
-+        return "";\r
-+      }\r
-+  \r
-+  }\r
-+  \r
-+  HKEY GetRegHive()\r
-+  {\r
-+    \r
-+    // Check whether Aspell is installed for the current user or for all users\r
-+      \r
-+    String value;\r
-+      \r
-+    if (ReadRegString(HKEY_LOCAL_MACHINE, "Software\\Aspell", "Dictionary Path") == "")\r
-+    {\r
-+      return HKEY_CURRENT_USER;\r
-+    } else {\r
-+      return HKEY_LOCAL_MACHINE;\r
-+    }\r
-+      \r
-+  }\r
-+\r
-+}  \r
-+      \r
-+#endif\r
++#ifdef _WIN32
++
++#include <windows.h>
++#include "string.hpp"
++
++namespace acommon {
++
++  String ReadRegString(HKEY hive, String key, String name)
++  {
++  
++    // Reads a string from the Windows registry (used to get paths)  
++      
++    HKEY hKey;
++    unsigned long lType;
++    DWORD dwSize;
++    unsigned char* szValue = NULL;
++      
++    if (::RegOpenKeyEx(hive, key.c_str(), 0, KEY_READ, &hKey) == ERROR_SUCCESS)
++    {
++      if(::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, NULL, &dwSize) == ERROR_SUCCESS)
++      {
++        szValue = new unsigned char[dwSize + 1];
++        ::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, szValue, &dwSize);
++        String RegistryReturn((char*)szValue);
++        delete[] szValue;
++        return RegistryReturn;
++        } else {
++          return "";
++      }
++    } else {
++        return "";
++      }
++  
++  }
++  
++  HKEY GetRegHive()
++  {
++    
++    // Check whether Aspell is installed for the current user or for all users
++      
++    String value;
++      
++    if (ReadRegString(HKEY_LOCAL_MACHINE, "Software\\Aspell", "Dictionary Path") == "")
++    {
++      return HKEY_CURRENT_USER;
++    } else {
++      return HKEY_LOCAL_MACHINE;
++    }
++      
++  }
++
++}  
++      
++#endif
 diff -riwbBuN -Xex aspell-0.60.4/common/aspell_win.hpp aspell-0.60.4-modified/common/aspell_win.hpp
 --- aspell-0.60.4/common/aspell_win.hpp        Thu Jan  1 01:00:00 1970
 +++ aspell-0.60.4-modified/common/aspell_win.hpp       Thu Jun 15 15:33:58 2006
@@ -96,7 +96,7 @@ diff -riwbBuN -Xex aspell-0.60.4/common/config.cpp aspell-0.60.4-modified/common
  #include "string_list.hpp"
  
  #include "gettext.h"
-+#undef printf\r
++#undef printf
  
  #include "iostream.hpp"
  
@@ -107,7 +107,7 @@ diff -riwbBuN -Xex aspell-0.60.4/common/convert.cpp aspell-0.60.4-modified/commo
  #include "iostream.hpp"
  
  #include "gettext.h"
-+#undef printf\r
++#undef printf
  
  namespace acommon {
  
@@ -118,7 +118,7 @@ diff -riwbBuN -Xex aspell-0.60.4/common/file_util.cpp aspell-0.60.4-modified/com
  
  #ifdef WIN32
  
-+#  include "asc_ctype.hpp"\r
++#  include "asc_ctype.hpp"
  #  include <io.h>
  #  define ACCESS _access
  #  include <windows.h>
@@ -126,16 +126,16 @@ diff -riwbBuN -Xex aspell-0.60.4/common/gettext_init.cpp aspell-0.60.4-modified/
 --- aspell-0.60.4/common/gettext_init.cpp      Tue Nov  9 09:20:24 2004
 +++ aspell-0.60.4-modified/common/gettext_init.cpp     Thu Jun 15 15:31:02 2006
 @@ -1,5 +1,13 @@
-+#include "settings.h"\r
-+#include "string.hpp"\r
-+\r
-+#ifdef _WIN32\r
-+  #include <windows.h>\r
-+  #include "aspell_win.hpp"\r
-+#endif\r
++#include "settings.h"
++#include "string.hpp"
++
++#ifdef _WIN32
++  #include <windows.h>
++  #include "aspell_win.hpp"
++#endif
  
  #include "gettext.h"
-+#undef printf\r
++#undef printf
  
  #if ENABLE_NLS
  
@@ -148,21 +148,21 @@ diff -riwbBuN -Xex aspell-0.60.4/common/gettext_init.cpp aspell-0.60.4-modified/
      if (did_init) return;
      did_init = true;
 -  }
-+  \r
-+#ifdef _WIN32\r
-+  // Registry key for Locale Path\r
-+  \r
-+  acommon::String value;\r
-+  HKEY hive;\r
-+  \r
-+  hive = acommon::GetRegHive();\r
-+  value = acommon::ReadRegString(hive, "Software\\Aspell", "Locale Path");\r
-+  if (value == "") value = LOCALEDIR;\r
-+  \r
-+  bindtextdomain("aspell", value.c_str());\r
-+#else\r
++  
++#ifdef _WIN32
++  // Registry key for Locale Path
++  
++  acommon::String value;
++  HKEY hive;
++  
++  hive = acommon::GetRegHive();
++  value = acommon::ReadRegString(hive, "Software\\Aspell", "Locale Path");
++  if (value == "") value = LOCALEDIR;
++  
++  bindtextdomain("aspell", value.c_str());
++#else
    bindtextdomain("aspell", LOCALEDIR);
-+#endif\r
++#endif
  }
  
  #else
@@ -173,11 +173,11 @@ diff -riwbBuN -Xex aspell-0.60.4/common/info.cpp aspell-0.60.4-modified/common/i
   /* BSDi defines u_intXX_t types in machine/types.h */
  #include <machine/types.h>
  #endif
-+\r
++
  #ifdef WIN32
  #  include <windows.h>
  #  include <winbase.h>
-+#include "aspell_win.hpp"\r
++#include "aspell_win.hpp"
  #endif
  
  #include "iostream.hpp"
@@ -185,7 +185,7 @@ diff -riwbBuN -Xex aspell-0.60.4/common/info.cpp aspell-0.60.4-modified/common/i
  #include "string_map.hpp"
  
  #include "gettext.h"
-+#undef printf\r
++#undef printf
  
  namespace acommon {
  
@@ -193,23 +193,23 @@ diff -riwbBuN -Xex aspell-0.60.4/common/info.cpp aspell-0.60.4-modified/common/i
    void get_data_dirs (Config * config,
                      StringList & lst)
    {
-+    String dictpath;\r
-+      HKEY hive;\r
-+      \r
++    String dictpath;
++      HKEY hive;
++      
      lst.clear();
 -    lst.add(config->retrieve("data-dir"));
-+\r
-+    hive = GetRegHive();\r
-+      \r
-+#ifdef _WIN32\r
-+    // Registry key for dictionary path\r
-+    dictpath = ReadRegString(hive, "Software\\Aspell", "Dictionary Path");;\r
-+    if (dictpath == "") dictpath = config->retrieve("data-dir");\r
-+#else\r
-+    dictpath = config->retrieve("data-dir");\r
-+#endif\r
-+\r
-+    lst.add(dictpath);\r
++
++    hive = GetRegHive();
++      
++#ifdef _WIN32
++    // Registry key for dictionary path
++    dictpath = ReadRegString(hive, "Software\\Aspell", "Dictionary Path");;
++    if (dictpath == "") dictpath = config->retrieve("data-dir");
++#else
++    dictpath = config->retrieve("data-dir");
++#endif
++
++    lst.add(dictpath);
      lst.add(config->retrieve("dict-dir"));
    }
  
@@ -220,7 +220,7 @@ diff -riwbBuN -Xex aspell-0.60.4/common/posib_err.cpp aspell-0.60.4-modified/com
  #include "posib_err.hpp"
  
  #include "gettext.h"
-+#undef printf\r
++#undef printf
  
  
  namespace acommon {
@@ -232,11 +232,11 @@ diff -riwbBuN -Xex aspell-0.60.4/modules/speller/default/language.cpp aspell-0.6
  
  #ifdef ENABLE_NLS
 -#  include <langinfo.h>
-+//#include <langinfo.h>\r
++//#include <langinfo.h>
  #endif
  
  #include "gettext.h"
-+#undef printf\r
++#undef printf
  
  namespace aspeller {
  
@@ -247,7 +247,7 @@ diff -riwbBuN -Xex aspell-0.60.4/prog/aspell.cpp aspell-0.60.4-modified/prog/asp
  #include "hash_fun.hpp"
  
  #include "gettext.h"
-+#undef printf\r
++#undef printf
  
  using namespace acommon;