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
#2
RE: Compiling recent versions of NEdit
There are a couple of forks of nedit that we could try.

A lot of my time has been focused on trying to engage in restoration and auto repair so I haven't had as much time to sit down at my sgis but I am finally set back up to the point that I can probably update and confirm this stuff myself.

I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast. 

https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently. 

https://codeberg.org/SolusRaion -- Code repos I control

Technical problems should be sent my way.
Raion
Chief IRIX Officer

Trade Count: (9)
Posts: 4,256
Threads: 535
Joined: Nov 2017
Location: Eastern Virginia
Website Find Reply
04-02-2023, 06:38 PM
#3
RE: Compiling recent versions of NEdit
(04-02-2023, 05:47 PM)markh Wrote:  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.

Do more research. Wish I could tell you where off the top of my head but SGI did a ton of work to nedit, you want to use theirs instead of the sourceforge one. As I remember there was something as simple as "SGI MODE ON" either in xdefaults or nedit itself ... or wait for vishnu to come by, he's a nedit fanboy (me too actually, just won't run where I am now) ... if there's one in nekoware it should have the compiling description on one of the files.

Have they made any improvements to nedit over the past couple years ? There were already-built irix versions floating around, looked totally native.

Anyway, it's a research project, not a development puzzle. It's actually easy to build and make look good, even I did it.
hamei
broke-down old clunker

Trade Count: (0)
Posts: 380
Threads: 3
Joined: Jul 2019
Location: 上海
Find Reply
04-03-2023, 04:33 AM
#4
RE: Compiling recent versions of NEdit
I know of the XNedit fork (https://github.com/unixwork/xnedit). I looked at the specific bit of code that is causing the issue and it is there as well. That was very likely as the commits that I mentioned were from 2003 (long before the fork).

hamei: What you are referring to is to set sgiMode to true. This is in the app-defaults file that I mentioned. As far as I can tell all the changes Sgi made to make it look good are in this file. The problem is that someone added code to NEdit to try to interpret the values set in it for some GUI elements and it doesn't understand the SGI_DYNAMIC stuff and then falls back to the color black. Disabling the calls to SetColors in window.c "fixes" it.

Regarding what was added in newer versions, you can check https://sourceforge.net/p/nedit/git/ci/m...leaseNotes
The biggest feature seems to be window tabs which was added in 5.5.

Thanks for the tip for a Nekoware version of NEdit. I found that there was a 5.5 version packaged. I have downloaded it (from https://web.archive.org/web/201707150053.../nekoware/) and will have a look at how that one was compiled.
markh
Developer

Trade Count: (0)
Posts: 25
Threads: 4
Joined: Jan 2021
Location: The Netherlands
Find Reply
04-03-2023, 09:24 PM
#5
RE: Compiling recent versions of NEdit
On my Loonix box, I'm running the latest version of nedit from their git (and it definitely has issues!) but I'd never try running such a recent version on any of my SGI's, Even a 20 year old version of nedit will run just fine and be perfectly useful on an SGI. The only particularly useful feature that's been added since then, is the ability to select rectangular portions of text, and yes, that is a useful feature and I do use it a lot, but not having it isn't the end of the world. Does Emacs even have that? Who knows, I hate Emacs... 😁

Project: Temporarily lost at sea
Plan: World domination! Or something...
vishnu
Tezro, Octane2, 2 x Onyx4

Trade Count: (0)
Posts: 1,255
Threads: 42
Joined: Dec 2017
Location: Minneapolis, Minnesota USA
Find Reply
04-04-2023, 12:38 AM
#6
RE: Compiling recent versions of NEdit
I suppose this is caused by the fact that I replaced the stock nedit in IRIXCE patches which I understand is a bit of a controversial move but that is simply because we don't have the source of the original code, and whatever cannot be replaced or reverse engineered must be removed in the future if not absolutely critical.

I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast. 

https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently. 

https://codeberg.org/SolusRaion -- Code repos I control

Technical problems should be sent my way.
(This post was last modified: 04-04-2023, 01:44 AM by Raion.)
Raion
Chief IRIX Officer

Trade Count: (9)
Posts: 4,256
Threads: 535
Joined: Nov 2017
Location: Eastern Virginia
Website Find Reply
04-04-2023, 01:44 AM
#7
RE: Compiling recent versions of NEdit
(04-03-2023, 09:24 PM)markh Wrote:  The problem is that someone added code to NEdit to try to interpret the values set in it for some GUI elements and it doesn't understand the SGI_DYNAMIC stuff and then falls back to the color black.

Stupid assholes. I am so sick of so-called "developers" doing nothing but break stuff, so they can add worthless crap. This is THE biggest problem for me with open sores. Great concept, some really good work in the beginning, followed up by a bunch of buffoons screwing everything up.

btw, would someone bomb google for me ? Those ignorant pieces of shit are ruining the web. We need pitchforks and torches and a march on what used to be SGI headquarters ...

Quote:Thanks for the tip for a Nekoware version of NEdit. I found that there was a 5.5 version packaged.

I probably made it :-) I remember struggling through that crap because I wanted "newer ! better!" but it mostly wasn't worth it. I think what I wanted was unicode, but don't remember if that ever worked. Irix doesn't deal well with dbcs and it's a pretty tricky subject. At least for a hack (not hacker, just plain old hack) like me.
(This post was last modified: 04-04-2023, 02:55 AM by hamei.)
hamei
broke-down old clunker

Trade Count: (0)
Posts: 380
Threads: 3
Joined: Jul 2019
Location: 上海
Find Reply
04-04-2023, 02:54 AM
#8
RE: Compiling recent versions of NEdit
There are a few nedit forks that claim to be unicode compliant, I've tried them and, to me at least, they all suck. I'm sure unicode has a useful purpose outside the world of ASCII, but if you're a programmer, you don't need it. As far as I know (and I really haven't looked), there's no compiler in the world that will compile anything other than ASCII. I get email from people with unicode and it's all just blips and tildes and numeric gifs. If you're speaking the English language, then just use ASCII! If you're speaking some other dialect, then fine, go ahead and use unicode, I won't be able to understand it anyway.

Project: Temporarily lost at sea
Plan: World domination! Or something...
vishnu
Tezro, Octane2, 2 x Onyx4

Trade Count: (0)
Posts: 1,255
Threads: 42
Joined: Dec 2017
Location: Minneapolis, Minnesota USA
Find Reply
04-04-2023, 09:15 PM
#9
RE: Compiling recent versions of NEdit
(04-04-2023, 09:15 PM)vishnu Wrote:  I'm sure unicode has a useful purpose ...

You live in Minniepoles, not Skankhai :-) They write funny here, like 干你妹 ! :-)

