So in a fit of insanity, I have a VM running NetBSD 1.6.2 (the
earliest I can get to run for me under Virtual Box) that I'm trying to
build the old Franz Lisp (from the 4.2BSD days) on. There was a port
done by Jeff Dalton back in 1994 to i386 NetBSD .9 so there is a
working executable but to get the libraries up to date requires a
build. That is exposing a bunch of early '80's code that isn't working
too well. Stuff like:
lispval
Ndumplisp()
{
register struct exec *workp;
register lispval argptr, temp;
register char *fname;
extern int reborn;
struct exec work, old;
extern int dmpmode,usehole;
extern char etext[], *curhbeg;
int descrip, des2, ax,mode;
extern int holesize;
char tbuf[BUFSIZ];
long count, lseek();
pageseql();
pagsiz = Igtpgsz();
pagrnd = pagsiz - 1;
#ifdef __NetBSD__
{
/* Round the break up to a multiple of a page size */
int excess;
excess = (long)sbrk(0) & pagrnd;
if (excess > 0)
sbrk(pagsiz - excess);
}
#endif
/* dump mode is kept in decimal (which looks like octal in dmpmode)
and is changeable via (sstatus dumpmode n) where n is 413 or 410
base 10
*/
if(dmpmode == 413) mode = 0413;
else if(dmpmode == 407) mode = 0407;
else mode = 0410;
workp = &work;
workp->a_magic = mode;
(and so on for much longer)
Those structures aren't right & the workp-> pointers all give major
complaints in GCC (dereferencing pointer to incomplete type) and it
bombs out. My C is even rustier than I thought so it's driving me nuts
trying to remember what's wrong.
What I'm hoping is that someone can point me at is a good online
reference or tool to old K&R C that I can hopefully restore my
memories of what is going wrong in this and the other issues I'm sure
will pop up.
Thanks!
William
--
Live like you will never die, love like you've never been hurt, dance
like no-one is watching.
Alex White