Compiling recent versions of NEdit
#1
Compiling recent versions of NEdit
Hello,

I have been trying to compile recent versions of NEdit and although I can get it compiling and it also runs, the result is not very pleasing.
I had tried to compile the one checked in by Raion for his IRIXCE work and ran into the problem that the main editing screen was black and it dumped a number of error message to the shell (NEdit: Color name SGI_DYNAMIC TextForeground not in database and a few similar ones).
I have been looking into it this weekend and have now been able to track down where this problem is coming from, but I am not sure yet what the best way to fix it is.
Below is my analysis of the problem (with as much detail so I can find my way around again should I forget the details).

The problems started with the following commit:
https://sourceforge.net/p/nedit/git/ci/2...3b41605ff/
It adds a screen where you can change the colors of various parts of NEdit (text background, foreground, etc), but it gets these from the app-defaults setup by SGI (in /usr/lib/X11/app-defaults/NEdit) and tries to parse them with XParseColor (in highlight.c, AllocColor function). If XParseColor thinks it is not valid, NEdit will fill in the foreground color (which defaults to black). XParseColor does not understand the SGI_DYNAMIC stuff, so it fails and we get a lot of black (look for AllocColor(sw, GetPrefColorName(TEXT_FG_COLOR) in the commit to see where it does this).

This was later changed in the following commit:
https://sourceforge.net/p/nedit/git/ci/b...a3e73ff24/

This made it a bit easier to disable this (look for Pixel color = AllocColor(sw, colorName, &dummy, &dummy, &dummy); in the commit and disable the loop), but I am not sure how to properly fix it. I am not sure they should be trying to interpret the value with XParseColor and trying to use the results from that to set the colors of the widgets. My Xt and Motif skills have never been that good.

It looks like it changed again later, but I am not sure I have time today to find out where they moved it and it still seems to be the same problem going by the error messages I am getting in the shell (using XParseColor to try and interpret the value from app-defaults) so I am dumping my progress here so far. If someone knows a fix to it, please let me know.
markh
Developer

Trade Count: (0)
Posts: 25
Threads: 4
Joined: Jan 2021
Location: The Netherlands
Find Reply
04-02-2023, 05:47 PM


Messages In This Thread
Compiling recent versions of NEdit - by markh - 04-02-2023, 05:47 PM
RE: Compiling recent versions of NEdit - by Raion - 04-02-2023, 06:38 PM
RE: Compiling recent versions of NEdit - by hamei - 04-03-2023, 04:33 AM
RE: Compiling recent versions of NEdit - by markh - 04-03-2023, 09:24 PM
RE: Compiling recent versions of NEdit - by vishnu - 04-04-2023, 12:38 AM
RE: Compiling recent versions of NEdit - by hamei - 04-04-2023, 02:54 AM
RE: Compiling recent versions of NEdit - by vishnu - 04-04-2023, 09:15 PM
RE: Compiling recent versions of NEdit - by hamei - 04-05-2023, 08:10 AM
RE: Compiling recent versions of NEdit - by vishnu - 04-05-2023, 08:40 PM
RE: Compiling recent versions of NEdit - by Raion - 04-04-2023, 01:44 AM
RE: Compiling recent versions of NEdit - by Raion - 04-06-2023, 12:27 AM
RE: Compiling recent versions of NEdit - by hamei - 04-06-2023, 02:55 AM
RE: Compiling recent versions of NEdit - by markh - 04-08-2023, 11:26 PM
RE: Compiling recent versions of NEdit - by markh - 05-21-2023, 03:38 PM
RE: Compiling recent versions of NEdit - by Raion - 05-23-2023, 10:31 PM
RE: Compiling recent versions of NEdit - by markh - 08-06-2023, 02:53 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)