diff options
Diffstat (limited to 'contrib/japanese/gdevfmlbp.c')
-rw-r--r-- | contrib/japanese/gdevfmlbp.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/contrib/japanese/gdevfmlbp.c b/contrib/japanese/gdevfmlbp.c index 0e0ab425..2de50e40 100644 --- a/contrib/japanese/gdevfmlbp.c +++ b/contrib/japanese/gdevfmlbp.c @@ -41,15 +41,16 @@ copies. */ /* The device descriptors */ static dev_proc_print_page(fmlbp_print_page); -#ifdef FMLBP_NOADJUST_MARGIN -#define PRNFMLBP prn_std_procs +static void fmlbp_initialize_device_procs(gx_device *dev) +{ + gdev_prn_initialize_device_procs_mono(dev); +} + +#ifdef FMLBP_NOADJUST_MARGIN +#define PRNFML_INIT fmlbp_initialize_device_procs #else /* Adjust margin for ghostscript 2.6.1 */ -#define PRNFMLBP prn_fmlbp_procs -static dev_proc_get_initial_matrix(fmlbp_get_initial_matrix); -gx_device_procs prn_fmlbp_procs = - prn_matrix_procs(gdev_prn_open, fmlbp_get_initial_matrix, - gdev_prn_output_page, gdev_prn_close); +#define PRNFML_INIT fmlbp_initialize_device_procs_with_matrix /* Shift the origin from the top left corner of the pysical page to the first printable pixel, as defined by the top and left margins. */ @@ -60,10 +61,17 @@ fmlbp_get_initial_matrix(gx_device *dev, gs_matrix *pmat) pmat->tx -= (dev->l_margin * dev->x_pixels_per_inch); pmat->ty -= (dev->t_margin * dev->y_pixels_per_inch); } + +static void fmlbp_initialize_device_procs_with_matrix(gx_device *dev) +{ + fmlbp_initialize_device_procs(dev); + + set_dev_proc(dev, get_initial_matrix, fmlbp_get_initial_matrix); +} #endif/*FMLBP_NOADJUST_MARGIN*/ gx_device_printer gs_fmlbp_device = - prn_device(PRNFMLBP, "fmlbp", + prn_device(PRNFML_INIT, "fmlbp", DEFAULT_WIDTH_10THS_A4, /* width_10ths, 8.3" */ DEFAULT_HEIGHT_10THS_A4, /* height_10ths, 11.7" */ X_DPI, Y_DPI, |