Hi Bram,

2014/10/10 Fri 0:06:25 UTC+9 Bram Moolenaar wrote:
> Patch 7.4.471
> Problem:    MS-Windows: When printer name contains multi-byte, the name is
>           displayed as ???.
> Solution:   Convert the printer name from the active codepage to 'encoding'.
>           (Yasuhiro Matsumoto)
> Files:            src/os_mswin.c

After this patch, the following warnings occur:

os_mswin.c(1647) : warning C4267: 'function' : conversion from 'size_t' to 
'int', possible loss of data
os_mswin.c(1650) : warning C4267: 'function' : conversion from 'size_t' to 
'int', possible loss of data

Attached patch fixes them.

Regards,
Ken Takata

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent f70e55282ebc313e0650d123746b53c79617cf2f
diff --git a/src/os_mswin.c b/src/os_mswin.c
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -1656,10 +1656,11 @@ mch_print_init(prt_settings_T *psettings
 	    char_u  *to_free = NULL;
 	    int     maxlen;
 
-	    acp_to_enc(printer_name, STRLEN(printer_name), &to_free, &maxlen);
+	    acp_to_enc(printer_name, (int)STRLEN(printer_name), &to_free,
+								    &maxlen);
 	    if (to_free != NULL)
 		printer_name = to_free;
-	    acp_to_enc(port_name, STRLEN(port_name), &to_free, &maxlen);
+	    acp_to_enc(port_name, (int)STRLEN(port_name), &to_free, &maxlen);
 	    if (to_free != NULL)
 		port_name = to_free;
 	}

Raspunde prin e-mail lui