Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:11.4
ghostscript-library
ghostscript-9.00-dmpr.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ghostscript-9.00-dmpr.dif of Package ghostscript-library
--- contrib/japanese/gdevdmpr.c +++ contrib/japanese/gdevdmpr.c 2007-09-03 17:13:01.000000000 +0000 @@ -41,7 +41,11 @@ /* include library header. */ #include "dviprlib.h" -extern FILE *lib_fopen(const char *); +#include "gxalloc.h" +#include "stream.h" +#include "files.h" +#include "iref.h" +#include "main.h" #define LOCAL_DEBUG 0 @@ -405,7 +409,7 @@ gdev_dmprt_put_params(gx_device *pdev, g if (pddev->dmprt.max_height>0 && pddev->dmprt.max_height<pddev->height) pddev->height = pddev->dmprt.max_height; - dviprt_setmessagestream(pddev->dmprt.debug_f ? stderr : NULL); + dviprt_setmessagestream(pddev->dmprt.debug_f); return code; } @@ -425,7 +429,7 @@ gdev_dmprt_put_dmprt_params(gx_device *p if (code < 0) return code; if (code == 0) pddev->dmprt.debug_f = vbool; - dviprt_setmessagestream(pddev->dmprt.debug_f ? stderr : NULL); + dviprt_setmessagestream(pddev->dmprt.debug_f); code = param_read_bool(plist, "Verbose", &vbool); if (code < 0) return code; @@ -837,13 +841,16 @@ static const char * gp_file_name_concat_ static FILE * gdev_dmprt_dviprt_lib_fopen(const char *fnamebase,char *fname) { - FILE *fp; - char *env; + const gs_main_instance * minst = get_minst_from_memory(gs_lib_ctx_get_non_gc_memory_t()); + const gs_file_path_ptr path = &minst->lib_path; + const gs_memory_t *imem = minst->heap; + FILE *fp = (FILE*)0; strcpy(fname,fnamebase); - fp = lib_fopen(fname); + if (minst && path && imem) + fp = lib_fopen(path,imem,fname); if (fp == NULL) { - env = getenv("TEXCFG"); + const char *env = getenv("TEXCFG"); if (env) { strcpy(fname,env); strcat(fname, gp_file_name_concat_string(env,strlen(env))); --- contrib/japanese/dviprlib.c +++ contrib/japanese/dviprlib.c 2007-09-04 09:30:51.000000000 +0000 @@ -1433,15 +1433,11 @@ char *dviprt_stringsname[] = { CFG_STRIN char *dviprt_prtcodename[] = { CFG_PRTCODE_NAME, NULL }; char *dviprt_encodename[] = { CFG_ENCODE_NAME, NULL }; -#if 0 -static FILE *dviprt_messagestream = stderr; -#else /* patch for glibc 2.1.x by Shin Fukui <shita@april.co.jp> */ -static FILE *dviprt_messagestream; -#endif +static int dviprt_messagestream; /*--- library functions ---*/ int -dviprt_setmessagestream(FILE *fp) +dviprt_setmessagestream(int fp) { dviprt_messagestream = fp; return 0; @@ -1510,9 +1506,10 @@ static int dviprt_printmessage(char *str,int len) { if (dviprt_messagestream && str) { - if (len >= 0) fwrite(str,len,1,dviprt_messagestream); - else fputs(str,dviprt_messagestream); - fflush(dviprt_messagestream); + if (len == 0) + len = strlen(str); + if (len >= 0) errwrite_nomem(str,len); + errflush_nomem(); } return 0; } --- contrib/japanese/dviprlib.h +++ contrib/japanese/dviprlib.h 2007-09-03 17:10:47.000000000 +0000 @@ -255,7 +255,7 @@ extern int dviprt_outputscanlines(dviprt extern int dviprt_output(dviprt_print *,unsigned char far *,long ); extern int dviprt_unsetbuffer(dviprt_print *); -extern int dviprt_setmessagestream(FILE *); +extern int dviprt_setmessagestream(int); extern int dviprt_writesrc(char *,char *,dviprt_cfg_t *,unsigned char *,int ); extern int dviprt_writecfg(char *,char *,dviprt_cfg_t *,unsigned char *,int ); extern int dviprt_writec(char *,char *,dviprt_cfg_t *,unsigned char *,int );
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