You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2014/06/19 12:56:25 UTC

svn commit: r1603826 - /subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c

Author: rhuijben
Date: Thu Jun 19 10:56:25 2014
New Revision: 1603826

URL: http://svn.apache.org/r1603826
Log:
Tweak a bit of code for improved documentation. No functional changes.

* subversion/libsvn_subr/win32_crashrpt.c
  (convert_wbcs_to_utf8): Rename static function to...
  (convert_wbcs_to_ansi): ... this, to document what it really does.
    As this is the desired behavior, all we have to do is...
  (write_module_info_callback,
   format_value): Update callers.

Modified:
    subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c

Modified: subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c?rev=1603826&r1=1603825&r2=1603826&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c (original)
+++ subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c Thu Jun 19 10:56:25 2014
@@ -60,12 +60,13 @@ HANDLE dbghelp_dll = INVALID_HANDLE_VALU
 
 /*** Code. ***/
 
-/* Convert a wide-character string to utf-8. This function will create a buffer
- * large enough to hold the result string, the caller should free this buffer.
+/* Convert a wide-character string to the current windows locale, suitable
+ * for directly using stdio. This function will create a buffer large
+ * enough to hold the result string, the caller should free this buffer.
  * If the string can't be converted, NULL is returned.
  */
 static char *
-convert_wbcs_to_utf8(const wchar_t *str)
+convert_wbcs_to_ansi(const wchar_t *str)
 {
   size_t len = wcslen(str);
   char *utf8_str = malloc(sizeof(wchar_t) * len + 1);
@@ -169,7 +170,7 @@ write_module_info_callback(void *data,
       FILE *log_file = (FILE *)data;
       MINIDUMP_MODULE_CALLBACK module = callback_input->Module;
 
-      char *buf = convert_wbcs_to_utf8(module.FullPath);
+      char *buf = convert_wbcs_to_ansi(module.FullPath);
       fprintf(log_file, FORMAT_PTR, module.BaseOfImage);
       fprintf(log_file, "  %s", buf);
       free(buf);
@@ -335,7 +336,7 @@ format_value(char *value_str, DWORD64 mo
           if (SymGetTypeInfo_(proc, mod_base, type, TI_GET_SYMNAME,
                               &type_name_wbcs))
             {
-              char *type_name = convert_wbcs_to_utf8(type_name_wbcs);
+              char *type_name = convert_wbcs_to_ansi(type_name_wbcs);
               LocalFree(type_name_wbcs);
 
               if (ptr == 0)