[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon, 15 Mar 2004 10:41:24 +0000 (UTC) 
Subject:Re: Eliminating termcap (Was: Re: 15.53 - Windows Installer Available) 
From:Aaron Sloman 
Volume-ID: 


> Date: Wed, 03 Mar 2004 12:02:54 +0000
> Organization: HCRC or CCS, University of Edinburgh

Steve Isard pointed out that in $popsrc/termcap.p
the following occurs

    /*  NCR's termcap/curses library screws up X when used in
        anything other than the C locale (it includes its own
        definitions of the mbstring functions).
        Who needs it anyway?
    */
    #_TERMIN_IF DEF NCR

and in $usepop/pop/ved/src/vdtermcap.p
the following occurs

    #_IF DEF NCR
        /*  Termcap not available -- see comment in "termcap.p"
        */
    define vedtermcapscreen(_);
    enddefine;
    #_TERMIN_IF true
    #_ENDIF

So, in view of the recent discussion of termcap problems I tried
replacing '#_IF DEF NCR' with
    #_IF DEF NCR or DEF LINUX

Then in $usepop/pop/ved/src/vdinitseq.p
put a 'guard' round these two lines (probably unnecessarily):

    elseif testdef vedtermcapscreen then
        weakref vedtermcapscreen(name);

i.e.
    #_IF not(DEF LINUX)
    elseif testdef vedtermcapscreen then
        weakref vedtermcapscreen(name);
    #_ENDIF

(could have included 'or DEF NCR' I suppose.)

I then used pgcomp followed by pglibr to compile and archive
the changed files.

I looked in the syscomp subdirectory of $popsrc but could not find
anything responsible for inserting -ltermcap in the automatically
generated link command ($popsys/poplink_cmnd).

I then went to a temporary directory and ran pglink

To my surprise it not only created a successful newpop11 executable,
but also in the poplink_cmnd file there was no '-ltermcap'

It seems that the syscomp stuff that creates poplink.psv (used by
pglink) is cleverly able to decide whether termcap is needed
on the basis of the archived libraries in $usepop/pop/obj

The 'dummy exload' command in $popsrc/termcap.p is what provides
the information. It's very elegant. (Due to Robert Duncan at Sussex
I think.)

Steve wrote:

> It might work just to extend the IFDEF above to apply if either NCR or
> some new
> variable like DONT_WANT_TERMCAP is defined, and then define
> DONT_WANT_TERMCAP in $usepop/pop/src/syscomp/sysdefs.p (which is a copy
> of $usepop/pop/src/syscomp/sysdefs_linux_elf.p) and then go through the
> recompilation/relinking drill.

So on the basis of my experiments that is not necessary. All that is
necessary is to suppress termcap on linux as well as NCR.

I shall try to find time soon to rebuild all the relevant tar
files with these changes installed, and will then ask Jeff to
insert the changed source files on the sourceforge site.

That will save Mandrake users, SuSe users and others a lot of
hassle, and I can then simplify the installation documentation.

Bye-bye termcap (at least on linux -- I don't know whether solaris
poplog still needs it, but for now I won't change that since
termcap seems to be provided automatically on solaris.)

Aaron
====
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk   (ReadATas@please !)
PAPERS: http://www.cs.bham.ac.uk/research/cogaff/ (And free book on Philosophy of AI)
FREE TOOLS: http://www.cs.bham.ac.uk/research/poplog/freepoplog.html