Suppressing ;;;LIB messages 
Author Message
 Suppressing ;;;LIB messages

Hullo People,
        I can't find a way of suppressing ;;; LIB messages.

I have assigned a non-printing procedure to both prwarning and loadwarning
to suppress my variable declarations (no I can't declare them beforehand)
and the ;;; LOADING messages, but still can't loose the ;;; LIB ones.

I know there has to be a variable somewhere - what is it called?

Thanks in advance...

Daniel.



Sun, 26 Nov 1995 17:44:27 GMT  
 Suppressing ;;;LIB messages

Quote:
>I can't find a way of suppressing ;;; LIB messages.
>I know there has to be a variable somewhere - what is it called?

Poplog 14.2 introduced a variable "libwarning" for this purpose.
It is documented in REF LIBRARY (but not, unfortunately, in HELP LIB).

John Williams.



Sun, 26 Nov 1995 18:44:13 GMT  
 Suppressing ;;;LIB messages

Quote:
>   I can't find a way of suppressing ;;; LIB messages.

> I have assigned a non-printing procedure to both prwarning and loadwarning
> to suppress my variable declarations (no I can't declare them beforehand)
> and the ;;; LOADING messages, but still can't loose the ;;; LIB ones.

> I know there has to be a variable somewhere - what is it called?

There's two answers here: one to the question you asked, and one to the
question you *should* have asked ;-)

1.  well in my system it's -libwarning- so:

    erase -> libwarning;

could do the trick.

2. Why are you using lib? In most cases you can substitute uses. Ie.:

    uses libwarning

instead of

    lib libwarning

The advantage to -uses- is that it checks (in a fairly mindless way
admittedly) to see if the library has already been loaded, and if it has
it doesn't try to load it again. In any case it works silently.

lib forces a reload every time (which may be useful - but rarely is).

--
Ian Rogers - Research Fellow type person :)
School of Cognitive Science, Sussex University, Falmer, Brighton, UK



Sun, 26 Nov 1995 18:52:36 GMT  
 Suppressing ;;;LIB messages

Quote:
>There's two answers here: one to the question you asked, and one to the
>question you *should* have asked ;-)

>1.  well in my system it's -libwarning- so:

>    erase -> libwarning;

>could do the trick.

Nope :-(

Quote:
>2. Why are you using lib? In most cases you can substitute uses. Ie.:

>    uses libwarning

>instead of

>    lib libwarning

>The advantage to -uses- is that it checks (in a fairly mindless way
>admittedly) to see if the library has already been loaded, and if it has
>it doesn't try to load it again. In any case it works silently.

>lib forces a reload every time (which may be useful - but rarely is).

Nope - see previous posting. Aaron suggests I look into the library file
itself, more news as it happens (I blame Tom - he wrote it :-)

Daniel.

Quote:
>Ian Rogers - Research Fellow type person :)

-who used to have a microphone haircut as an undergrad :-)


Sun, 26 Nov 1995 21:26:20 GMT  
 Suppressing ;;;LIB messages

Quote:

> >Ian Rogers - Research Fellow type person :)
> -who used to have a microphone haircut as an undergrad :-)

do de do de, do de do de we're entering the twilight zone - I'd just
been to the Barber's before I saw this message. Well I blame
evolution for external artifacts...

(looks carefully at news header) oh is *you* with the fingernails.
Why didn't you come to Plug'92? Huh! Well ?!!!

Ian rogers - Research Fellow type person: hair's the same as ever;
just a bit shorter this afternoon *:-)



Sun, 26 Nov 1995 22:33:55 GMT  
 Suppressing ;;;LIB messages

Quote:

>(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.



Mon, 27 Nov 1995 17:00:36 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Suppressing ;;;LIB messages

2. re-defining lib to suppress messages.

3. Suppress error message when my process finds no rows

4. suppressing error messages from sql

5. Suppressing gforth startup message

6. forwarded message suppressing write errors on sockets

7. Suppress annoying messages (from AS/400 EXECSQL)?

8. ifc: suppress module messages ?

9. can't suppress or catch runtime warning messages issued by IMSL library

10. ;;; LIB messages

11. Linking sqldedev.lib, desktopenginedeploy.lib to my app: unsupported recordtype 21

12. S87 - Libraries (NL187.LIB & NLEXT87.LIB)

 

 
Powered by phpBB® Forum Software