Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1:kernel-2.6.32
ghostscript-mini
ghostscript-8.60-cgmout.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ghostscript-8.60-cgmout.dif of Package ghostscript-mini
--- src/gdevcgm.c +++ src/gdevcgm.c 2007-08-03 17:23:47.773390898 +0200 @@ -144,10 +144,13 @@ cgm_open(gx_device * dev) {-1, 1}; cgm_metafile_elements meta; cgm_result result; - +#if 0 cdev->file = fopen(cdev->fname, "wb"); +#else + (void)gx_device_open_output_file(dev, cdev->fname, 1, 0, &cdev->file); if (cdev->file == 0) return_error(gs_error_ioerror); +#endif cal.private_data = cdev; cal.alloc = cgm_gs_alloc; cal.free = cgm_gs_free; @@ -211,8 +214,15 @@ cgm_close(gx_device * dev) result = cgm_terminate(cdev->st); check_result(result); cdev->st = 0; +#if 0 fclose(cdev->file); cdev->file = 0; +#else + code = gx_device_close_output_file(dev, cdev->fname, cdev->file); + cdev->file = 0; + if (code < 0) + return code; +#endif return 0; } @@ -223,7 +233,6 @@ cgm_get_params(gx_device * dev, gs_param 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, @@ -268,15 +277,25 @@ cgm_put_params(gx_device * dev, gs_param code = gx_default_put_params(dev, plist); if (code < 0) return code; - if (ofs.data != 0) { /* Close the file if it's open. */ if (cdev->file != 0) { +#if 0 fclose(cdev->file); cdev->file = 0; +#else + code = gx_device_close_output_file(dev, cdev->fname, cdev->file); + cdev->file = 0; + if (code < 0) + return code; +#endif } memcpy(cdev->fname, ofs.data, ofs.size); cdev->fname[ofs.size] = 0; +#if 0 cdev->file = fopen(cdev->fname, "wb"); +#else + (void)gx_device_open_output_file(dev, cdev->fname, 1, 0, &cdev->file); +#endif if (cdev->file == 0) return_error(gs_error_ioerror); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor