Changes to hp2xx: ================= 3.4.4 : 03/06/22 Source indentation (indent -kr -i8) and removal of some dead code. Added missing menu entry for 'DXF specifics' in Appendix B of the texinfo source, updated revision number. Updated manpage and reran texi2html to update the html version of the texinfo documentation. Corrected drawing of filled wedges (WG command, broken by polygon buffer rewrite in 3.4.3). Moved version information from hp2xx.c to hp2xx.h to give output drivers access to the version number if desired. 3.4.4a9: Changing the to_png.c 'colour' to an unsigned char in 3.4.3 broke color PNGs. SP commands in PE mode did not yet update the pen count (important for raster palette sizing). Added new commandline option -M for remapping of pen 0 drawing commands to any other (ideally unused) pen - this is just a workaround for the 8bit palette limitation of the raster buffer, which cannot hold 256 colors plus 'empty' background. (Without this option, HPGL files that use pen 0 for actual plotting change the background color of raster images to its color as a side effect. Vector modes are not affected as they do not use a background color). 3.4.4a8: page_number was not incremented correctly, especially it should increase at end-of-file to match the multi-page selection algorithm. 3.4.4a7: adapted the optional ttf character plot functions to Bitstream Vera Mono, added commented-out section for ttf support to makes/generic.mak. Arcs with 'deviation distance' tolerance were seriously broken due to an embarrassing typo (badly placed braces). 3.4.4a6: hp2xx incorrectly assumed that any user-defined label terminator should automatically be printed, mishandled DT without parameters (Rich Pasco), and completely ignored the optional second parameter in the DT command. 3.4.4a5: Using the -ansi flag with gcc (even suggested by the generic Makefile) would make it ignore the prototype of the hypot() function on some if not all platforms, resulting in a practically unusable binary (NaN in calculation of image width or height, picbuf overflows in raster modes, etc.). Removed -ansi from the gcc CFLAGS in generic.mak and added an #ifdef case for the __STRICT_ANSI__ macro that is set by -ansi to the declaration of HYPOT in hpgl.h. Added another workaround for cases (typically labels) where the (stupid) wide line miter code would kick in prematurely, adding spurious lines to the image. 3.4.4a4: Reduced the default miter limit in the eps and pdf modes from the arbitrary "100" value to 5 to remove strange artefacts particularly visible in text rendering. Changed the circle renderer to generate overlapping circle segments (needed to render complete circles at huge linewidths) only when not in polygon mode. Polygon fillcode was propagating its internal linewidth/spacing settings to the general linedrawing code (which could then overflow the raster buffer, without adding actual content to the image). Fixed several inaccuracies and inconsistencies in the polygon fill code (particularly for vertical fills) uncovered by Eugene Doudines new fill.plt test case. Special flag S=4 in esc/p2 output now invokes the new color selection commands for six-color Stylus Photo printers (untested - but a Photo1290 only advances paper with the old driver). Fixed some cases in the line pattern generator where a double was compared against exact zero - which does not work as intended on some platforms such as Solaris. 3.4.4a3: Documentation fixes and updates. Polygon lines were not clipped in some cases. Simplified HPGL output could create illegal HPGL (by using exponential notation for very small coordinates). Added (optional) conversion of pen number and/or width to DXF line color, added more DXF header items (Georg Viehoever). Made HPGL error handler print 20 characters around the unparseable command before quitting - the sequence number information alone was useless for real-world files. 3.4.4a2: Removed a few debug printf statements introduced in a1. Changed PJL header parsing to support linelengths up to the 256 characters required by the PJL standard (Eugene Doudine). Added support for the rectangle mode of the PE statement (Eugene Doudine). Treat NR as a frame terminator (like PG,AF,AH) instead of just ignoring it. 3.4.4a1: 11.2.03 Revived the 'STROKED_FONTS' stubs in chardraw.c by attaching a truetype font renderer to them. Requires freetype2 and a fixed-width truetype font such as the LucidaTypewriterRegular.ttf font included with the Sun Java Runtime Environment (not included here - check licensing conditions). Fixed two bugs in the scanline renderer that could cause it to fill the gaps in a complex object. Saving and restoring the pen width when drawing characters requires the current (parse-time) penwidth to be updated (and not just to place a command to update the penwidth in the temporary file, which will only be read at render time) - this is now done by Pen_Width_to_tmpfile(). Both xfig and rgip modes were lacking a handler for the pencolor (DEF_PC) directive (and would fail on colored input). The rgip mode was still using wrong penwidths. Added lots of typecasts and typing fixes suggested by 'splint -weak'. Removed the '-m486' compiler switch from my personal Makefile (the one in sources), as some people try to use it directly instead of adapting the generic one from the makes directory. Added a 'lint' target for code checking to same Makefile. Fixed bug that prevented -p with numeric argument instead of the new A-Z range from working. 3.4.3: 02/12/29 Documentation updates and source indentation. 3.4.3a26: Silenced the "unknown escape sequence" warnings in quiet mode. Added new output mode for CNC G-code (experimental, constant depth)(Michael Rooke). 3.4.3a25: Small improvements in PCL3GUI support (still not really working, best result had the designjet500 print strips of the desired image separated by equally wide blank areas (it is unclear whether this is due to extraneous paper feed commands or to the fact that its native resolution is 600x1200 while the test case was 600x600dpi). Suppressed miter code for dotted line ends, where it is unnecessary (this also works around the remaining bug that could cause stray lines particularly in characters). Made character stroke width independent of pen linewidth by default. Implemented kind=6 (stroke width) function of the SD/AD command (-7 to +7 translated to 0.01 ... 0.21 mm penwidth, defaulting to 0.11 which is close to the hp2xx default penwidth of 0.1. SD6,9999 copies current PW value). Handle arc commands with an eps value given as zero (Steve Edmonds) 3.4.3a24: Wide line miter code still swapped near and far end of preceding line at will. Hopefully fixed for good now. PCL3GUI does not work yet - best result had the designjet500 move its printhead across the page several times without printing or even advancing the page. 3.4.3a23: Simplified HPGL output (-mhpgl) did not honor any rescaling done with -h,-w. Added experimental initialization code for HP 'PCL3GUI' devices, and new -I command to select it (spells taken from gimp-print, incantation possibly not quite right). 3.4.3a22: Fixed a bug in the miter fill code that could cause gaps in the filled area. Modified circle drawing code to create an overlapping segment to join the first and last segments when drawing wide lines. Modified polygon_PicBuf to draw fill lines directly instead of calling the bresenham code. Removed all references to (l)rint as they only created portability problems. Line join logic should be correct now. 3.4.3a21: Some code cleanup (Andrew Bird). Modified criteria for drawing miter sections to fix some cases where non-consecutive lines were erroneosly joined. Improved sorting of miter region corners. Still have some pathological cases to study. 3.4.3a20: Reduced the default raster mode miter limit. Added preliminary code for triangular and square line ends. 3.4.3a19: Revised the 'butt miter' code for wide lines - the implementation in a17 was working more by accident than by design. Caught special cases of PS with zero pagewidth and of blank IW; with default values of P1,P2 . 3.4.3a18: Small changes to improve numerical stability - the LPattern_Generator could enter an endless loop on Sun/Solaris due to comparisons of small floating-point numbers with exact zero (special thanks for Michael Geary for access to his Sun). 3.4.3a17: Fixed incompletely applied patch for endcap selection in a16. Added experimental code for filling the miter section on wide lines to correct the rendering of arcs and circles drawn with wide pens (replaces the arcs hack of a16). Fixes size_PicBuf (buffer could be one pixel line too small depending on penwidths and line endings - this will probably need more work when (if) we do mitering). 3.4.3a16: Reverted line end changes from a15 (thin lines should already be handled in other parts of the code, only this was broken in the raster modes). Modified IW handling again to accomodate another case. Adapted initialization of line parameters in eps and pdf modes for multiple input files(Andrew Bird). Added bad hack in arc drawing code as a temporary workaround for the missing miter support in the raster modes (switching to round ends even for wide lines to avoid leaving holes between the segments of the arc). Another ugly hack now allows specifying penwidths beyond 0.9mm on the commandline by using capital letters (A being 1.0mm, and Z 3.5mm). Keep EP from drawing the final edge if it was created by implicit closure while in pen up state (fixes files generated by transfig, which were broken by the addition of implicit closure support). Probably need to keep track of penstate for individual edges - EP edges only pendown moves, while FP fills regardless of penstate. Made frame selection in multi-image files (-P option) work again. 3.4.3a15: Fixed bug in a14 that set all pencolors to black unless explicitly defined using -c. Rewrote IW parameter shuffling to fix all known cases including those that a14 broke. Line ends were erroneously defaulted to butt-shaped instead of rounded for thin lines. Reduced pensize used for polygon fills, and removed check for duplicate intersections. Removed leftover file named sources/outfile that had somehow crept into the a14 source tree. Fixed output format for linewidths in svg export. Applied HPGL-to-MM scaling factor to SVG viewbox, not just to the coordinates (Robert Hancock). 3.4.3a14: Reset default colors only if they were not overridden by the -c option. Reset penwidths and IW clipping flag between plots. Fixed several memory leaks in output filename generation and png output. Fixed PJL header misinterpretation introduced with the treatment of unknown esc sequences. Added missing $(EX_DEFS) in HPUX section of generic.mak. Added special treatment of AF/AH as for PG (AF at end caused crash). Fixed IW handling for P28 pens, added PS (plot size) command to accurately reproduce page position, added EW (edge wedge) command support. Removed improper scaling of tick marks in ax_ticks(). Corrected rect(), which was advancing the pen position after an EA. ===================================================================== V 3.3 ALPHA, 99/09/01: Incorporated PNG support (patches by Michael Schmitz as packaged by Lars Koeller for FreeBSD) and partial support for the PE command (by Eugene Doudine). Added more character sets, so that 0-7 are now supported (although some glyphs may be ugly or even wrong, they were drawn after the small illustrations in an old plotter manual). Added PenColor and PenWidth commands from HPGL/2 (not yet supported in the old Sun and OS/2 output modules - help needed for these platforms). PCL initialization sequence changed to use maximum available area in "-t" mode and generate paper selection commands for formats larger than A3 (untested). ===================================================================== V 3.30.0, 99/01/31: (unreleased) First version packaged by new maintainer (this is what you get when you ask where to send patches for an orphaned project). Output functions for xfig (by Ian McPhedran) and gnuplot (by Emmanuel Bigler). Support for the HP-GL commands IW (clipping) and CS (character set selection), implementation of character sets 5 (Special Symbols) and 7 (HP Roman8 Extensions), and support for 8bit addressing of charset 7 from charset 0. PCL initialization sequence now includes appropriate paper size selection when in "-t" mode (European A4 and A3 formats only), as some (most?) printers do not select the larger size automatically. ====================================================================== NOTES: o Intermediate versions have not been made publicly available. o Letters at end of version number indicate small changes like source restructuring or minor bug fixes. V 3.20a, 94/02/15: This release contains major modifications. Besides a lot of cleamup it deals with the introduction of high-level functions which represent the different conversion phases of hp2xx. These may be called by *any* user front-end, not just the traditional command line interface. My intention is to facilitate the introduction of various graphical user front-ends. If you want to add one, study function "action_traditional" and read the comments in "hp2xx.h"! -- hp2xx.h: Re-structured! Options & parameters now separated into three groups: General / for input / for output conversion -- hp2xx.c: Now with high-level routines suitable for future GUI front-ends. CLI functions incl. main() moved to "std_main.c" -- std_main.c: New file! Keeps functions for traditional command line interface. PCL mode now also accepts 600 DPI. -- hpgl.c: Bug fixed: Gap in min/max determination caused later crash -- to_pbm.c: Color supported + compact binary format (by Ian McPhedran) -- most files: o Adapted to new parameter structs o Re-organized o Use of "const" o Better error recovery o Direct output to stderr now eliminated (see std_main.c) Plus all changes later than 3.14a V 3.15a, 94/01/02: Suggestions by Lawrence Lowe: -- to_pcl.c.c: Effects of -o -O with and without -i more consistent -- hpgl.c: New option: -C (center mode); affects -o -O -- chardraw.c: Symbol plotting now with more general symbol centering -- hp2xx.c: Warning "DPI setting is no ..." suppressed in DeskJet modes -- hpgl.c: Second parameter of ES now optional (default 0) V 3.14b, 93/11/23: -- to_pcx.c: Color mode working again - though CLUT still has no effects (by R. Frahm, DESY, Hamburg) -- hp2xxinf.tex:More typos fixes V 3.14a, 93/11/15: -- to_eps.c: Code now closer to Adobe EPSF structuring conventions (thanks to Nelson Beebe for his detailed report) -- generic.mak: install-exe --> install-bin -- hp2xxinf.tex:Typos fixes Plus all changes later than 3.13a V 3.13c, 93/10/23 & 93/11/08: -- to_vga.c: Fix in getchar()-handling; bug reported by Uwe Girlich (girlich@aix520.informatik.uni-leipzig.de) -- hp2xxinf.tex:Typo causing makeinfo error removed V 3.13b, 93/09/27: -- hp2xx.c: Fix in autoset_outfile_name() prevents crash in pipe mode Improved VAX/VMS "makefiles" V 3.13a, 93/09/03: -- hp2xx.c: Wait() --> NormalWait(); -m hpgl added; -Pn:m parser modified -- hp2xx.h: A few new #define's (VAX-VMS needs them); rect() prototype -- hp2xx.c: Wait() --> NormalWait(); -m hpgl added; -Pn:m parser modified -- hpgl.c: Support for EA (rect() added) -- to_mf.c: Mode 5 (Simple HP-GL) added -- to_pm.c: Minor changes to match emx 0.8g header -- to_pcl.c: Compression only in Deskjet modes -- to_uis.c: Minor fixes Plus all changes later than 3.12a V 3.12f, 93/07/20: (see ./fixes) -- hp2xx.c: SilentWait() better adapted to UNIX pipes (A. Bagge) -- hp2xx.h: A few prototypes added -- to_os2.c: Updated (H. Szillat); working in combination with to_vga.c -- to_pcl.c: TIFF compression (mode 2) added -- to_vga.c: Minor adaptations -- generic.mak: Fix for OS/2 full-screen version V 3.12e, 93/05/28: (see ./fixes) -- hp2xx.h: "Binary vs. text mode" finally added for OS/2, too -- to_os2.c (by H. Szillat) added to distribution -- generic.mak: Minor improvements around OS/2, emx versions V 3.12d, 93/05/20: (see ./fixes) -- hpgl.c: Bug fix for LB/PR problem (by W. Eric Norum), LT1 pattern adjustment -- to_eps.c: BoundingBox corrected for max pen width -- to_pcl.c: Code for end-of-raster-graphics corrected -- hp2xx.c: Option --version added (GNU standard) V 3.12, 93/04/17: -- New makefile for ATARI -- ATARI only: Support for mode "cs" (Chr. Strunk's TeX specials) -- New ATARI previewer -- charset.h: `0' without slash now, according to HP-GL charset 0 -- chardraw.c: Prepared for multiple fonts; Bug fixed: 8-bit char codes won't crash hp2xx plot_user_char() added (code by A. Treindl) -- hpgl.c: Arcs/circles now properly closed (occasional tiny gaps removed) Bug fixed: SC followed by draw (without move) misplaced a point Serious bug fixed in the line type (LT) pattern generator Exception fixed in LT pattern generator hypot() problem fixed (DOS) UC supported -- picbuf.c: Always use 4 bits per pel in color mode (and 1 in b/w mode) New encoding scheme for color codes: nybbles instead of bit planes --> more mem, but faster access in color mode Obsolete type "DotBlock" finally replaced by "Byte" -- to_pcl.c: CMYK color support (for HP Deskjet 550C) added -- to_mf.c: Bug fix in "cad" mode (\emline statement lines now end with '%') -- to_eps.c: VM report lines are suppressed in 'quiet' mode BoundingBox: improved rounding (using floor and ceil) -- Much better generic makefile for many UNIX systems; improved special makefiles -- Files re-organized (./extras removed): "amigalib.zoo" now distributed as separate file "hp2xx.amigalib.zoo" HGC support now distributed in separate file "hp2xx.hgc.showit.zoo" Other sources moved from ./extras to ./sources V 3.11, 93/01/17: -- New makefile for Amiga -- Root directory renamed to hp2xx311 to make life easier for DOS-based people -- File ownerships now rw-rw-rw -- code_to_ucoord() in chardraw.c: Reported bug (on RS6000 ONLY!) fixed V 3.10, 93/01/09 First release of sources as hp2xx.3.1.0.tar.Z under GNU conditions!! CMY color for Deskjet (PLC), option -S now with parameter; minor corrections V 3.03a, 92/12/14 Long options & "true size" mode (-t) added V 3.02c, 92/12/10 Range of pages (-P a:b) permitted now New mode: "cad" for TeXcad code! V 3.02a, 92/10/20 HPGL command LT (line type) now fully supported; bug in eps mode removed. V 3.01d, 92/06/08 HPGL commands SM, TL, XT, YT supported V 3.00f, 92/05/25 Up to seven colors (some modes)! Multiple-input handling; log files; auto-generation of output file names; output to stdout via "-f-" V 2.20d, 92/04/14 Symmetrical use of -h (height) and -w (width) options, new defaults: 200 [mm] for both -h & -w. Picture will always fit into a window given by -h and -w V 2.20c, 92/03/03 Arcs, circles, fonts (Charset 0), pages, and many more commands supported ATARI-ST binary file added (only old version of hp2xx - sorry) DOS/386 binary file added (compiled with DJ Delorie's GNU-C version) WARNING: hp2xx386.exe's previewer tries to activate 800x600 SVGA mode! New modes: -m em (emTeX-specials), -m epic (epic macro \drawline) Modes pic & pac only supported in (outdated) ATARI version HPGL parser much easier portable and more tolerant to HPGL syntax variations Bugs in character scaling fixed; LO now fully supported V 2.18e, 92/02/06 X11,Sunview,ATARI: preview; IMG format supported; HPGL parser improved V 2.17, 92/01/12 Some debugging; more coherent sources, but no functional changes V 2.16a, 91/11/21 ATARI mode reduced again to simple "pic" format, support of "LT;", "LT0;" (for point plotting), support of different pens ("SP;", "SP0;"..."SP8;"), internal changes (faster now), more flexible MF syntax V 2.14b, 91/10/10 ATARI mode: New file name convention, adapted to STAD hp2xx.dvi: Now part of distribution package V 2.14a, 91/09/08 ATARI ST support added. V 2.13a, 91/06/30 PostScript support added. Warning: Due to lack of local resources, PostScript format could not be thoroughly tested. Please consider the PostScript part as in "beta" state and report all problems. V 2.12, 91/06/20 First external release! Rotate option added, debug code removed