This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
cygwin.c: Remove misleading comments
[perl5.git] / cygwin / cygwin.c
index 985cc57..58a86c9 100644 (file)
@@ -175,7 +175,6 @@ wide_to_utf8(const wchar_t *wbuf)
     oldlocale = setlocale(LC_CTYPE, NULL);
     setlocale(LC_CTYPE, "utf-8");
 
-    /* uvchr_to_utf8(buf, chr) or Encoding::_bytes_to_utf8(sv, "UCS-2BE"); */
     wlen = wcsrtombs(NULL, (const wchar_t **)&wbuf, wlen, NULL);
     buf = (char *) safemalloc(wlen+1);
     wcsrtombs(buf, (const wchar_t **)&wbuf, wlen, NULL);
@@ -203,7 +202,6 @@ utf8_to_wide(const char *buf)
 
     setlocale(LC_CTYPE, "utf-8");
     wbuf = (wchar_t *) safemalloc(wlen);
-    /* utf8_to_uvchr_buf(pathname, pathname + wlen, wpath) or Encoding::_utf8_to_bytes(sv, "UCS-2BE"); */
     wlen = mbsrtowcs(wbuf, (const char**)&buf, wlen, &mbs);
 
     if (oldlocale) setlocale(LC_CTYPE, oldlocale);
@@ -315,7 +313,6 @@ XS(XS_Cygwin_win_to_posix_path)
 
             oldlocale = setlocale(LC_CTYPE, NULL);
             setlocale(LC_CTYPE, "utf-8");
-            /* utf8_to_uvchr_buf(src_path, src_path + wlen, wpath) or Encoding::_utf8_to_bytes(sv, "UCS-2BE"); */
             wlen = mbsrtowcs(wpath, (const char**)&src_path, wlen, &mbs);
             if (wlen > 0)
                 err = cygwin_conv_path(what, wpath, wbuf, wlen);
@@ -323,7 +320,7 @@ XS(XS_Cygwin_win_to_posix_path)
             else setlocale(LC_CTYPE, "C");
 
             SETLOCALE_UNLOCK;
-        } else { /* use bytes; assume already ucs-2 encoded bytestream */
+        } else { /* use bytes; assume already UTF-16 encoded bytestream */
             err = cygwin_conv_path(what, src_path, wbuf, wlen);
         }
         if (err == ENOSPC) { /* our space assumption was wrong, not enough space */
@@ -408,11 +405,10 @@ XS(XS_Cygwin_posix_to_win_path)
         setlocale(LC_CTYPE, "utf-8");
         if (!IN_BYTES) {
             mbstate_t mbs;
-            /* utf8_to_uvchr_buf(src_path, src_path + wlen, wpath) or Encoding::_utf8_to_bytes(sv, "UCS-2BE"); */
             wlen = mbsrtowcs(wpath, (const char**)&src_path, wlen, &mbs);
             if (wlen > 0)
                 err = cygwin_conv_path(what, wpath, wbuf, wlen);
-        } else { /* use bytes; assume already ucs-2 encoded bytestream */
+        } else { /* use bytes; assume already UTF-16 encoded bytestream */
             err = cygwin_conv_path(what, src_path, wbuf, wlen);
         }
         if (err == ENOSPC) { /* our space assumption was wrong, not enough space */