Mail Archives: djgpp/1995/10/25/12:09:26
On Sun, 22 Oct 1995, Richard Stallman wrote:
> I've written a patch that ought to record the data that dos_rawgetc
> gets from the system. I cannot test it or even compile it; I have to
> depend on you to do that and to fix any small bugs it may have.
(For those who see this for the first time: the problem was that
extraneous characters would appear in the buffer when a key was pressed
during auto-save in the DOS port of Emacs (like if you press PageDown to
scroll the buffer which shows a modified file).
I used this patch to investigate the problem. I'll post a full report
tomorrow (got to run now), but one thing is certain: this is somehow
connected to the way the terminal bell is rung on a DOS machine. The
problem never happens if you use visible bell; even under non-visible
bell, it never happens until the bell is rung for the first time. I
really don't understand how these two are connected, but DJGPP reprograms
the keyboard interrupt to catch the keystrokes, so it might be something
special to DJGPP. The way the bell is rung in DOS version of Emacs is by
writing the bell character ('\07') to the standard output with a call to
write(); this boils down to calling DOS function 40h to write a single
character to stdout. I managed to solve the problem without
understanding it by using different DOS functions (2 or 6) to write the
same character to stdout.
If anybody can shed any light on this strange phenomenon, I'd appreciate
it, because I cannot be 100% sure I solved the bug without understanding
it. Otherwise, I'd say let's wait for DJGPP v2.0 and see if the problem
reappears then, because DJGPP v1.x is a dead product, and there is no
sense in debugging its library (which was extensively rewritten for
v2.0).
- Raw text -