From: Alan W. I. <Ala...@gm...> - 2019-09-15 19:43:20
|
On 2019-09-15 14:12-0400 Jim Dishaw wrote: > While fixing the plm render bug, I’m working on how text is handled in general. I’ve made some minor changes to the postscript driver in preparation for the bigger changes. > > I’m in a bit of a hobbled development environment right now and running the test suite and pushing the change is not really practical (I’m doing the work entirely on Windows and using Visual Studio Express). So, if someone is willing to test and push, it would be greatly appreciated. Hi Jim: I would be happy to help you this way. Using "git am" to apply your commit worked, but there were the following minor formatting issues: * "git am" detected some trailing blanks on some of your changed lines. * The resulting commit message did not separate paragraphs properly (with an end of line). So the git log result looks like this: Cleanup of the postscript driver -- Changed unnecessary calls of fprintf() to fputs. -- The fputs() call is more efficient with fixed strings -- Changed the TRMFLT() from a macro to an inline static function -- Preprocessor macros can have unintended side effects -- Eliminated the the shared ouput buffer (outbuf) variable -- Dynamically allocating the output buffer variable on the stack on function entry has negligible performance impact -- The shared output buffer would cause problems when threads are implemented Instead of what you likely intended which was Cleanup of the postscript driver -- Changed unnecessary calls of fprintf() to fputs. -- The fputs() call is more efficient with fixed strings -- Changed the TRMFLT() from a macro to an inline static function -- Preprocessor macros can have unintended side effects -- Eliminated the the shared ouput buffer (outbuf) variable -- Dynamically allocating the output buffer variable on the stack on function entry has negligible performance impact -- The shared output buffer would cause problems when threads are implemented where "git log" has inserted the leading spaces so you should not do that in your commit message. Note that both of these formatting issues are easy for me to deal with here, but for your next iteration (which is necessary, see below) you may want to address these issues yourself. I tested your code changes by comparing the results of test_c_psc between the ps device driver for the master branch and your patched version of same, and there are two issues in the PostScript results for each of the examples, but I will just show you those issues for the 00 example: diff -Naur ../test_examples_output_dir_psc/x00c.psc examples/test_examples_output_dir/x00c.psc --- ../test_examples_output_dir_psc/x00c.psc 2019-09-15 12:01:58.435910736 -0700 +++ examples/test_examples_output_dir/x00c.psc 2019-09-15 12:09:36.511559691 -0700 @@ -3,7 +3,7 @@ %%%%%%%%%%%%%%%%%%%%%% %%Title: PLplot Graph %%Creator: PLplot Version 5.15.0 -%%CreationDate: Sun Sep 15 12:01:58 2019 +%%CreationDate: Sun Sep 15 12:09:36 2019 %%Pages: (atend) %%EndComments @@ -342,7 +342,7 @@ 397 3228 D 356 3256 D 315 3284 D S eop -%%Trailer +%%%%Trailer %%Pages: 1 @end -%%EOF +%%%%EOF Of course, the %%CreationDate changes are expected, but your change currently creates incorrect %%Trailer and %%EOF directives by prepending "%%" to them for every example. So please fix those code update issues so that the PostScript results are identical to what is produced by the present code from the master branch except for the %%CreationDate date/time stamp. And optionally fix the above formatting issues. And we can take it from there. Alan __________________________ Alan W. Irwin Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |