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
I'd like to profit from this thread to also report ive just made undeletable the tarball for transfig 3.2.9a and ive published its uncensorable uncensorable cross-platform package on the Ur as fig2dev. The package is sold for $15. Some of the eventual profits deriving from it will be devolved to fig2dev authors to sponsor its development. If fig2dev authors do want to take over the package or discuss the listing details theyre free to publish it with an address of their own or contact me on the temporary...
I'd like to profit from this thread to also report ive just made undeletable the tarball for transfig 3.2.9a and ive published its uncensorable uncensorable cross-platform package on the Ur as figdev. The package is sold for $15. Some of the eventual profits deriving from it will be devolved to fig2dev authors to sponsor its development. If fig2dev authors do want to take over the package or discuss the listing details theyre free to publish it with an address of their own or contact me on the temporary...
The same errors appears when building version 3.2.9a. https://github.com/themartiancompany/fig2dev-ur/actions/runs/24006215002/job/70010240819
Hello, I'm getting the following errors while building fig2dev with transfig enabled. https://github.com/themartiancompany/fig2dev-ur/actions/runs/24005713419/job/70008978231
The correct link is https://bugs.gentoo.org/953744
Fix test suite
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.
encoding problem with latex fonts
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.
I now see that this is a duplicate of ticket #194.
You may need to try the recent version from GIT. In Debian I applied the following commits to be able to build with GCC-15: https://sourceforge.net/p/mcj/xfig/ci/0913c4d https://sourceforge.net/p/mcj/xfig/ci/c34a1b3 https://sourceforge.net/p/mcj/xfig/ci/530c92f https://sourceforge.net/p/mcj/xfig/ci/06ee25c https://sourceforge.net/p/mcj/xfig/ci/70f5cd5 https://sourceforge.net/p/mcj/xfig/ci/92a8262 https://sourceforge.net/p/mcj/xfig/ci/d7c3677 https://sourceforge.net/p/mcj/xfig/ci/e0379d7 https://...
xfig-3.2.9a compile error
bound.c: invalid value passed to `strchr`
Thank you Florian. I have no further comments. I think this can be closed. Initially it seemed to me like an easy fix.
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.
The code is non-portable, but for ASCII character sets, the construct is fine because '\200' plus a printable character is in the range of char, whether char is signed or not. The cppcheck warning is bogus.
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
htmldoc 1.9.22 breaks on drawing.html (patch)
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...
I am not completely certain but I do believe the tools output is correct: https://openscanhub.fedoraproject.org/task/86804/log/transfig-3.2.9a%5E20250619.ee3f4d8-6.fc44/scan-results.html#def2
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.
bound.c: invalid value passed to `strchr`
Signed integer overflow in function `compute_ellarc`
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?
Hello, we use xfig for documentation and the change from latin1 to utf-8 causes some problems. Is it possible to add an option fallback to the old latin1 format ?
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.
[Patch] Fix typo in export menu
README refers to nonexistent Fig.ad
Small radius circles not rasterised
thanks,
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
Small radius circles not rasterised
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
heap-buffer-overflow on StrstrCheck()
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
After rebasing I learnt you already had cherry-picked my commits during February after the discussion in https://sourceforge.net/p/mcj/fig2dev/merge-requests/1/. So this merge request if effectively empty. Sorry for the noise.
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
Fix prototypes for modern C
CVE-2025-31164
CVE-2025-31163
CVE-2025-31162
Use feature test macros
Replace usleep() by nanosleep()
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