]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/url.cpp
Add wxBitmap::GetNSImage() which creates an autoreleased NSImage either
[wxWidgets.git] / src / common / url.cpp
index 16e2689e9a8923eca95a0df60c43d000b0ba27c1..e265e0c5f3c729019b71647eeb7a6435cac11578 100644 (file)
@@ -6,10 +6,10 @@
 // Created:     20/07/1997
 // RCS-ID:      $Id$
 // Copyright:   (c) 1997, 1998 Guilhem Lavaux
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "url.h"
 #endif
 
@@ -272,8 +272,6 @@ bool wxURL::FetchProtocol()
 
 wxInputStream *wxURL::GetInputStream()
 {
-  wxInputStream *the_i_stream = NULL;
-
   if (!m_protocol)
   {
     m_error = wxURL_NOPROTO;
@@ -310,10 +308,9 @@ wxInputStream *wxURL::GetInputStream()
 #endif
 
   // When we use a proxy, we have to pass the whole URL to it.
-  if (m_useProxy)
-    the_i_stream = m_protocol->GetInputStream(m_url);
-  else
-    the_i_stream = m_protocol->GetInputStream(m_path);
+  wxInputStream *the_i_stream = 
+       (m_useProxy) ? m_protocol->GetInputStream(m_url) :
+                      m_protocol->GetInputStream(m_path);
 
   if (!the_i_stream)
   {
@@ -464,12 +461,16 @@ wxString wxURL::ConvertFromURI(const wxString& uri)
       i++;
       if (uri[i] >= wxT('A') && uri[i] <= wxT('F'))
         code = (uri[i] - wxT('A') + 10) * 16;
+      else if (uri[i] >= wxT('a') && uri[i] <= wxT('f'))
+        code = (uri[i] - wxT('a') + 10) * 16;
       else
         code = (uri[i] - wxT('0')) * 16;
 
       i++;
       if (uri[i] >= wxT('A') && uri[i] <= wxT('F'))
         code += (uri[i] - wxT('A')) + 10;
+      else if (uri[i] >= wxT('a') && uri[i] <= wxT('f'))
+        code += (uri[i] - wxT('a')) + 10;
       else
         code += (uri[i] - wxT('0'));