Subj : Re: SklaffKOM To : Joacim Melin From : tenser Date : Mon May 18 2020 11:20:25 On 17 May 2020 at 02:32p, Joacim Melin pondered and said... 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! No problem. I poked at it some more and got it to compile without warnings or errors on OpenBSD, FreeBSD and Linux, all with whatever compiler runs as `cc` and with GCC up to 9. As before, I haven't tested 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. The OChangelog starts in 1993 and ends in 1996. I presume that was the last time anyone did any significant maintenance work on it: almost 25 years and honestly, it kinda shows. I don't mean that in an unkind way, but just being honest. It looks an awful lot like the folks who wrote it were coming from Pascal and relatively new to C. Interestingly, it looks like it was ported to some fairly obscure systems: DG-UX and Mt Xinu's BSD distribution, for 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. I got it to build on modern Linux, but I really don't know how well it will work. If it fails, I strongly suspect bugs in the program itself: it plays fast and loose with things like strings and pointers. Things that were preventing it from building natively were lack of modern string-handling functions in Linux's libc (Drepper's views on strlcpy and strlcat are just wrong), and using really old antiquated interfaces. Everything is using POSIX interfaces now, so it should be fairly portable, and I brought in OpenBSD's strlcpy/strlcat for Linux (the license is permissive so that should be ok). The weirdest thing was using `nlist` to prime the parser; I replaced that with a table. Some of the logic was clearly wrong: I guessed a little bit but tried to fix it to do what I thought it was supposed to do. This is mostly not initializing things like pointers and then maybe using them before something else had written to them. JM> If you can manage to fix whatever issues there are I will be a very very JM> grateful man. Re-grab that tarball and it should at least get you started. I've done as much as I'm likely to do, but it should at least be hackable now. --- Mystic BBS v1.12 A46 2020/04/20 (Windows/32) * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101) .