diff options
author | Bob Arnson <bob@firegiant.com> | 2024-07-15 16:58:09 -0400 |
---|---|---|
committer | Bob Arnson <github@bobs.org> | 2024-07-15 18:31:51 -0400 |
commit | bb975d370a6a7398c4d28d23601b20ada7a7cdfe (patch) | |
tree | f288dd87f1b39b92747d7bf0b288ed6ce132d3af | |
parent | 6bd80b51b42686ce5665140d0ab7c64bd35204d9 (diff) | |
download | wix-bb975d370a6a7398c4d28d23601b20ada7a7cdfe.tar.gz wix-bb975d370a6a7398c4d28d23601b20ada7a7cdfe.tar.bz2 wix-bb975d370a6a7398c4d28d23601b20ada7a7cdfe.zip |
Fix egregiously bad comments that were frustrating
-rw-r--r-- | src/libs/dutil/WixToolset.DUtil/locutil.cpp | 56 | ||||
-rw-r--r-- | src/libs/dutil/WixToolset.DUtil/thmutil.cpp | 2 |
2 files changed, 29 insertions, 29 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/locutil.cpp b/src/libs/dutil/WixToolset.DUtil/locutil.cpp index 5ea3f814..008d0367 100644 --- a/src/libs/dutil/WixToolset.DUtil/locutil.cpp +++ b/src/libs/dutil/WixToolset.DUtil/locutil.cpp | |||
@@ -116,15 +116,15 @@ extern "C" HRESULT DAPI LocProbeForFile( | |||
116 | LocExitOnFailure(hr, "Failed to parse langId."); | 116 | LocExitOnFailure(hr, "Failed to parse langId."); |
117 | 117 | ||
118 | langid = MAKEWORD(HIBYTE(langid), LOBYTE(langid)); | 118 | langid = MAKEWORD(HIBYTE(langid), LOBYTE(langid)); |
119 | hr = StrAllocFormatted(&sczLangIdFile, L"%u\\%ls", langid, wzLocFileName); | 119 | hr = StrAllocFormatted(&sczLangIdFile, L"%u\\%ls", langid, wzLocFileName); |
120 | LocExitOnFailure(hr, "Failed to format user preferred langid."); | 120 | LocExitOnFailure(hr, "Failed to format user preferred langid."); |
121 | 121 | ||
122 | hr = PathConcat(wzBasePath, sczLangIdFile, &sczProbePath); | 122 | hr = PathConcat(wzBasePath, sczLangIdFile, &sczProbePath); |
123 | LocExitOnFailure(hr, "Failed to concat user preferred langid file name to base path."); | 123 | LocExitOnFailure(hr, "Failed to concat user preferred langid file name to base path."); |
124 | 124 | ||
125 | if (FileExistsEx(sczProbePath, NULL)) | 125 | if (FileExistsEx(sczProbePath, NULL)) |
126 | { | 126 | { |
127 | ExitFunction(); | 127 | ExitFunction(); |
128 | } | 128 | } |
129 | } | 129 | } |
130 | } | 130 | } |
@@ -142,20 +142,20 @@ extern "C" HRESULT DAPI LocProbeForFile( | |||
142 | ExitFunction(); | 142 | ExitFunction(); |
143 | } | 143 | } |
144 | 144 | ||
145 | if (MAKELANGID(langid & 0x3FF, SUBLANG_DEFAULT) != langid) | 145 | if (MAKELANGID(langid & 0x3FF, SUBLANG_DEFAULT) != langid) |
146 | { | 146 | { |
147 | langid = MAKELANGID(langid & 0x3FF, SUBLANG_DEFAULT); | 147 | langid = MAKELANGID(langid & 0x3FF, SUBLANG_DEFAULT); |
148 | 148 | ||
149 | hr = StrAllocFormatted(&sczLangIdFile, L"%u\\%ls", langid, wzLocFileName); | 149 | hr = StrAllocFormatted(&sczLangIdFile, L"%u\\%ls", langid, wzLocFileName); |
150 | LocExitOnFailure(hr, "Failed to format user langid (default sublang)."); | 150 | LocExitOnFailure(hr, "Failed to format user langid (default sublang)."); |
151 | 151 | ||
152 | hr = PathConcat(wzBasePath, sczLangIdFile, &sczProbePath); | 152 | hr = PathConcat(wzBasePath, sczLangIdFile, &sczProbePath); |
153 | LocExitOnFailure(hr, "Failed to concat user langid file name to base path (default sublang)."); | 153 | LocExitOnFailure(hr, "Failed to concat user langid file name to base path (default sublang)."); |
154 | 154 | ||
155 | if (FileExistsEx(sczProbePath, NULL)) | 155 | if (FileExistsEx(sczProbePath, NULL)) |
156 | { | 156 | { |
157 | ExitFunction(); | 157 | ExitFunction(); |
158 | } | 158 | } |
159 | } | 159 | } |
160 | 160 | ||
161 | langid = ::GetSystemDefaultUILanguage(); | 161 | langid = ::GetSystemDefaultUILanguage(); |
@@ -171,20 +171,20 @@ extern "C" HRESULT DAPI LocProbeForFile( | |||
171 | ExitFunction(); | 171 | ExitFunction(); |
172 | } | 172 | } |
173 | 173 | ||
174 | if (MAKELANGID(langid & 0x3FF, SUBLANG_DEFAULT) != langid) | 174 | if (MAKELANGID(langid & 0x3FF, SUBLANG_DEFAULT) != langid) |
175 | { | 175 | { |
176 | langid = MAKELANGID(langid & 0x3FF, SUBLANG_DEFAULT); | 176 | langid = MAKELANGID(langid & 0x3FF, SUBLANG_DEFAULT); |
177 | 177 | ||
178 | hr = StrAllocFormatted(&sczLangIdFile, L"%u\\%ls", langid, wzLocFileName); | 178 | hr = StrAllocFormatted(&sczLangIdFile, L"%u\\%ls", langid, wzLocFileName); |
179 | LocExitOnFailure(hr, "Failed to format user langid (default sublang)."); | 179 | LocExitOnFailure(hr, "Failed to format user langid (default sublang)."); |
180 | 180 | ||
181 | hr = PathConcat(wzBasePath, sczLangIdFile, &sczProbePath); | 181 | hr = PathConcat(wzBasePath, sczLangIdFile, &sczProbePath); |
182 | LocExitOnFailure(hr, "Failed to concat user langid file name to base path (default sublang)."); | 182 | LocExitOnFailure(hr, "Failed to concat user langid file name to base path (default sublang)."); |
183 | 183 | ||
184 | if (FileExistsEx(sczProbePath, NULL)) | 184 | if (FileExistsEx(sczProbePath, NULL)) |
185 | { | 185 | { |
186 | ExitFunction(); | 186 | ExitFunction(); |
187 | } | 187 | } |
188 | } | 188 | } |
189 | 189 | ||
190 | // Finally, look for the loc file in the base path. | 190 | // Finally, look for the loc file in the base path. |
@@ -242,13 +242,13 @@ extern "C" HRESULT DAPI LocLoadFromResource( | |||
242 | IXMLDOMDocument* pixd = NULL; | 242 | IXMLDOMDocument* pixd = NULL; |
243 | 243 | ||
244 | hr = ResReadData(hModule, szResource, &pvResource, &cbResource); | 244 | hr = ResReadData(hModule, szResource, &pvResource, &cbResource); |
245 | LocExitOnFailure(hr, "Failed to read theme from resource."); | 245 | LocExitOnFailure(hr, "Failed to read localization from resource."); |
246 | 246 | ||
247 | hr = StrAllocStringAnsi(&sczXml, reinterpret_cast<LPCSTR>(pvResource), cbResource, CP_UTF8); | 247 | hr = StrAllocStringAnsi(&sczXml, reinterpret_cast<LPCSTR>(pvResource), cbResource, CP_UTF8); |
248 | LocExitOnFailure(hr, "Failed to convert XML document data from UTF-8 to unicode string."); | 248 | LocExitOnFailure(hr, "Failed to convert XML document data from UTF-8 to Unicode string."); |
249 | 249 | ||
250 | hr = XmlLoadDocument(sczXml, &pixd); | 250 | hr = XmlLoadDocument(sczXml, &pixd); |
251 | LocExitOnFailure(hr, "Failed to load theme resource as XML document."); | 251 | LocExitOnFailure(hr, "Failed to load localization resource as XML document."); |
252 | 252 | ||
253 | hr = ParseWxl(pixd, ppWixLoc); | 253 | hr = ParseWxl(pixd, ppWixLoc); |
254 | LocExitOnFailure(hr, "Failed to parse WXL."); | 254 | LocExitOnFailure(hr, "Failed to parse WXL."); |
diff --git a/src/libs/dutil/WixToolset.DUtil/thmutil.cpp b/src/libs/dutil/WixToolset.DUtil/thmutil.cpp index 3e7e0fc6..36b187a7 100644 --- a/src/libs/dutil/WixToolset.DUtil/thmutil.cpp +++ b/src/libs/dutil/WixToolset.DUtil/thmutil.cpp | |||
@@ -711,7 +711,7 @@ DAPI_(HRESULT) ThemeLoadFromFile( | |||
711 | LPWSTR sczRelativePath = NULL; | 711 | LPWSTR sczRelativePath = NULL; |
712 | 712 | ||
713 | hr = XmlLoadDocumentFromFile(wzThemeFile, &pixd); | 713 | hr = XmlLoadDocumentFromFile(wzThemeFile, &pixd); |
714 | ThmExitOnFailure(hr, "Failed to load theme resource as XML document."); | 714 | ThmExitOnFailure(hr, "Failed to load theme file as XML document."); |
715 | 715 | ||
716 | hr = PathGetDirectory(wzThemeFile, &sczRelativePath); | 716 | hr = PathGetDirectory(wzThemeFile, &sczRelativePath); |
717 | ThmExitOnFailure(hr, "Failed to get relative path from theme file."); | 717 | ThmExitOnFailure(hr, "Failed to get relative path from theme file."); |