From: <sh...@al...> - 2000-02-18 13:01:03
|
> Eric wants a single unprint command for all the printers, with runtime > determination of what it is (either by inspection of the file or by a > command line switch). That seems fair enough. So it will stay > unprint.c for now. Yeah. Now that unprint is actually working (at least some of the time) I'd like to merge unprint with canon-unprint and pcl-unprint. I want to solicit comments from Andy and Dave before doing this, though. There are a couple of issues. The Canon unprinter is in C++ while the other two are in C. Andy, how would you feel about converting this to C? It doesn't look like there's extensive use of C++ functionality in there. Converting it to C would be a fairly trivial job, I think, but you may have other objections. If you feel strongly about keeping it in C++, then we'll leave it in C++. Having C code call C++ code is possible, if not pretty. The code also looks a little weird to me. Why are there so many output files? pcl-unprint looks a little easier to integrate. What I've done in unprint.c is to isolate all of the escp2 specific parts into a single subroutine. This subroutine is given a file pointer to an open file, and it reads in the escp2 data. When it extracts a section of raster data from the file, it makes a call to a generic routine to store this data in RAM. When the escp2 routine returns, the stored image is organized into a PPM and written out. I would like to convert pcl-unprint and cannon-unprint to work the same way as the parse-escp2 subroutine of unprint. Any comments/objections? Eric |