These build errors do not occur in the development version. The next release will build, with transfig enabled, on your system.
Should be fixed with commit [4221b5].
Enable compiling transfig with option -std=c23
ps: Correctly encode text marked as TeX text, #203
Provide an updated fig file header for tests
Silence a compiler warning: -Wdiscarded-qualifiers
pict2e, tikz outputs: respect the -O option
Interpret octal escapes as latin 1 encoded
Revert merging elliptic arcs into mainline
This is a bug, and unfortunately there is not an easy workaround. In the eps/ps file fig2dev produces, a composite font "AvantGarde-Book-UTF-8" is defined, but later "Helvetica-UTF-8" is searched. The workaround would be to create a eps file with fig2dev, change the "AvantGarde-Book" (two-times) to "Helvetica" in the eps file and then convert to pdf. Fig2dev must be patched. The other workaround, of course, is to change latex-fonts to ps-fonts in the fig file.
xfig-3.2.9a compile error
xfig-3.2.9a compile error
Thus, I close this ticket, since it is a duplicate of ticket [#194]. My plan is to publish a new release until may 2026.
bound.c: invalid value passed to `strchr`
Thank you for tuning in. The line above is part of kludge, where the symbol font (in an 8bit encoding) is checked for glyphs with descenders by trying hard-wired positions, strchr(t->cstring,'y') /* psi */ || strchr(t->cstring,'z') /* zeta */ || strchr(t->cstring,'C'+'\200') /* weierstrass */ || strchr(t->cstring,'J'+'\200') /* reflexsuperset */ || Quite a sad story. I conclude that, as long as the entire code is not replaced by, e.g., quering the xft library, the code can stay as is.
htmldoc 1.9.22 breaks on drawing.html (patch)
Thank you for the patch, applied with commit [b66867].
htmldoc 1.9.22 breaks on drawing.html, ticket #201
Quite a deluge of warnings! Regarding strchr(), now I am confused. I have here a draft of the C23 standard, and the wording suggests "The strchr function locates the first occurrence of c (converted to a char)..." but in the foreword to this section, "For all functions in this subclause, each character shall be interpreted as if it had the type unsigned char.", see stackoverflow. Perhaps, the best hint is to treat the "int c" as a result from "fgetc", which is a character read as unsigned int. On...
Signed integer overflow in function `compute_ellarc`
Fixed with commit [6919a3].
The second argument to strchr() is an int, which will be cast to a char. With 67 + 128, the value will be larger than can be held by a signed char (most probably stored correctly, but not defined by the standard). With 67 + '/200' the resulting value depends on the signedness of the char, which, as I read it, is the behaviour as intended by the author.
Replace sqrt(x*x + y*y) by hypot(x, y), ticket #199
Good point, also, hypot() is not used anywhere in the code. I changed the sqrt(..) in a number of places to hypot, but need to check a bit before committing.
Adding the conversion was quite involved. I currently do not see a possibility to optionally disable that code, although such possibility might exist. Both xfig and the fig2dev backend program have options to tune the behaviour with respect to encoding: Xfig has the -nointernational option, fig2dev has an -E (enc) option to force an input encoding. Can the problems be mitigated with these options?
Add feature test macros
Avoid compilation warnings
README refers to nonexistent Fig.ad
Rererences were corrected and the .ad extension removed, see commit [edd2cd].
Remove .ad extension from app-defaults files, #197
[Patch] Fix typo in export menu
Thank you, applied with commit [396dff].
Fix typo for GERBER export menu
I think a superior solution is to remove the .ad extension from all files and from the references to those files. I did not find an .ad extension elsewhere.
Small radius circles not rasterised
Small radius circles not rasterised
The behaviour as reported was introduced with commit [c4465e] and affects the development version of fig2dev. In my tests with fig2dev 3.2.9a, all three circles described above rendered correctly. Commit [d8e1ce] now partially reverts the commit mentioned above. This issue reveals a faulty design decision made previously with commit [c4465e]. Luckily, it was discovered quickly. Originally, one of the output backends of fig2dev would have problems with too small circles. Initially it was thought that...
Correct line counting in fig files
Allow circles with small radius, ticket #196
Crash while editing text element
The issue can be avoided with commit [35899d] by applying Athena Translations only to the text widget, not to the scrollbar, Text.translations instead of Text*translations. The issue is also fixed upstreams in libxaw3d.
Avoid some compilation warnings
SEGV on read_arcobject()
The issue was suppressed with commit [1e5515], and really resolved with [c4465e].
stack-overflow on bezier_spline()
Commit [dfa8b6] fixes this issue.
SEGV on genge_itp_spline()
Fixed with commit [2bd6c0].
stack-buffer-overflow on read_objects()
Fixed with commit [5f2200].
heap-buffer-overflow on StrstrCheck()
Fixed with commit [818cc1].
Detect nan in spline control values, ticket #192
ge output: correct spline computation, ticket #190
Permit \0 in the second line in the fig file, #191
Recognize a text object with an empty string, #195
Wrap more fprintf() and fputc() into error-reporting functions
Replace putc() and fputc() by putc_out()
Replace many print_out(fmt) by puts_out(fmt)
Replace fputs(.., tfp) by puts_out(..)
Add error handling to fprintf(tfp,..): print_out(..)
Simplify err_msg()
Rename from and to to fromname and toname
Yes, I pulled the changes for xfig from the repository given in https://sourceforge.net/p/mcj/fig2dev/merge-requests/1/. I set the status of this merge request to "merged", since it's content is now contained in xfig.
Fix prototypes for modern C
Please, first pull the actual state of master on xfig and rebase the branch prototypes on it On the xfig repository, if tried to merge into a temporary branch based on master. This gave plenty of "Auto-merging ..." messages, indicating that the commits do not introduce new changes, and some merge conflicts. git switch master git branch prototypes git pull git://git.code.sf.net/u/hamarituc/xfig prototypes
Use feature test macros
Replace usleep() by nanosleep()
Wrap random() and srandom() into xf_(s)random()
Wrap random() and srandom() into xf_(s)random()
Include a missing header, for M_PI
Remove isascii(), anyhow it was called unnecessarily
Avoid intptr_t, it is optional in C
Reverse thumb movement direction in the color editor
Remove intptr_t from w_color.c
Use S_ISDIR() and S_IWUSR instead of S_IFDIR and S_IWRITE
Refactor make_pulldown_menu_separator()
Split make_pulldown_menu() into two functions
Avoid caddr_t - it might become obsolete
Avoid gcc -Wcast-function-type warnings
Let locate_menu() return a valid error-code
Above patch is applied with commit [d9f210]. However, if I compile with gcc -std=c23, compilation still fails with errors, e.g., error: unknown type name 'caddr_t'. Hence, I will keep this ticket open and see, whether all issues regarding c23 can be resolved.
Change variable names true/false, which conflict in GCC-15 (C23 standard) with predefined keywords.
Remove checks for strndup() as it is not needed
Fix miscellaneous prototypes
Fix X callback prototypes
Fix prototypes for manipulation callbacks
Fix prototypes for moving callbacks
Remove obsolete declarations
Fix old style definitions
Fix prototypes for keyboard callbacks
Fix prototypes for mouse button callbacks
Report errors when writing .xfigrc file
Report errors when writing file for spell check
Declare local functions as static in w_style.c
Report failure to write style file
Detect failure when saving fig-file
Remove version 4.0 code
Keeping this ticket open, to remember - to add gswin64c to the executables searched for during ./configure - add an environment variable, e.g, FIG2DEV_GS, to give the user the possibility to override the path to ghostscript, - probably contact cygwin to patch their current xfig distribution.
Good to hear. Strange errore message, "Unrecoverable error", so gs might write the output file, here aa.pdf, then look for some lib (findlibfile), and fails. Thus findlibfile seems to be unnecessary. Yours, Thomas