Besides, I ain't no dang programturd, I uses it for everything ... or did, till I got stuck using this here'n smashbook. Apple sucks, did you know that ? Three arfing days to outsmart Apple Corp so I could change things to be the way I want. God I hate them.

An onioncode nedit would be nice. The rest of it I can do without, especially when it arfs up a perfectly good sgi-looking text editor. Seems to me I had that black-hole looking mess at one time too. It's possible to get past it tho. If I did, anyone can.

What would really be nice, at least right now, is nedit in an old os x, say 10.9.5.
hamei
broke-down old clunker

Trade Count: (0)
Posts: 380
Threads: 3
Joined: Jul 2019
Location: 上海
Find Reply
04-05-2023, 08:10 AM
#10
RE: Compiling recent versions of NEdit
There are exactly four corporations I have never, nor will I ever, do business with; in no order of importance: Apple, Amazon, Microsoft, and Wal-Mart. So hey, if any of you work for any of these shithole companies, just quit. You're life is too important; you're worth more than that and you're better than that. Go work for fucking AOL if nothing better comes to mind.

Project: Temporarily lost at sea
Plan: World domination! Or something...
(This post was last modified: 04-05-2023, 08:41 PM by vishnu.)
vishnu
Tezro, Octane2, 2 x Onyx4

Trade Count: (0)
Posts: 1,255
Threads: 42
Joined: Dec 2017
Location: Minneapolis, Minnesota USA
Find Reply
04-05-2023, 08:40 PM


Forum Jump:


Users browsing this thread: 1 Guest(s)