- it must be able to edit its own binary, which means it has
no line length limits and can handle all characters, including nulls
- it must do completion and ? on file names and internal function names
- it must have full builtin help
Unfortunately, mg uses non-blocking I/O, which is not implemented in
the Linux kernel. I could certainly fix mg so it worked a different
way (probably using VTIME). However I thought it would be more useful
in the long run to implement nonblocking I/O. Thus I am supplying
some kernel patches to go along with it. If you don't want to put
them in, you'll have to find another way to make the function
typeahead, in ttyio.c, work. This is a very simple implementation of
non-blocking I/O. It works for mg, but I make no guarantees as to
whether it's a full implementation of the official semantics.
SIGTSTP didn't seem to be working yet, so I've made ^Z work the way I
did on Microport: To suspend it, you hit ^Z twice. The first time
gets mg out of raw mode. The second time does a normal suspend. To
continue it, type an extra CR after the "fg" command. The suspend
code leaves it waiting for a character. The extra CR causes it to
proceed and refresh the screen. This is sort of kludgey, but it's the
best I can do at the moment. If SIGTSTP etc. are working, take a look
in spawn.c. The code you really want to use is under #ifdef notdef.
I have tested the Linux port only minimally, but I've checked the
things that are most likely to cause trouble. The tar file includes
source, an already built binary, and fairly complete documentation. I
have TeX source to the documentation, but am not including it in order
to keep down the size of the tar file. I have included both .doc and
.dvi versions. Similarly, I have not included the files necessary to
support Berkeley Unix, MS/DOS, etc.
There are two tar files on athos.rutgers.edu in pub:
nonblock.tar.Z - Implementation of non-blocking TTY I/O.
Four files were changed. I've included new copies of
them, and also DIFFS, in case you want to put in the
changes yourself.
mg.tar.Z - mg source, binary, and documentation
I'd appreciate it if the masters of the archives would put these files
in the appropriate place and tell me when they have done so. I'm not
going to be able to leave them on athos forever.