From: Joel Mosher on
Does anyone know of a FORTRAN callable library to do command line recall
and editting of interactive commands? I'm running FreeBSD on a AMD
computer. I use gcc4.4/gfortran

It seems like a FORTRAN interface to readline or editline must exist.

Thanks
From: David Duffy on
Joel Mosher <kb6rxe(a)pacbell.net> wrote:
> Does anyone know of a FORTRAN callable library to do command line recall
> and editting of interactive commands? I'm running FreeBSD on a AMD
> computer. I use gcc4.4/gfortran

> It seems like a FORTRAN interface to readline or editline must exist.

It's easier to use rlwrap.

--
| David Duffy (MBBS PhD) ,-_|\
| email: davidD(a)qimr.edu.au ph: INT+61+7+3362-0217 fax: -0101 / *
| Epidemiology Unit, Queensland Institute of Medical Research \_,-._/
| 300 Herston Rd, Brisbane, Queensland 4029, Australia GPG 4D0B994A v
From: John on
On Feb 24, 6:27 pm, David Duffy <dav...(a)orpheus.qimr.edu.au> wrote:
> Joel Mosher <kb6...(a)pacbell.net> wrote:
> > Does anyone know of a FORTRAN callable library to do command line recall
> > and editting of interactive commands? I'm running FreeBSD on a AMD
> > computer. I use gcc4.4/gfortran
> > It seems like a FORTRAN interface to readline or editline must exist.
>
> It's easier to use rlwrap.
>
> --
> | David Duffy (MBBS PhD)                                         ,-_|\
> | email: dav...(a)qimr.edu.au  ph: INT+61+7+3362-0217 fax: -0101  /     *
> | Epidemiology Unit, Queensland Institute of Medical Research   \_,-._/
> | 300 Herston Rd, Brisbane, Queensland 4029, Australia  GPG 4D0B994A v

As an alternative to rlwrap, A simple FORTRAN library is at
http://home.comcast.net/~urbanjost/CLONE/JUCMD/jucmd.html
It predates readline and editline by a long time; it is very
reminiscent of
the REDO command
that was a part of later versions of the CDC(Control Data Corporation)
NOS
operating system; with enhancements. Very simple, time tested,
portable and
completely Fortran-based. It uses no escape sequences or external
libraries.
I myself prefer it over readline(3c), but that might be due to years
of
familiarity with the original R|REDO command.

Note that if you call REDO(3C) from other languages it is easier to
just use
the editing routines and keep the history file
feature in the calling language. Mixing I/O is often problematic.

I keep meaning to try readline(3c) using the new Fortran/C interface
definition myself.
I keep thinking it should be relatively simple, but I haven't tried
it
(but as I mentioned, I'm content with REDO(3f)).