post.trm - modify outdated kludge for buggy ghostscript
Since 2003 (commits 647573e3601de1) post.trm has had a
work-around for a bug in ghostscript that limited the number of
successive relative moves or lines. Furthermore it added a "stroke"
command before continuing. Because this causes a spurious line if it
occurs inside a newpath/closepath, the limit was set at 100 (later 250)
segments on the assumption that no closed path longer than that
would be generated.
That assumption is no longer true. Now we do not apply this kludge
if a path is active. Probably the entire mechanism is no longer
needed, but this change is more conservative than removing it altogether.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -2196,7 +2198,10 @@ PS_vector(unsigned int x, unsigned int y)
fputs(abso, gppsfile);
ps_path_count = 1; /* If we set it to zero, it may never get flushed */
}
/* Ghostscript has a "pile-up of rounding errors" bug: a sequence of many
#define MAX_REL_PATHLEN 250
/* -2003-
* Ghostscript has a "pile-up of rounding errors" bug: a sequence of many
* rmove's or rlineto's does not yield the same line as move's or lineto's.
* Therefore, we periodically force an update of the absolute position.
* There was a case when 400 rlineto's were too much, so let's set the limit
Expand All
@@ -2205,10 +2210,14 @@ PS_vector(unsigned int x, unsigned int y)
* lineto with no intervening 'stroke' is ridiculously slow to render.
* So we stroke the partial line, update the position in absolute terms,
* then continue. This whole section can go away if ghostscript/gv is fixed.
* -2023-
* This is now causing more problems than justified by accommodating
* old versions of ghostscript/gv. In particular if the "stroke" is added
* inside a path it produces an unwanted line back to the path start.
*/
#define MAX_REL_PATHLEN 250
if (ps_path_count >= MAX_REL_PATHLEN) {
fprintf(gppsfile, "stroke %d %d M\n", x, y);
if (!PS_inpath)
fprintf(gppsfile, "stroke %d %d M\n", x, y);
ps_path_count = 1;
}
Expand Down
Expand Up
@@ -4324,11 +4333,13 @@ PS_path(int p)
case 0: /* Start new path */
PS_FLUSH_PATH;
PS_newpath = TRUE;
PS_inpath = TRUE;
break;
case 1: /* Close path */
fprintf(gppsfile, "Z ");
PS_FLUSH_PATH;
PS_inpath = FALSE;
break;
}
Expand Down
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Can not find the configure script #2
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Can not find the configure script #2
Filter by extension
Viewed files
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing