[comp.sys.atari.st] Problems with less / ue39e

zessel@incas.UUCP (Holger Zessel AG Nehmer) (11/30/88)

Hello netlanders !

Recently I used 'v' in less (Atari version 1) to call the editor (uEmacs 3.9e)
and change a file. In ue I made the changes and left. But surprisingly
there were no changes visible in less. Why ?!

A look in the directory gave an explanation. The file existed twice with
the same name. Therefore less reads the first, ue edited the second.

I make GEMDOS responsible for this because of it's faulty file and 
device descriptor handling while pexecing.

Does anybody have concrete explanations/workarounds ?

	Holger Zessel


-- 
----------------------------------------------------------------
Holger Zessel, uucp: ...!uunet!mcvax!unido!uklirb!incas!zessel
Fachbereich Informatik, SFB124-D1
Universitaet Kaiserslautern, FRG

nwd@j.cc.purdue.edu (Daniel Lawrence) (12/05/88)

In article <1226@incas.UUCP> zessel@incas.UUCP (Holger Zessel AG Nehmer) writes:

>Hello netlanders !

>Recently I used 'v' in less (Atari version 1) to call the editor (uEmacs 3.9e)
>and change a file. In ue I made the changes and left. But surprisingly
>there were no changes visible in less. Why ?!

>A look in the directory gave an explanation. The file existed twice with
>the same name. Therefore less reads the first, ue edited the second.

	How did this file get in the directory twice? Was it this way
before you ran less?

>I make GEMDOS responsible for this because of it's faulty file and 
>device descriptor handling while pexecing.


	A note to help track this down, MicroEMACS 3.9e on the ATARI was
distributed in binary after being compiled with the Mark Williams
compiler.  It handles ALL of its disk I/O using the C library standard
buffered routines (fopen() and its like).  This makes for no ST specific
code in any of the disk handling.

>Does anybody have concrete explanations/workarounds ?

>	Holger Zessel

	Rename the first entry to a different name (show info option of
the menus) and then get rid of the invalid file.

					Daniel Lawrence
					(317) 742-5153 nwd@j.cc.purdue.edu
					The Programmer's Room Fido 1:201/10
					(317) 742-5533

leo@philmds.UUCP (Leo de Wit) (12/06/88)

In article <1226@incas.UUCP> zessel@incas.UUCP (Holger Zessel AG Nehmer) writes:
|
|Hello netlanders !
|
|Recently I used 'v' in less (Atari version 1) to call the editor (uEmacs 3.9e)
|and change a file. In ue I made the changes and left. But surprisingly
|there were no changes visible in less. Why ?!
|
|A look in the directory gave an explanation. The file existed twice with
|the same name. Therefore less reads the first, ue edited the second.
|
|I make GEMDOS responsible for this because of it's faulty file and 
|device descriptor handling while pexecing.
|
|Does anybody have concrete explanations/workarounds ?
|
|	Holger Zessel

A version of 'more' I made for the ST a while ago suffered from the
same problem as the one you just described: when vi was called (with
the 'v' key) two copies of the original file were left on exit.  More
did an Fopen() in readonly mode, and vi in readwrite (if I remember
well).
I think you're correct to say that GEMDOS does not handle (sic!) this
very well.  As a workaround you'll probably have to Fclose the file
first in your less program, and Fopen again and Fseek to the original
position after the edit.

Hope this helps, -
                        Leo.