Path: utzoo!utgpu!water!watmath!clyde!mcdchg!motcoh!osu-cis!loquat!karl From: karl@loquat.cis.ohio-state.edu (Karl Kleinpaste) Newsgroups: comp.unix.wizards Subject: Re: where to do line editing? Message-ID: <143@loquat.cis.ohio-state.edu> Date: 13 Jul 88 02:30:06 GMT References: <678@gtx.com> Organization: Ohio State Computer & Info Science Lines: 29 In-reply-to: al@gtx.com's message of 12 Jul 88 15:18:28 GMT al@gtx.com writes: [line editing as in ksh is mighty neat, but might be better done in the kernel, notwithstanding arguments against user interfaces being implemented there. Alternate suggestion is to create a library such as curses, but has the drawback of requiring explicit programming to put it to use.] Comments, flames? Anybody done it, meant to do it, thought about it, rejected it? I did it once. I created a thing called liblinedit.a, which consisted of a few files which made up my own incarnation of a line editor. This was the editor which I attached to csh lo these many years ago. It was written very generally so as to be able to attach it to anything that wanted to do line-at-a-time input. Due to my inability to distribute the thing, it never got much exposure outside local systems where I supported my csh. Paul Placeway (cf. tcsh) has occasionally made noises about turning the tcsh editor into a linkable library, but I don't think he's ever actually done it. It's very doable, not particularly tough, really no big deal once you've taken care of a few details. Just make sure that it has a single entry point that looks, feels, and smells like an ordinary read() call except that it does whizbang things inside. I started from Ken Greer's tenex stuff originally distributed in October 1984. It occurs to me that ksh's editing library may even include a way to build a libedit.a suitable for such usage. --Karl