Re: VI* on VMS

Liste des GroupesRevenir à co vms 
Sujet : Re: VI* on VMS
De : arne (at) *nospam* vajhoej.dk (Arne Vajhøj)
Groupes : comp.os.vms
Date : 18. Oct 2024, 18:47:18
Autres entêtes
Organisation : SunSITE.dk - Supporting Open source
Message-ID : <67129f26$0$708$14726298@news.sunsite.dk>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
User-Agent : Mozilla Thunderbird
On 10/18/2024 9:26 AM, Arne Vajhøj wrote:
On 10/18/2024 8:48 AM, Arne Vajhøj wrote:
On 10/18/2024 8:09 AM, Simon Clubley wrote:
On 2024-10-17, Arne Vajhøj <arne@vajhoej.dk> wrote:
On 10/17/2024 8:53 AM, Arne Vajhøj wrote:
On 10/17/2024 8:37 AM, Simon Clubley wrote:
For one simple but very important example, you have brace matching in
emacs so you can easily check the closing brace matches the correct
opening brace.
>
EVE does not have that out of the box.
>
But then EVE has relative little out of the box.
>
You can add it.
>
Either DIY or grab a copy of Kenneth Faitfield's
EVE_MATCH_DELIMITORS.
>
I am afraid there are no online archive of INFO-TPU, but
the most valuable pieces will have survived somewhere
(I got the above).
>
Here it is.
>
[snip]
>
How is this run ? Do you have to manually press a key to do the matching
or does the routine get called automatically as you type (as in emacs) ?
>
As is it is just a command. You can bind that command to a key of
your choice.
>
Doing it automatically is an interesting question. I don't know how, but
maybe there is a way in TPU - an "on something changed event". I don't
think anyone wanted to do that back then (late 80's early 90's), but
with todays CPU's then why not.
 I took a look at the TPU manual. It does not look like there
is anything smart for this.
 It would of course be possible to do a callout in all
procedures that change current position. But that is a very
intrusive solution.
 Seems like CTRL/whatever is the best practical.
Nothing in the TPU manual, but something in the TPU$ manual.
This is not pretty, but it seems to work.
procedure eve_auto_match()
     if (current_character = "{") or
        (current_character = "(") or
        (current_character = ")") or
        (current_character = "}") then
         eve_match_delimitors();
     endif
endprocedure;
#include <stdio.h>
#include <stdint.h>
#include <descrip.h>
#include <tpudef.h>
#include <starlet.h>
#include <lib$routines.h>
#include <tpu$routines.h>
static const uint32_t MATCH_DELIM_ACTION = 1;
static void setup_timer();
static void do_match()
{
     tpu$trigger_async_action(&MATCH_DELIM_ACTION);
     setup_timer();
}
static void setup_timer()
{
     uint64_t tmo = 1000000; // 0.1 second
     sys$setimr(0, &tmo, do_match, 0, 0);
}
static uint32_t cmd_handler()
{
     char cmdlin[1024];
     uint16_t cmdlin_len;
     $DESCRIPTOR(cmdlin_desc, cmdlin);
     uint32_t fileio_desc[2] = { (uint32_t)&tpu$fileio, 0 };
     lib$get_foreign(&cmdlin_desc, 0, &cmdlin_len);
     cmdlin_desc.dsc$w_length = cmdlin_len;
     return tpu$cliparse(&cmdlin_desc, fileio_desc, NULL);
}
int main(int argc, char *argv[])
{
     lib$establish(tpu$handler);
     uint32_t cmd_handler_desc[2] = { (uint32_t)&cmd_handler, 0 };
     tpu$initialize(cmd_handler_desc, 0);
     tpu$execute_inifile();
     $DESCRIPTOR(matchdelim_desc, "EVE_AUTO_MATCH()");
     tpu$specify_async_action(&MATCH_DELIM_ACTION, &matchdelim_desc);
     setup_timer();
     tpu$control();
     uint32_t flags = TPU$M_DELETE_CONTEXT;
     tpu$cleanup(&flags);
     return 0;
}
Arne

