in-memory editing with EDT or EVE

Liste des GroupesRevenir à co vms 
Sujet : in-memory editing with EDT or EVE
De : arne (at) *nospam* vajhoej.dk (Arne Vajhøj)
Groupes : comp.os.vms
Date : 23. Nov 2024, 01:59:07
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vhr9ct$1dilp$1@dont-email.me>
User-Agent : Mozilla Thunderbird
Over on the VSI forum there has been a couple of threads
about how to make GIT use a specific editor (VIM/JED/EDT/EVE)
for editing commit messages.
GIT does not come from the VMS world, so it does things
in a more *nix/portable way with external editor,
input file and output file.
But it made me remember that 30 years ago I had code
for having callable EDT and callable TPU edit data
in memory not in disk file.
The code was written in Macro-32 and it was expecting
lines in a Fortran CHARACTER array. Not so 2020'ish.
And besides there was a bug in the TPU version so it
frequently crashed.
But this is what a source control system really should
be using for such functionality. No need for temporary
disk files.
So on to making it work again. And this time in C.
Which for good or worse probably is the language that
will be used for code wanting to use callable EDT
or TPU to edit in memory only data.
And not that easy. The full callable interface to
TPU may be flexible, but it is also rather obscure.
Result: two wrapper functions memedt and memtpu
with a very simple API.
 From my test programs:
     char buf[10000];
     memedt("A\nBB\nCCC", buf, sizeof(buf));
     puts(buf);
and:
     char buf[10000];
     memtpu("A\nBB\nCCC", buf, sizeof(buf));
     puts(buf);
Basically both input and output are C strings with
embedded \n's.
If anyone want a copy then it is here:
https://www.vajhoej.dk/arne/vmsstuff/memedit/
It seems to work, but with just 1 test case for each, then
there are likely cases that does not work.
Arne

Date Sujet#  Auteur
23 Nov 24 * in-memory editing with EDT or EVE21Arne Vajhøj
23 Nov 24 `* Re: in-memory editing with EDT or EVE20Lawrence D'Oliveiro
23 Nov 24  `* Re: in-memory editing with EDT or EVE19Craig A. Berry
23 Nov 24   +* Re: in-memory editing with EDT or EVE17Dan Cross
23 Nov 24   i`* Re: in-memory editing with EDT or EVE16Craig A. Berry
23 Nov 24   i +* Re: in-memory editing with EDT or EVE14Arne Vajhøj
23 Nov 24   i i+* Re: in-memory editing with EDT or EVE10Craig A. Berry
24 Nov 24   i ii`* Re: in-memory editing with EDT or EVE9Arne Vajhøj
24 Nov 24   i ii +* Re: in-memory editing with EDT or EVE7Craig A. Berry
24 Nov 24   i ii i`* Re: in-memory editing with EDT or EVE6Arne Vajhøj
24 Nov 24   i ii i +* Re: in-memory editing with EDT or EVE4Arne Vajhøj
25 Nov 24   i ii i i`* Re: in-memory editing with EDT or EVE3Arne Vajhøj
25 Nov 24   i ii i i `* Re: in-memory editing with EDT or EVE2Lawrence D'Oliveiro
25 Nov 24   i ii i i  `- Re: in-memory editing with EDT or EVE1Arne Vajhøj
24 Nov 24   i ii i `- Re: in-memory editing with EDT or EVE1Lawrence D'Oliveiro
24 Nov 24   i ii `- Re: in-memory editing with EDT or EVE1Dan Cross
23 Nov 24   i i+- Re: in-memory editing with EDT or EVE1Dan Cross
23 Nov 24   i i`* Re: in-memory editing with EDT or EVE2Lawrence D'Oliveiro
23 Nov 24   i i `- Re: in-memory editing with EDT or EVE1Craig A. Berry
23 Nov 24   i `- Re: in-memory editing with EDT or EVE1Dan Cross
23 Nov 24   `- Re: in-memory editing with EDT or EVE1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal