comparison src/misc1.c @ 1752:a8aae2e1d2ae v7.2.049

updated for version 7.2-049
author vimboss
date Thu, 20 Nov 2008 16:10:17 +0000
parents 5a7384b9ca66
children cfcc1421f5e4
comparison
equal deleted inserted replaced
1751:aeac63ad9430 1752:a8aae2e1d2ae
8726 if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) 8726 if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
8727 { 8727 {
8728 /* The active codepage differs from 'encoding'. Attempt using the 8728 /* The active codepage differs from 'encoding'. Attempt using the
8729 * wide function. If it fails because it is not implemented fall back 8729 * wide function. If it fails because it is not implemented fall back
8730 * to the non-wide version (for Windows 98) */ 8730 * to the non-wide version (for Windows 98) */
8731 wn = enc_to_ucs2(buf, NULL); 8731 wn = enc_to_utf16(buf, NULL);
8732 if (wn != NULL) 8732 if (wn != NULL)
8733 { 8733 {
8734 hFind = FindFirstFileW(wn, &wfb); 8734 hFind = FindFirstFileW(wn, &wfb);
8735 if (hFind == INVALID_HANDLE_VALUE 8735 if (hFind == INVALID_HANDLE_VALUE
8736 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) 8736 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
8754 while (ok) 8754 while (ok)
8755 { 8755 {
8756 #ifdef WIN3264 8756 #ifdef WIN3264
8757 # ifdef FEAT_MBYTE 8757 # ifdef FEAT_MBYTE
8758 if (wn != NULL) 8758 if (wn != NULL)
8759 p = ucs2_to_enc(wfb.cFileName, NULL); /* p is allocated here */ 8759 p = utf16_to_enc(wfb.cFileName, NULL); /* p is allocated here */
8760 else 8760 else
8761 # endif 8761 # endif
8762 p = (char_u *)fb.cFileName; 8762 p = (char_u *)fb.cFileName;
8763 #else 8763 #else
8764 p = (char_u *)fb.ff_name; 8764 p = (char_u *)fb.ff_name;
8828 FindClose(hFind); 8828 FindClose(hFind);
8829 # ifdef FEAT_MBYTE 8829 # ifdef FEAT_MBYTE
8830 if (wn != NULL) 8830 if (wn != NULL)
8831 { 8831 {
8832 vim_free(wn); 8832 vim_free(wn);
8833 wn = enc_to_ucs2(buf, NULL); 8833 wn = enc_to_utf16(buf, NULL);
8834 if (wn != NULL) 8834 if (wn != NULL)
8835 hFind = FindFirstFileW(wn, &wfb); 8835 hFind = FindFirstFileW(wn, &wfb);
8836 } 8836 }
8837 if (wn == NULL) 8837 if (wn == NULL)
8838 # endif 8838 # endif