Kaydet (Commit) 1a0d5a73 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Tabs to spaces

Change-Id: Ib0d64c9d93f7ae73a160ad242a6731b781edaf0f
üst 2ae6e778
...@@ -29,15 +29,15 @@ ...@@ -29,15 +29,15 @@
+#ifdef WIN32 +#ifdef WIN32
+static char* wstrToCstr( LPWSTR wStr ) +static char* wstrToCstr( LPWSTR wStr )
+{ +{
+ int bufSize; + int bufSize;
+ char* out = NULL; + char* out = NULL;
+ if ( wStr != NULL ) + if ( wStr != NULL )
+ { + {
+ bufSize = WideCharToMultiByte( CP_ACP, 0, wStr, -1, NULL, 0, NULL, NULL ); + bufSize = WideCharToMultiByte( CP_ACP, 0, wStr, -1, NULL, 0, NULL, NULL );
+ out = ( char* )malloc( bufSize * sizeof(char)); + out = ( char* )malloc( bufSize * sizeof(char));
+ WideCharToMultiByte( CP_ACP, 0, wStr, -1, out, bufSize, NULL, NULL ); + WideCharToMultiByte( CP_ACP, 0, wStr, -1, out, bufSize, NULL, NULL );
+ } + }
+ return out; + return out;
+} +}
+#endif +#endif
+ +
...@@ -64,12 +64,12 @@ ...@@ -64,12 +64,12 @@
+ if(!ieProxyConfig->fAutoDetect) { + if(!ieProxyConfig->fAutoDetect) {
+ char *ieProxy; + char *ieProxy;
+ char *ieNoProxy; + char *ieNoProxy;
+ char* pos; + char* pos;
+ +
+ ieProxy = wstrToCstr(ieProxyConfig->lpszProxy); + ieProxy = wstrToCstr(ieProxyConfig->lpszProxy);
+ ieNoProxy = wstrToCstr(ieProxyConfig->lpszProxyBypass); + ieNoProxy = wstrToCstr(ieProxyConfig->lpszProxyBypass);
+ +
+ /* Convert the ieNoProxy into a proper no_proxy value */ + /* Convert the ieNoProxy into a proper no_proxy value */
+ no_proxy = strdup(ieNoProxy); + no_proxy = strdup(ieNoProxy);
+ pos = strpbrk(no_proxy, "; "); + pos = strpbrk(no_proxy, "; ");
+ while (NULL != pos) { + while (NULL != pos) {
...@@ -102,10 +102,10 @@ ...@@ -102,10 +102,10 @@
+ else { + else {
+ /* TODO Handle the Proxy config Auto Detection case */ + /* TODO Handle the Proxy config Auto Detection case */
+ } + }
+ +
+ GlobalFree( ieProxyConfig->lpszAutoConfigUrl ); + GlobalFree( ieProxyConfig->lpszAutoConfigUrl );
+ GlobalFree( ieProxyConfig->lpszProxy ); + GlobalFree( ieProxyConfig->lpszProxy );
+ GlobalFree( ieProxyConfig->lpszProxyBypass ); + GlobalFree( ieProxyConfig->lpszProxyBypass );
+ } + }
+#else /* !WIN32 */ +#else /* !WIN32 */
char proxy_env[128]; char proxy_env[128];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment