gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using pim/log/ulm together and clearing terminal


From: Gaius Mulley
Subject: Re: Using pim/log/ulm together and clearing terminal
Date: Fri, 03 Jan 2020 13:42:09 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Johannes Slotboom <address@hidden> writes:

> Dear Gaius,
>
> I have my old Logitech Modula-2 program compiling again, and I am very
> happy about that!!!
>
> Since my program is a late 80tees beginning 90tees style where the
> user interactively selects from presented text menus in the console
> (newly bash-shell) I am in need for an equivalent for the Logitech
> Modula-2 "Screenmode(3)" functionalityt which cleared the DOS-screen
> and printed the new menu from the top of the screen again. 
>
> I tried to simulate this behaviour by writing character 33:
>
> Write( CHR(33) ); 
>
> ( CHR(33) should be the erase shell character.)
>
> however this unfortunately does not work. Than I saw that in the Ulm
> library there is a module called "CallShell" in which I plan to call
> "clear" which would do the trick (I hope at least).
> VAR status: CARDINAL;
> BOOLEAN response := PROCEDURE Shell( "clear", status );

Hi Hans,

yes the special character codes are not interpreted (yet) in
Display/Terminal.  This could be added though.  At present there is a
substitute - which is to use the ncurses.def found in the examples:

http://git.savannah.gnu.org/cgit/gm2.git/tree/gcc-versionno/gcc/m2/examples/ncurses/ncurses.def

there are a few tiny example programs in the same directory.

> however if I try the latter there seem to be a problem with using the
> pim and ulm libraries. Namely trying to build my application with:
>
> gm2 -g -I. -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/pim -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/log -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/min -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/ulm -
> flibs=pim,log,ulm -fmakeall ./ilv.mod
>
> results in the following terminal output:
>
> gm2 -c -fmakeall0 -
> B/home/slotboom/opt/lib/gcc//x86_64-pc-linux-gnu/8.2.0 -g -fonlylink -
> fobject-path=. -
> fobject-path=/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/pim
> -fobject-path=/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/log
> -fobject-path=/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/min
> -fobject-path=/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/ulm
> -ftarget-ar=/usr/bin/ar -ftarget-ranlib=/usr/bin/ranlib -fplugin=m2rte
> -flibs=pim,log,ulm -fmakeall -I. -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/pim -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/log -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/min -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/ulm -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/pim -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/log -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/ulm -I -I .
> /ilv.mod
> /home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/ulm/libulm.a
> (libulm_la-SYSTEM.o): In function `_M2_SYSTEM_init':
> /home/slotboom/build-8.2.0/x86_64-pc-linux-gnu/libgm2/libulm/SYSTEM.c:622:
> multiple definition of `_M2_SYSTEM_init'
> /home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/pim/libgm2.a
> (SYSTEM.o):/home/slotboom/build-8.2.0/x86_64-pc-linux-gnu/libgm2/libpim/SYSTEM.def:20:
> first defined here
> /home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/ulm/libulm.a
> (libulm_la-SYSTEM.o): In function `_M2_SYSTEM_finish':
> /home/slotboom/build-8.2.0/x86_64-pc-linux-gnu/libgm2/libulm/SYSTEM.c:773:
> multiple definition of `_M2_SYSTEM_finish'
> /home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/pim/libgm2.a
> (SYSTEM.o):/home/slotboom/build-8.2.0/x86_64-pc-linux-gnu/libgm2/libpim/SYSTEM.def:20:
> first defined here
> collect2: error: ld returned 1 exit status
>
> So my additional question (apart from erasing the bash shell) is the
> question whether the ulm, log, pim and iso libraries cannot be used
> together in one application?

it should be possible to use pim, iso and log in a single application.
The ulm is probably best to work with alone (or maybe with pim).  If you
use coroutines then you have to decide on a particular paradigm and not
mix them :-).  In conclusion they are designed to work together but if
the modules utilise aspects of SYSTEM.def/mod which contain different
declarations of the same named entity then problems arise,

hope that helps,

regards,
Gaius



reply via email to

[Prev in Thread] Current Thread [Next in Thread]