diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-04-22 22:33:57 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-04-22 22:33:57 +0000 |
commit | eb3593b38b7b6b658e93ad05d6caf76d58cc0c35 (patch) | |
tree | 39210f19a86e4db2914523b0fde4a5ff9d345c16 /src/hardcopy.c | |
parent | 57657d85c6c3d812e99b5e5d5161c07c66ac7dc7 (diff) | |
download | vim-git-eb3593b38b7b6b658e93ad05d6caf76d58cc0c35.tar.gz |
updated for version 7.0e06v7.0e06
Diffstat (limited to 'src/hardcopy.c')
-rw-r--r-- | src/hardcopy.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/hardcopy.c b/src/hardcopy.c index 62567a3db..bc5a219fc 100644 --- a/src/hardcopy.c +++ b/src/hardcopy.c @@ -2538,12 +2538,11 @@ mch_print_init(psettings, jobname, forceit) /* Build CMap name - will be same for all multi-byte fonts used */ prt_cmap[0] = NUL; - prt_custom_cmap = prt_out_mbyte && p_mbchar == NULL; - + prt_custom_cmap = (p_mbchar == NULL); if (!prt_custom_cmap) { /* Check encoding and character set are compatible */ - if ((p_mbenc->needs_charset&p_mbchar->has_charset) == 0) + if ((p_mbenc->needs_charset & p_mbchar->has_charset) == 0) { EMSG(_("E673: Incompatible multi-byte encoding and character set.")); return FALSE; @@ -2862,6 +2861,7 @@ mch_print_begin(psettings) struct prt_ps_resource_S res_encoding; char buffer[256]; char_u *p_encoding; + char_u *p; #ifdef FEAT_MBYTE struct prt_ps_resource_S res_cidfont; struct prt_ps_resource_S res_cmap; @@ -2880,7 +2880,9 @@ mch_print_begin(psettings) now = time(NULL); p_time = ctime(&now); /* Note: ctime() adds a \n so we have to remove it :-( */ - *(vim_strchr((char_u *)p_time, '\n')) = '\0'; + p = vim_strchr((char_u *)p_time, '\n'); + if (p != NULL) + *p = NUL; prt_dsc_textline("CreationDate", p_time); prt_dsc_textline("DocumentData", "Clean8Bit"); prt_dsc_textline("Orientation", "Portrait"); |