Date Sujet#  Auteur
16 Oct 24 * VI* on VMS67David Meyer
16 Oct 24 `* Re: VI* on VMS66Arne Vajhøj
16 Oct 24  `* Re: VI* on VMS65Dan Cross
16 Oct 24   `* Re: VI* on VMS64Arne Vajhøj
16 Oct 24    `* Re: VI* on VMS63Dan Cross
16 Oct 24     `* Re: VI* on VMS62Arne Vajhøj
16 Oct 24      `* Re: VI* on VMS61Chris Townley
16 Oct 24       +* Re: VI* on VMS2Arne Vajhøj
17 Oct 24       i`- Re: VI* on VMS1Lawrence D'Oliveiro
17 Oct 24       +- Re: VI* on VMS1David Meyer
17 Oct 24       +* Re: VI* on VMS17Dave Froble
17 Oct 24       i`* Re: VI* on VMS16John H. Reinhardt
17 Oct 24       i `* Re: VI* on VMS15Lawrence D'Oliveiro
18 Oct 24       i  `* Re: VI* on VMS14Arne Vajhøj
18 Oct 24       i   `* Re: VI* on VMS13Lawrence D'Oliveiro
18 Oct 24       i    `* Re: VI* on VMS12Arne Vajhøj
18 Oct 24       i     `* Re: VI* on VMS11Lawrence D'Oliveiro
19 Oct 24       i      `* Re: VI* on VMS10Dave Froble
21 Oct 24       i       `* Re: VI* on VMS9Simon Clubley
21 Oct 24       i        +* Re: VI* on VMS2Rich Alderson
22 Oct 24       i        i`- Re: VI* on VMS1Simon Clubley
22 Oct 24       i        `* Re: VI* on VMS6Dennis Boone
22 Oct 24       i         `* Re: VI* on VMS5Hunter Goatley
22 Oct 24       i          `* Re: VI* on VMS4Simon Clubley
23 Oct 24       i           `* Re: VI* on VMS3Simon Clubley
23 Oct 24       i            `* Re: VI* on VMS2Simon Clubley
24 Oct 24       i             `- Re: VI* on VMS1Hunter Goatley
17 Oct 24       +* Re: VI* on VMS39Simon Clubley
17 Oct 24       i+- Re: VI* on VMS1Chris Townley
17 Oct 24       i+* Re: VI* on VMS33Arne Vajhøj
17 Oct 24       ii+* Re: VI* on VMS31Arne Vajhøj
18 Oct 24       iii`* Re: VI* on VMS30Simon Clubley
18 Oct 24       iii `* Re: VI* on VMS29Arne Vajhøj
18 Oct 24       iii  `* Re: VI* on VMS28Arne Vajhøj
18 Oct 24       iii   `* Re: VI* on VMS27Arne Vajhøj
19 Oct 24       iii    `* Re: VI* on VMS26Arne Vajhøj
21 Oct 24       iii     `* Re: VI* on VMS25Simon Clubley
21 Oct 24       iii      `* Re: VI* on VMS24Arne Vajhøj
22 Oct 24       iii       `* Re: VI* on VMS23Simon Clubley
22 Oct 24       iii        `* Re: VI* on VMS22Arne Vajhøj
22 Oct 24       iii         +* Re: VI* on VMS16Chris Townley
22 Oct 24       iii         i`* Re: VI* on VMS15Arne Vajhøj
22 Oct 24       iii         i +* Re: VI* on VMS9Chris Townley
22 Oct 24       iii         i i+* Re: VI* on VMS7Arne Vajhøj
22 Oct 24       iii         i ii`* Re: VI* on VMS6Hunter Goatley
22 Oct 24       iii         i ii +* Re: VI* on VMS4Arne Vajhøj
22 Oct 24       iii         i ii i`* Re: VI* on VMS3Lawrence D'Oliveiro
22 Oct 24       iii         i ii i `* Re: VI* on VMS2Arne Vajhøj
23 Oct 24       iii         i ii i  `- Re: VI* on VMS1Simon Clubley
23 Oct 24       iii         i ii `- Re: VI* on VMS1Mark Berryman
22 Oct 24       iii         i i`- Re: VI* on VMS1Robert A. Brooks
22 Oct 24       iii         i `* Re: VI* on VMS5Lawrence D'Oliveiro
22 Oct 24       iii         i  `* Re: VI* on VMS4John H. Reinhardt
23 Oct 24       iii         i   +- Re: VI* on VMS1Arne Vajhøj
23 Oct 24       iii         i   `* Re: VI* on VMS2Lawrence D'Oliveiro
23 Oct 24       iii         i    `- Re: VI* on VMS1Simon Clubley
22 Oct 24       iii         `* Re: VI* on VMS5Lawrence D'Oliveiro
22 Oct 24       iii          `* Re: VI* on VMS4Arne Vajhøj
22 Oct 24       iii           `* Re: VI* on VMS3Lawrence D'Oliveiro
23 Oct 24       iii            `* Re: VI* on VMS2Arne Vajhøj
23 Oct 24       iii             `- Re: VI* on VMS1Lawrence D'Oliveiro
17 Oct 24       ii`- Re: VI* on VMS1Lawrence D'Oliveiro
21 Oct 24       i`* Re: VI* on VMS4bill
21 Oct 24       i +- Re: VI* on VMS1Lawrence D'Oliveiro
21 Oct 24       i +- Re: VI* on VMS1Dan Cross
21 Oct 24       i `- Re: VI* on VMS1Arne Vajhøj
21 Oct 24       `- Re: VI* on VMS1bill

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal