Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!uvaarpa!mcnc!ecsvax!dukeac!bet From: bet@dukeac.UUCP (Bennett Todd) Newsgroups: comp.emacs Subject: Re: Wanted: minimal EMACS in C Message-ID: <1322@dukeac.UUCP> Date: 27 Mar 89 19:49:58 GMT References: <2200001@uxg.cso.uiuc.edu> <1307@dukeac.UUCP> <618@gonzo.UUCP> Reply-To: bet@dukeac.UUCP (Bennett Todd) Organization: Radiology, Duke Med. Center, Durham, NC Lines: 34 In article <618@gonzo.UUCP> daveb@gonzo.UUCP (Dave Brower) writes: >In article <1307@dukeac.UUCP> bet@orion.mc.duke.edu (Bennett Todd) writes: >>Here's what I'd really love to see in an emacs(3): >> >> char *emacs(buff, fp, rows, cols, gotoxy) >> char *buff; /* buffer to be edited, lines separated w/ \n, may be >> realloc()-ed */ >> FILE *fp; /* file pointer for terminal I/O */ >> int rows; /* height of terminal or window */ >> int cols; /* width of terminal or window */ >> void (*gotoxy)(int x, int y); /* scoot to x, y */ > >Since you aren't providing a TERM, and it's already going to have to do >fileno(fp) games to set the tty modes, then you don't need to provide >rows and cols. What is the gotoxy function supposed to do? My god, are >you saying that the screen output primitives are 'position cursor' and >'write chars?' Eek! I guess I should have said more (or less:-). Yup, the only screen output primatives are 'position cursor' and 'write chars'. I don't care about editing binary files, or multiple files, or any of that; emacs(3) shouldn't put up a status line, it needn't support multiple windows or buffers or file I/O; it is just to allow field data entry for multiple-line free-format text fields using a possibly familiar set of full-screen editing commands. In this context I really don't think performance is an issue, just simplicity. To pop up a separate EMACS to edit the text, you need to either turn over the whole screen, or implement a full pty-based subwindow with screen control. To interface to the above routine all you need to do is set aside a rectangular subset of the screen and implement gotoxy() -- vastly simpler. What I am hoping for here is something slightly more pleasant to type at than fgets(), and little more complicated to add to an application. -Bennett bet@orion.mc.duke.edu