home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.mail.elm
- Path: sparky!uunet!mcsun!Germany.EU.net!isaak.isa.de!newton.isa.de!vogt
- From: vogt@isa.de (Gerald Vogt)
- Subject: Re: elm2.4 pl 11 builtin editor problems
- Message-ID: <1992Dec11.182535.22646@isa.de>
- Sender: usenet@isa.de
- Nntp-Posting-Host: bach
- Organization: ISA GmbH, Stuttgart, FRG
- References: <1992Dec9.000147.24768@cc.gatech.edu> <1g5gfjINNhs0@dsinc.dsi.com>
- Date: Fri, 11 Dec 1992 18:25:35 GMT
- Lines: 29
-
- In article <1g5gfjINNhs0@dsinc.dsi.com> syd@DSI.COM writes:
- >juan@cc.gatech.edu (Juan Orlandini) writes:
- >>Also, and most importantly, if we try to back up beyond the beginning of
- >>a line, the cursor goes us one line, that line becomes garbage on the
- >>screen. If we proceed to mail this, the entire message turns out to be
- >>garbage. Is this a known bug or are we doing something wrong?
- >
- >Its a known bug, and I wish someone would fix it :-)
-
- Hello,
-
- the problem that causes this bug is simple. The builtin editor opens a
- temporary file with mode "a". This is (at least on our Suns) a write-only
- mode! As elm keeps only one single line of your message in memory, a
- fread-call is made to re-read the line before the one you erased. This
- causes an error, the result is undefined.
-
- The easiest way to fix it is to substitute the open mode "a" by "a+" in
- every call of fopen() in src/editmsg.c. I tested it on a Sun4 and it
- works. Take a look at your fopen manual page and substitute the
- appropriate mode on your machine.
-
- Probably someone should take a look at all fopen-calls in elm to see
- if there are some similar problems.
-
- Hope this helps,
- --
- Gerald Vogt E-Mail: vogt@isa.de
- UUCP: ...!{uunet!unido, pyramid}!isaak!vogt
-