From 9826b079e2bc8aa2c8fb80632bd83cabcd6b14eb Mon Sep 17 00:00:00 2001 From: ellson Date: Tue, 22 Feb 2005 23:00:53 +0000 Subject: [PATCH] almost support for multiple windows on the same graph --- lib/common/emit.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/common/emit.c b/lib/common/emit.c index 6dda95ea9..bc443da6c 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -1530,7 +1530,7 @@ static FILE *file_select(char *str) void emit_jobs (GVC_t * gvc, graph_t * g) { gvrender_job_t *job; - char *prev_langname = NULL; + char *prev_langname = ""; for (job = gvrender_first_job(gvc); job; job = gvrender_next_job(gvc)) { if (!job->output_file) { /* if not yet opened */ @@ -1540,10 +1540,10 @@ void emit_jobs (GVC_t * gvc, graph_t * g) job->output_file = file_select(job->output_filename); } } - if (job->output_langname != prev_langname) { + job->output_lang = gvrender_select(gvc, job->output_langname); + assert(job->output_lang != NO_SUPPORT); /* should have been verified already */ + if (strcmp(job->output_langname,prev_langname) != 0) { prev_langname = job->output_langname; - job->output_lang = gvrender_select(gvc, job->output_langname); - assert(job->output_lang != NO_SUPPORT); /* should have been verified already */ gvrender_initialize(gvc); } @@ -1552,7 +1552,7 @@ void emit_jobs (GVC_t * gvc, graph_t * g) emit_job(gvc, g); - if (!job->next || job->next->output_langname != prev_langname) + if (!job->next || strcmp(job->next->output_langname,prev_langname) != 0) gvrender_finalize(gvc); } } -- 2.40.0