[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
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.
The attached patch should fix the above mentioned problem with true/false variable names. Using this with in combination with current GIT tree allows to compile xfig with GCC 15.
I just noticed, that Mario Haustein already fixed the prototypes in GIT. But when I try to build the GIT version with GCC-15, I still run into the following error: main.c:123:17: error: expected identifier or '(' before 'true' 123 | static Boolean true = True; | ^~~~ main.c:124:17: error: expected identifier or '(' before 'false' 124 | static Boolean false = False; | ^~~~~ main.c:198:66: error: lvalue required as unary '&' operand 198 | XtOffset(appresPtr, allownegcoords), XtRBoolean, (caddr_t) &...
fig2dev: incompatible with GCC 15 C23 standard
I just noted, that https://sourceforge.net/p/mcj/fig2dev/ci/ab4eee3cf0d0c1d861d64b9569a5d1497800cae2/ already fixes this issue.
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
xfig: incompatible with GCC 15 C23 standard
fig2dev: incompatible with GCC 15 C23 standard
stack-overflow on bezier_spline()
thanks again :-) Andrew On 11/02/2025 8:57 pm, tkl wrote: 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. [tickets:#189] https://sourceforge.net/p/mcj/tickets/189/ pdf export does not work Status: open Created: Sat Feb 08, 2025 06:41 AM UTC by Andrew Paplinski...
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
On 10/02/2025 10:38 pm, tkl wrote: To be precise, "$@" enclosed by the quotation marks. Hence, the script should exactly contain |#!/bin/sh gswin64c"$@"| The double quote has made the difference. Now fig2dev aa.fig aa.pdf works nicely producing the correct pdf with the bounding box. In addition :-( , it generates error messages as below that makes no difference; |Error: /undefinedfilename in --findlibfile--| |Operand stack:| | ()| |Execution stack:| | %interp_exit .runexec2 --nostringval-- findlibfile...
stack-buffer-overflow on read_objects()
On 10/02/2025 10:38 pm, tkl wrote: To be precise, "$@" enclosed by the quotation marks. Hence, the script should exactly contain |#!/bin/sh gswin64c"$@"| |The double quote has made the difference. Now fig2dev aa.fig aa.pdf works nicely producing the correct pdf with the bounding box. In addition :-( , it generates error messages as below that makes no difference; | |Error: /undefinedfilename in --findlibfile--| |Operand stack:| | ()| |Execution stack:| | %interp_exit .runexec2 --nostringval-- findlibfile...
To be precise, "$@" enclosed by the quotation marks. Hence, the script should exactly contain #!/bin/sh gswin64c "$@" and have the executable bit set, chmod +x C:\gs\gs10.04.0\bin\gs. Sorry for the adventures; I have looked now at the cygwin package, and it reports a build failure. For the time being, it seems for now there is only the workaround to export from xfig to .eps (or .ps, for a letter- or A4-sized document) and converting manually with ps2pdf to pdf. Improvements to the build-process will...
Thanks, Thomas On 10/02/2025 9:00 pm, tkl wrote: Thank you for investigating further. The gs file contains the one line "gswinc", not "gswin64c"? Does Windows expand "gswinc" to find the correct executable? That I do not know. In the gs file you mentioned, try to put |gswinc "$@"| . $* expands to all arguments, but splits at each whitespace. The latter form preserves whitespace, if there are, in arguments. have just tried gswin64c $@ Does not make any difference. Same error as in the original email....
Thanks, Thomas On 10/02/2025 9:00 pm, tkl wrote: Thank you for investigating further. The gs file contains the one line "gswinc", not "gswin64c"? Does Windows expand "gswinc" to find the correct executable? That I do not know. In the gs file you mentioned, try to put |gswinc "$@"| . $* expands to all arguments, but splits at each whitespace. The latter form preserves whitespace, if there are, in arguments. have just tried gswin64c $@ Does not make any difference. Same error as in the original email....
Thank you for investigating further. The gs file contains the one line "gswinc", not "gswin64c"? Does Windows expand "gswinc" to find the correct executable? In the gs file you mentioned, try to put gswinc "$@" . $* expands to all arguments, but splits at each whitespace. The latter form preserves whitespace, if there are, in arguments. Do you compile fig2dev from sources? If so, you could set the name or the entire path to gs at configuration time, ./configure GSEXE=gswin64c # or perhaps gswinc?...
Dear tkl, I might be on something: I have gs installed in C:\gs\gs10.04.0\bin However, in the bin directory there is no gs command only gswin64 and gswin64c However , xfig needs to find gs . I tried to put a file called gs in C:\gs\gs10.04.0\bin with a one line contents gswinc $* It makes the difference, but not completely: if I call gs -h from the Cygwin64 Terminal, I can se the correct path: Search path: C:\gs\gs10.04.0\bin ; C:\gs\gs10.04.0\lib ; C:\gs\gs10.04.0\fonts ; %rom%Resource/Init/ ; %rom%lib/...
SEGV on genge_itp_spline()
Dear tkl, I might be on something: I have gs installed in C:\gs\gs10.04.0\bin However, in the bin directory there is no gs command only gswin64 and gswin64c However , xfig needs to find gs . I tried to put a file called gs in C:\gs\gs10.04.0\bin with a one line contents gswinc $* It makes the difference, but not completely: if I call gs -h from the Cygwin64 Terminal, I can se the correct path: Search path: C:\gs\gs10.04.0\bin ; C:\gs\gs10.04.0\lib ; C:\gs\gs10.04.0\fonts ; %rom%Resource/Init/ ; %rom%lib/...
It creates an empty *.pdf . where an error message would go? The error message should go to stderr, nothing special when calling fig2dev from the commandline. This is strange.
However, the sequence fig2def ab.fig ab.ps ps2pdf ab.ps produces the perfect pdf file. Andrew