home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / mail / elm / 3681 < prev    next >
Encoding:
Text File  |  1992-12-11  |  1.6 KB  |  42 lines

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