[comp.lang.pascal] editor in Pascal?

Spreitzer.pa@Xerox.COM (09/16/87)

(If there's a more appropriate list, let me know, and my apologies...)

I'm looking for a text editor written in Pascal.  I'd like something
reasonably powerful, like vi or EMACS.  I need one that talks to a
character-oriented terminal via character I/O.  It would be nice if it
were in the public domain.  Is there anything like that out there?

Thanks,
Mike

kvancamp@ARDEC.arpa (Kenneth Van Camp -FSAC-) (09/16/87)

 >I'm looking for a text editor written in Pascal.  I'd like something
 >reasonably powerful, like vi or EMACS.  I need one that talks to a
 >character-oriented terminal via character I/O.  It would be nice if it
 >were in the public domain.  Is there anything like that out there?

Only one I've seen is Borland's Turbo Editor Toolbox, which contains
three editors, simple, medium, and reasonably powerful.  I like it alot,
and use it all the time.  I don't know what you mean by "character I/O",
so I can't comment on that.

		  --Ken Van Camp <kvancamp@ARDEC.ARPA>

agnew@trwrc.UUCP (09/16/87)

In article <9311@brl-adm.ARPA> Spreitzer.pa@Xerox.COM writes:
>(If there's a more appropriate list, let me know, and my apologies...)
>
>I'm looking for a text editor written in Pascal.  I'd like something
>reasonably powerful, like vi or EMACS.  I need one that talks to a
>character-oriented terminal via character I/O.  It would be nice if it
>were in the public domain.  Is there anything like that out there?
>
The Kernighan & Plaugher Software Tools in Pascal contains the
source for a early version of ED. This has been ported to Turbo Pascal
and is available from the Borland library on Compuserve. You can convert this to
a VI type screen editor without too much trouble (I estimate about 100 hours or so).

ayac071@ut-ngp.UUCP (09/17/87)

In article <9311@brl-adm.ARPA> Spreitzer.pa@Xerox.COM writes:
>I'm looking for a text editor written in Pascal.  I'd like something
>reasonably powerful, like vi or EMACS.  I need one that talks to a
>character-oriented terminal via character I/O.  It would be nice if it
>were in the public domain.  Is there anything like that out there?

While not up to the likes of EMACS or vi yet, I do have some code I wrote for
the IBM PC that you're welcome to look at.  Not public domain, but I have no
problems with you incorporating it if you find it useful.

Be warned - it's highly specific to the PC-DOS software & hardware environment.
Language is Turbo Pascal.  If interested, drop me a note.

Bill Douglass
ayac071@ngp.UUCP

ESC1319%DDAESA10.BITNET@wiscvm.wisc.EDU (09/17/87)

I think that what was meant by "character I/O" was essentially that the
editor could talk ANSI, VT100 or similar escape sequences to a terminal
over an RS-232 line, rather than doing BIOS calls or video memory manipul-
ation like the Turbo Editor toolbox probably does. I haven't seen the
Turbo Editor Toolbox code, but I would imagine that it would not be an
impossible task to isolate those sections that actually perform screen I/O
and convert them to use whatever escape sequences are needed.

The only other Pascal editor I have come across is the one in the
Software Tools in Pascal book by Kernighan and Plauger. It isn't a screen
based editor, and bears more than a passing resemblance to "ed" I am
told. I have heard of a project that used this editor as a basis for a
fully fledged screen editor, but I can't put my finger on where I saw it now.

Hope this is of use,

Alun Saunders, c/o European Space Operations Centre, W Germany

oster@dewey.soe.berkeley.edu.UUCP (09/18/87)

In article <9344@brl-adm.ARPA> ESC1319%DDAESA10.BITNET@wiscvm.wisc.EDU (Alun Saunders) writes:
>The only other Pascal editor I have come across is the one in the
>Software Tools in Pascal book by Kernighan and Plauger. It isn't a screen
>based editor, and bears more than a passing resemblance to "ed" I am
>told. I have heard of a project that used this editor as a basis for a
>fully fledged screen editor, but I can't put my finger on where I saw it now.

There was a paper by Fraser in Communications of the ACM sometime
between '78 and '83 on this very subject. Using his scheme, it is very
easy to write a front end set of procedures for ed that turn it into a
visual editor. I maintained such an editor (called "ge") when was a
graduate student at Princeton.  In addition, the source to turn ed
into a viusal editor was given in a tech report published by Frazer's
school, (U. of Arizona, I think.)  I thought his papers were great (He
also had one on adding unix shell style command redirection to such
editors ("<" and ">") as a cheap way of bundling up commands, a fast
and clean macro language.  (I think that was in Software Practise &
Experience.) He also did some neat work on optimizers and
machine-independent linkers. All great, impressive, clean stuff. I
wonder what he is doing now.

--- David Phillip Oster            --My Good News: "I'm a perfectionist."
Arpa: oster@dewey.soe.berkeley.edu --My Bad News: "I don't charge by the hour."
Uucp: {uwvax,decvax,ihnp4}!ucbvax!oster%dewey.soe.berkeley.edu

XBQ@PSUVM.BITNET (Ed Winograd) (09/22/87)

In article <9311@brl-adm.ARPA>, Spreitzer.pa@Xerox.COM says:
>I'm looking for a text editor written in Pascal.  I'd like something
>reasonably powerful, like vi or EMACS.  I need one that talks to a
>character-oriented terminal via character I/O.  It would be nice if it
>were in the public domain.  Is there anything like that out there?
     
In article <9344@brl-adm.ARPA>, ESC1319%DDAESA10.BITNET@wiscvm.wisc.EDU
(Alun Saunders) replies:
>
>I think that what was meant by "character I/O" was essentially that the
>editor could talk ANSI, VT100 or similar escape sequences to a terminal
>over an RS-232 line, rather than doing BIOS calls or video memory manipul-
>ation like the Turbo Editor toolbox probably does. I haven't seen the
>Turbo Editor Toolbox code, but I would imagine that it would not be an
>impossible task to isolate those sections that actually perform screen I/O
>and convert them to use whatever escape sequences are needed.
     
I've done extensive modifications to FIRST-ED.PAS, the "simple editor"
in the Turbo Pascal Editor Toolbox.  The code is ** VERY ** dependent on
the IBM PC's memory-mapped video, so I think it would be ** EXTREMELY **
difficult to modify it to do character I/O on any other basis.  This is
just my opinion, however.
     

ponce@ttrde.UUCP (09/23/87)

In article <20818@ucbvax.BERKELEY.EDU>, oster@dewey.soe.berkeley.edu (David Phillip Oster) writes:
> In article <9344@brl-adm.ARPA> ESC1319%DDAESA10.BITNET@wiscvm.wisc.EDU (Alun Saunders) writes:
> >The only other Pascal editor I have come across is the one in the
> >Software Tools in Pascal book by Kernighan and Plauger. ...
> >..... I have heard of a project that used this editor as a basis for a
> >fully fledged screen editor...
> 
> There was a paper by Fraser in Communications of the ACM sometime
> between '78 and '83 on this very subject. ...
> ...  In addition, the source to turn ed
> into a viusal editor was given in a tech report published by Frazer's
> school, (U. of Arizona, I think.)  I thought his papers were great (He
> also had one on adding unix shell style command redirection to such
> editors ("<" and ">") as a cheap way of bundling up commands, a fast
> and clean macro language.  ...

Editors and the Software Tools books have always been weaknesses of mine. 
I have been wanting to implement a very simple, easily transportable,
full screen editor for some time.  (Vi and the emacs derivatives are
too much.) Could some kind soul please Email me the specific references 
and/or source code mentioned above and/or any other references that
pertain to a similar subject.

Thanks in advance,

Lorenzo De Leon ..!ihnp4!ttrde!ponce

Isaac_K_Rabinovitch@cup.portal.com (10/01/87)

Let me simplify this discussion (I hope).  Some of us who use Turbo
Pascal would prefer to use our own editors (BRIEF in my case).  This
is presently feasible, but would be a whole lot better if I could
invoke the compiler with a single DOS command, instead of the current
manual interaction.  Such a change would not only save me typing, but
would permit me to use BRIEF's move-to-the-error feature.

Please, no "I might have seen a file that might do what I think you want,
but I can't remember what it was called" messages!  Life's too short.