Subj : Re: SklaffKOM To : tenser From : Joacim Melin Date : Wed May 20 2020 15:29:53 t> On 17 May 2020 at 02:32p, Joacim Melin pondered and said... t> JM>> t> On 14 May 2020 at 10:40a, tenser pondered and said... JM>> t> JM>> te>> Sure. I got it to compile without errors/warnings JM>> te>> on FreeBSD 12.1 and OpenBSD 6.6. I haven't tested JM>> te>> it, though. JM>> te>> JM>> te>> fetch http://fat-dragon.org/pub/sklaff-1.32.tar.gz JM>> te>> JM>> te>> There's as git repo in there that should show JM>> te>> exactly what I changed. JM>> JM>> t> And compiling this with a more recent gcc (instead JM>> t> of just clang) with maximum warnings turned on JM>> t> reveals even more problems in the source; some quite JM>> t> severe. I'll take a stab at fixing some of those, JM>> t> but I wouldn't trust this software too much. JM>> JM>> Alright - solid work so far! Thanks! t> No problem. I poked at it some more and got it to t> compile without warnings or errors on OpenBSD, FreeBSD t> and Linux, all with whatever compiler runs as `cc` t> and with GCC up to 9. As before, I haven't tested t> it, but it should build and I presume run. JM>> This software was written in the early 90's by a bunch of swedish JM>> hackers over a couple of weekends. I think it ran on some sort of BSD JM>> back in the day (probably NetBSD) on a 90Mhz Pentium computer, first JM>> with five modems and later also with internet and telnet access. I was a JM>> user of that BBS (SöderKOM it was called, still around but with a JM>> different software and vibe compared to the old days) and I've always JM>> wanted to get it up and running on a modern Unix* platform with JM>> newsgroups and stuff. t> The OChangelog starts in 1993 and ends in 1996. I presume t> that was the last time anyone did any significant maintenance t> work on it: almost 25 years and honestly, it kinda shows. I t> don't mean that in an unkind way, but just being honest. It t> looks an awful lot like the folks who wrote it were coming t> from Pascal and relatively new to C. t> Interestingly, it looks like it was ported to some fairly t> obscure systems: DG-UX and Mt Xinu's BSD distribution, for t> example. JM>> There have been efforts of getting it to run on Linux over the years but JM>> they never really panned out properly. Someone managed to get it sort-of JM>> working and ran a BBS with Sklaffkom on Linux but there was always some JM>> issue with it. t> I got it to build on modern Linux, but I really don't know t> how well it will work. If it fails, I strongly suspect bugs t> in the program itself: it plays fast and loose with things t> like strings and pointers. t> Things that were preventing it from building natively were t> lack of modern string-handling functions in Linux's libc t> (Drepper's views on strlcpy and strlcat are just wrong), and t> using really old antiquated interfaces. Everything is using t> POSIX interfaces now, so it should be fairly portable, and t> I brought in OpenBSD's strlcpy/strlcat for Linux (the license t> is permissive so that should be ok). t> The weirdest thing was using `nlist` to prime the parser; I t> replaced that with a table. t> Some of the logic was clearly wrong: I guessed a little bit t> but tried to fix it to do what I thought it was supposed to t> do. This is mostly not initializing things like pointers t> and then maybe using them before something else had written t> to them. JM>> If you can manage to fix whatever issues there are I will be a very very JM>> grateful man. t> Re-grab that tarball and it should at least get you started. t> I've done as much as I'm likely to do, but it should at least t> be hackable now. Thanks again. I had to check again what OS they where using back in the day and it was actually Interactive Unix back then. And you are absolutely right about the Pascal part - most if not all of them came from a background in Pascal with several of them having written older BBS systems in Pascal for CP/m and later MS-DOS. Best, Joacim --- NiKom v2.5.0 * Origin: Delta City (deltacity.se, Vallentuna, Sweden) (21:2/130.0) .