comparison src/hardcopy.c @ 1880:e5602d92da8c v7.2.177

updated for version 7.2-177
author vimboss
date Sat, 16 May 2009 15:31:32 +0000
parents 1b55bbf5c580
children cccb71c2c5c1
comparison
equal deleted inserted replaced
1879:e8eeeff19eae 1880:e5602d92da8c
440 } 440 }
441 441
442 /* 442 /*
443 * Print the page header. 443 * Print the page header.
444 */ 444 */
445 /*ARGSUSED*/
446 static void 445 static void
447 prt_header(psettings, pagenum, lnum) 446 prt_header(psettings, pagenum, lnum)
448 prt_settings_T *psettings; 447 prt_settings_T *psettings;
449 int pagenum; 448 int pagenum;
450 linenr_T lnum; 449 linenr_T lnum UNUSED;
451 { 450 {
452 int width = psettings->chars_per_line; 451 int width = psettings->chars_per_line;
453 int page_line; 452 int page_line;
454 char_u *tbuf; 453 char_u *tbuf;
455 char_u *p; 454 char_u *p;
1879 /* DSC comments always start %% */ 1878 /* DSC comments always start %% */
1880 if (prt_resfile_strncmp(0, "%%", 2) != 0) 1879 if (prt_resfile_strncmp(0, "%%", 2) != 0)
1881 return FALSE; 1880 return FALSE;
1882 1881
1883 /* Find type of DSC comment */ 1882 /* Find type of DSC comment */
1884 for (comment = 0; comment < NUM_ELEMENTS(prt_dsc_table); comment++) 1883 for (comment = 0; comment < (int)NUM_ELEMENTS(prt_dsc_table); comment++)
1885 if (prt_resfile_strncmp(0, prt_dsc_table[comment].string, 1884 if (prt_resfile_strncmp(0, prt_dsc_table[comment].string,
1886 prt_dsc_table[comment].len) == 0) 1885 prt_dsc_table[comment].len) == 0)
1887 break; 1886 break;
1888 1887
1889 if (comment != NUM_ELEMENTS(prt_dsc_table)) 1888 if (comment != NUM_ELEMENTS(prt_dsc_table))
2452 } 2451 }
2453 return FALSE; 2452 return FALSE;
2454 } 2453 }
2455 #endif 2454 #endif
2456 2455
2457 /*ARGSUSED*/
2458 int 2456 int
2459 mch_print_init(psettings, jobname, forceit) 2457 mch_print_init(psettings, jobname, forceit)
2460 prt_settings_T *psettings; 2458 prt_settings_T *psettings;
2461 char_u *jobname; 2459 char_u *jobname;
2462 int forceit; 2460 int forceit UNUSED;
2463 { 2461 {
2464 int i; 2462 int i;
2465 char *paper_name; 2463 char *paper_name;
2466 int paper_strlen; 2464 int paper_strlen;
2467 int fontsize; 2465 int fontsize;
2512 p_mbenc = NULL; 2510 p_mbenc = NULL;
2513 props = enc_canon_props(p_encoding); 2511 props = enc_canon_props(p_encoding);
2514 if (!(props & ENC_8BIT) && ((*p_pmcs != NUL) || !(props & ENC_UNICODE))) 2512 if (!(props & ENC_8BIT) && ((*p_pmcs != NUL) || !(props & ENC_UNICODE)))
2515 { 2513 {
2516 p_mbenc_first = NULL; 2514 p_mbenc_first = NULL;
2517 for (cmap = 0; cmap < NUM_ELEMENTS(prt_ps_mbfonts); cmap++) 2515 for (cmap = 0; cmap < (int)NUM_ELEMENTS(prt_ps_mbfonts); cmap++)
2518 if (prt_match_encoding((char *)p_encoding, &prt_ps_mbfonts[cmap], 2516 if (prt_match_encoding((char *)p_encoding, &prt_ps_mbfonts[cmap],
2519 &p_mbenc)) 2517 &p_mbenc))
2520 { 2518 {
2521 if (p_mbenc_first == NULL) 2519 if (p_mbenc_first == NULL)
2522 p_mbenc_first = p_mbenc; 2520 p_mbenc_first = p_mbenc;
2640 else 2638 else
2641 { 2639 {
2642 paper_name = "A4"; 2640 paper_name = "A4";
2643 paper_strlen = 2; 2641 paper_strlen = 2;
2644 } 2642 }
2645 for (i = 0; i < PRT_MEDIASIZE_LEN; ++i) 2643 for (i = 0; i < (int)PRT_MEDIASIZE_LEN; ++i)
2646 if (STRLEN(prt_mediasize[i].name) == (unsigned)paper_strlen 2644 if (STRLEN(prt_mediasize[i].name) == (unsigned)paper_strlen
2647 && STRNICMP(prt_mediasize[i].name, paper_name, 2645 && STRNICMP(prt_mediasize[i].name, paper_name,
2648 paper_strlen) == 0) 2646 paper_strlen) == 0)
2649 break; 2647 break;
2650 if (i == PRT_MEDIASIZE_LEN) 2648 if (i == PRT_MEDIASIZE_LEN)
3306 prt_dsc_noarg("PageTrailer"); 3304 prt_dsc_noarg("PageTrailer");
3307 3305
3308 return !prt_file_error; 3306 return !prt_file_error;
3309 } 3307 }
3310 3308
3311 /*ARGSUSED*/
3312 int 3309 int
3313 mch_print_begin_page(str) 3310 mch_print_begin_page(str)
3314 char_u *str; 3311 char_u *str UNUSED;
3315 { 3312 {
3316 int page_num[2]; 3313 int page_num[2];
3317 3314
3318 prt_page_num++; 3315 prt_page_num++;
3319 3316
3377 #ifdef FEAT_MBYTE 3374 #ifdef FEAT_MBYTE
3378 prt_half_width = FALSE; 3375 prt_half_width = FALSE;
3379 #endif 3376 #endif
3380 } 3377 }
3381 3378
3382 /*ARGSUSED*/
3383 int 3379 int
3384 mch_print_text_out(p, len) 3380 mch_print_text_out(p, len)
3385 char_u *p; 3381 char_u *p;
3386 int len; 3382 int len UNUSED;
3387 { 3383 {
3388 int need_break; 3384 int need_break;
3389 char_u ch; 3385 char_u ch;
3390 char_u ch_buff[8]; 3386 char_u ch_buff[8];
3391 float char_width; 3387 float char_width;