summaryrefslogtreecommitdiff
path: root/src/win32/utf-conv.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-08-13 09:40:32 -0700
committerRussell Belfer <rb@github.com>2013-08-13 09:40:32 -0700
commitd4cff0cb1caac8c2c2cabbab9d3301f99b5ee230 (patch)
tree8cf80e5b4df328fe2d466c21c68f016f4af56a21 /src/win32/utf-conv.h
parent3869a171dd78e52436bcb779a04b910454932e55 (diff)
downloadlibgit2-d4cff0cb1caac8c2c2cabbab9d3301f99b5ee230.tar.gz
Rename git__win32_path fns to git_win32_path
Diffstat (limited to 'src/win32/utf-conv.h')
-rw-r--r--src/win32/utf-conv.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/win32/utf-conv.h b/src/win32/utf-conv.h
index 835dc75a3..1d008dba5 100644
--- a/src/win32/utf-conv.h
+++ b/src/win32/utf-conv.h
@@ -11,22 +11,25 @@
#ifndef INCLUDE_git_utfconv_h__
#define INCLUDE_git_utfconv_h__
+/* Maximum characters in a Windows path plus one for NUL byte */
#define GIT_WIN_PATH_UTF16 (260 + 1)
+
+/* Maximum bytes necessary to convert a full-length UTF16 path to UTF8 */
#define GIT_WIN_PATH_UTF8 (260 * 4 + 1)
typedef wchar_t git_win32_path[GIT_WIN_PATH_UTF16];
-// dest_size is the size of dest in wchar_t's
+/* dest_size is the size of dest in wchar_t's */
int git__utf8_to_16(wchar_t * dest, size_t dest_size, const char *src);
-// dest_size is the size of dest in char's
+/* dest_size is the size of dest in char's */
int git__utf16_to_8(char *dest, size_t dest_size, const wchar_t *src);
-GIT_INLINE(int) git__win32_path_from_c(git_win32_path dest, const char *src)
+GIT_INLINE(int) git_win32_path_from_c(git_win32_path dest, const char *src)
{
return git__utf8_to_16(dest, GIT_WIN_PATH_UTF16, src);
}
-GIT_INLINE(int) git__win32_path_to_c(char *dest, const git_win32_path src)
+GIT_INLINE(int) git_win32_path_to_c(char *dest, const git_win32_path src)
{
return git__utf16_to_8(dest, GIT_WIN_PATH_UTF8, src);
}