🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.lisp.x
Article #346

Re: XLISP SAVE/RESTORE ???

#346
From: stickler
Date: Wed, 28 Feb 1990 17:29
64 lines
2375 bytes
In article <6958@tekgvs.LABS.TEK.COM>, toma@tekgvs.LABS.TEK.COM (Tom Almy) writes:
> In article <1973.25ea7b8e@cc.helsinki.fi> stickler@cc.helsinki.fi writes:
>>Is there a fix for XLISP 2.x SAVE()/RESTORE() ?
>>My PC version (downloaded from BIX) saves without error, but
>>complains when restoring.
> 
> There are three separate problems that affect version 2.0 and 2.1. 
> (There are dozens of other bugs as well -- I mail out bugfixed sources
> upon receipt of a disk and stamped mailer)
> 
> *******************
> Problem: "restore" corrupts system.
> Diagnosis: argument stack not being reset -- initial garbage collect
>  "marks" random memory!
> 
> Solution: Add to "initialize" in xlirestore:
> 
> 
> 	xlfp = xlsp = xlargstkbase;
> 	*xlsp++ = NIL;
> 
> *******************
> Problem: "restore" corrupts system with 8086 compilers.
> Diagnosis: cvoptr is doing improper arithmetic.
> 
> Solution: CVPTR in xlisp.h needs to be defined as 
> #define CVPTR(x)	((((unsigned long)(x) >> 16) << 4) + ((unsigned) x))
> 	return statement in cvoptr() (xlimage.c) needs to be changed from:
> return (off + (OFFTYPE)((p - seg->sg_nodes) << 1));
> 	to:
> return (off+(((CVPTR(p)-CVPTR(seg->sg_nodes))/sizeof(struct node))<<1));
> 
> 
> Note: for this to work with non-8086 compilers, the default for CVPTR
> should be changed from (x) to ((OFFTYPE)(x)).
> 
> ****************
> 
> BUG: Any attempt to do more than one RESTORE in a session causes the error
> 	"insufficient memory - segment".
> 
> SOLUTION:
> In file xlimage.c, function freeimage(), change
> 
> 		if (((fp = getfile(p)) != 0) && (fp != stdin && fp != stdout))
> 
> to:
> 
> 		if (((fp = getfile(p)) != 0) && 
> 			 (fp != stdin && fp != stdout && fp != stderr))
> 
> 
> 
> =============================
> 
> Tom Almy
> toma@tekgvs.labs.tek.com
> Standard Disclaimers Apply


Thanks, but what if I'm not a C programmer and have no compiler...?


pms.
Technical Details
Message-ID: <1983.25ec0a64@cc.helsinki.fi>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!sunic!tut!hydra!hylka!stickler
References: <1973.25ea7b8e@cc.helsinki.fi> <6958@tekgvs.LABS.TEK.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!sunic!tut!hydra!hylka!stickler
From: stickler@cc.helsinki.fi
Newsgroups: comp.lang.lisp.x
Subject: Re: XLISP SAVE/RESTORE ???
Message-ID: <1983.25ec0a64@cc.helsinki.fi>
Date: 28 Feb 90 17:29:08 GMT
References: <1973.25ea7b8e@cc.helsinki.fi> <6958@tekgvs.LABS.TEK.COM>
Organization: University of Helsinki
Lines: 64