Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/plugin/PluginSystem.cpp

Issue 5516878722105344: Issue #276 - replace TCHAR etc. with wide-character versions (Closed)
Patch Set: Created July 26, 2014, 2:20 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/plugin/PluginFilter.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 2
3 // Internet / FTP 3 // Internet / FTP
4 #include <wininet.h> 4 #include <wininet.h>
5 5
6 // IP adapter 6 // IP adapter
7 #include <iphlpapi.h> 7 #include <iphlpapi.h>
8 8
9 #include "PluginSystem.h" 9 #include "PluginSystem.h"
10 #include "PluginClient.h" 10 #include "PluginClient.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 system = s_instance; 54 system = s_instance;
55 } 55 }
56 s_criticalSection.Unlock(); 56 s_criticalSection.Unlock();
57 57
58 return system; 58 return system;
59 } 59 }
60 60
61 CString CPluginSystem::GetBrowserLanguage() const 61 CString CPluginSystem::GetBrowserLanguage() const
62 { 62 {
63 LANGID lcid = ::GetUserDefaultLangID(); 63 LANGID lcid = ::GetUserDefaultLangID();
64 TCHAR language[128]; 64 wchar_t language[128];
65 memset(language, 0, sizeof(language)); 65 memset(language, 0, sizeof(language));
66 66
67 TCHAR country[128]; 67 wchar_t country[128];
68 memset(language, 0, sizeof(country)); 68 memset(language, 0, sizeof(country));
69 69
70 CString lang; 70 CString lang;
71 71
72 int res = ::GetLocaleInfo(lcid, LOCALE_SISO639LANGNAME, language, 127); 72 int res = ::GetLocaleInfo(lcid, LOCALE_SISO639LANGNAME, language, 127);
73 if (res == 0) 73 if (res == 0)
74 { 74 {
75 DEBUG_ERROR_LOG(::GetLastError(), PLUGIN_ERROR_SYSINFO, PLUGIN_ERROR_SYSINFO _BROWSER_LANGUAGE, "System::GetBrowserLang - Failed"); 75 DEBUG_ERROR_LOG(::GetLastError(), PLUGIN_ERROR_SYSINFO, PLUGIN_ERROR_SYSINFO _BROWSER_LANGUAGE, "System::GetBrowserLang - Failed");
76 } 76 }
77 else 77 else
78 { 78 {
79 lang.Append(language); 79 lang.Append(language);
80 } 80 }
81 81
82 lang.Append(L"-"); 82 lang.Append(L"-");
83 83
84 84
85 res = ::GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, country, 127); 85 res = ::GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, country, 127);
86 if (res == 0) 86 if (res == 0)
87 { 87 {
88 DEBUG_ERROR_LOG(::GetLastError(), PLUGIN_ERROR_SYSINFO, PLUGIN_ERROR_SYSINFO _BROWSER_LANGUAGE, "System::GetBrowserLang - failed to retrieve country"); 88 DEBUG_ERROR_LOG(::GetLastError(), PLUGIN_ERROR_SYSINFO, PLUGIN_ERROR_SYSINFO _BROWSER_LANGUAGE, "System::GetBrowserLang - failed to retrieve country");
89 } 89 }
90 else 90 else
91 { 91 {
92 lang.Append(country); 92 lang.Append(country);
93 } 93 }
94 94
95 return lang; 95 return lang;
96 } 96 }
OLDNEW
« no previous file with comments | « src/plugin/PluginFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld