static int mac_get_params(gx_device *dev, gs_param_list *plist) { gx_device_macos *mdev = (gx_device_macos *)dev; int code; gs_param_string outputFile; code = gx_default_get_params(dev, plist); if (code < 0) return code; // UseExternalFonts code = param_write_bool(plist, "UseExternalFonts", &(mdev->useXFonts)); // color depth code = param_write_int(plist, "BitsPerPixel", &(mdev->color_info.depth)); // output file name outputFile.data = (const byte *) mdev->outputFileName; outputFile.size = strlen(mdev->outputFileName); outputFile.persistent = false; code = param_write_string(plist, "OutputFile", &outputFile); return code; }
int gx_forward_get_params(gx_device * dev, gs_param_list * plist) { gx_device_forward * const fdev = (gx_device_forward *)dev; gx_device *tdev = fdev->target; return (tdev == 0 ? gx_default_get_params(dev, plist) : dev_proc(tdev, get_params)(tdev, plist)); }
/* Get parameters. CGM devices add OutputFile to the default set. */ static int cgm_get_params(gx_device * dev, gs_param_list * plist) { gx_device_cgm *cdev = (gx_device_cgm *) dev; int code = gx_default_get_params(dev, plist); gs_param_string ofns; if (code < 0) return code; ofns.data = (const byte *)cdev->fname, ofns.size = strlen(cdev->fname), ofns.persistent = false; return param_write_string(plist, "OutputFile", &ofns); }
static int txtwrite_get_params(gx_device * dev, gs_param_list * plist) { int code; gs_param_string ofns; gx_device_txtwrite_t *const tdev = (gx_device_txtwrite_t *) dev; code = gx_default_get_params(dev, plist); if (code < 0) return code; ofns.data = (const byte *)tdev->fname, ofns.size = strlen(tdev->fname), ofns.persistent = false; code = param_write_string(plist, "OutputFile", &ofns); return code; }