rm -f temp/xps* gswin32c -sDEVICE=xpswrite -o x.xps examples/tiger.eps ls temp/xps* Leaves 5 temp files, output after the above is: 1 /c/temp/xps5195.tmp 1 /c/temp/xps5196.tmp 1 /c/temp/xps51A6.tmp 1 /c/temp/xps51A7.tmp 129 /c/temp/xps53EA.tmp Also it still produces two warning lines, even though the output looks correct: | .\devices\vector\gdevxps.c:884: xps_put_params(): undefined | .\devices\vector\gdevxps.c:884: xps_put_params(): undefined
Yes, xpswrite unlinks the temporary file after closing, which works on POSIX systems. I can manually track the files and delete them, but that does not fix clean up after crashes. Paul was going to create a temp file wrapper as other languages have implemented (python, ruby etc.), but I now think the job should go to a gs developer (Ray, Chris or Ken) since Paul is swamped with other work. Let's talk about it at the Tuesday meeting.
On Windows, unlink won't work on an open file. The file must be closed FIRST
orrection to comment #1 the first clause should read: "xpswrite unlinks the temporary file after opening".(In reply to Henry Stiles from comment #1) > Yes, xpswrite unlinks the temporary file after closing, which works on POSIX > systems. I can manually track the files and delete them, but that does not > fix clean up after crashes. Paul was going to create a temp file wrapper as > other languages have implemented (python, ruby etc.), but I now think the > job should go to a gs developer (Ray, Chris or Ken) since Paul is swamped > with other work. Let's talk about it at the Tuesday meeting.
(In reply to Ray Johnston from comment #2) > On Windows, unlink won't work on an open file. The file must be closed FIRST I can change the code but it works on POSIX, I assume if you do delete on close for files on windows the unlink call we have now will just fail on windows and all the platforms should work. I guess a case could be made that we don't want failing unlink calls in the code, I'm okay with it.
Fixed by commit f553eec3 This commit also fixes the issue with the extra messages from xps_put_params.