[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Jun 10 09:00:36 1993 
Subject:;;;LIB messages SOLN :-) 
From:Daniel Cunliffe 
Volume-ID:930610.01 

In article <1993Jun9.143355.27487@syma.sussex.ac.uk> ianr@syma.sussex.ac.uk (Ian Rogers) writes:
>(looks carefully at news header) oh is *you* with the fingernails.
>Why didn't you come to Plug'92? Huh! Well ?!!!

I plead ignorance - it works for dinosaurs, doesn't it...?

On with the solution, which is due to John Williams from Sussex, though
Aaron suggested a very similar solution. the following are edited highlights
of Johns solution, extracted from the large amount of email we exchanged
yesterday :-)

How about updating your version of LIB LIB (in $popautolib/lib.p)?
I enclose the Poplog 14.2 code below.

    define syslibwarning(lib_name);
    	lvars lib_name;
    	printf(';;; LOADING LIB %P\n', [^lib_name])
    enddefine;

    global vars procedure libwarning = syslibwarning;

    define global syntax lib;
    	lvars file;
    	dlocal popnewline = true;
    	rdstringto([; ^termin ^newline]) -> file;
    	sysPUSHQ(file);
    	sysCALL("libwarning");
    	sysPUSHQ(file);
    	sysCALL("loadlib");
    	";" :: proglist -> proglist
    enddefine;


Then you can do "erase -> libwarning;" in your program.


	Put the definition of libwarning into $popautolib/libwarning.p
	Put the definition of syslibwarning into $popautolib/syslibwarning.p

	(these two files won't yet exist in your 14.1 system). 

Then
	Just put the code for lib into $popautolib/lib.p

The identifier "lib" is already defined in the "startup" saved image
($popsavelib/startup.psv), which is run when you type "pop11" to the
shell. You could rebuild the startup image, but this would be a pain,
because you'd also have to rebuild all the saved images that use
the startup image (these include clisp, prolog, pml, etc).

Alternatively, you could use "syscancel" to remove the definition for
"lib", so that when you next use it the modified autoloadable definition
in $popautolib/lib.p is used. Put ` syscancel("lib"); ' either at the
top of your program, or in a global initialisation file, like
$popsys/init.p. (see HELP SYSCANCEL and HELP INITIAL).

Or finally, you could invest in a copy of Poplog 14.2!

=============

So a BIG THANK-YOU to all those who gave this problem some thought :-)

Daniel.