RE: [Freedos-kernel] ^Z

2004-03-12 Thread Arkady V.Belousov
Hi!

12-Мар-2004 17:44 [EMAIL PROTECTED] (Roberto Mariottini)
wrote to <[EMAIL PROTECTED]>:

>> pressing ^Z in non-empty line does nothing (except that line end is ignored),
>> only first ^Z on line is processed as end of input.
>>  Strange, but under MS-DOS I get same behavior. Another bug in MS-DOS?
RM> I think this is the correct behaviour, IIRC in theory in text files an

 I discuss devices, not files.

RM> End-Of-File must always be preceeded by an End-Of-Line.

 ? Don't know such theory.

RM> So I think that a
RM> Ctrl-Z inside a line (so not immediately after a CR/LF) is interpreted as
RM> normal charcter input, with no special End-Of-File meaning.

 It _not_ interpreted as "normal character input", it removes (not
passes to reading program) all other characters on the line after ^Z.

RM> The confusion is still big, as many sources contradict each other on what a
RM> "text file" is, and implementations too.
RM> For example, Pascal function Eoln is always true if Eof is true, even if
RM> ther isn't actually a CR/LF before Ctrl-Z (IIRC).




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] ^Z

2004-03-12 Thread Arkady V.Belousov
Hi!

12-Мар-2004 14:13 [EMAIL PROTECTED] (Alain) wrote to
[EMAIL PROTECTED]:

A> Some very ols OS used ^Z do know the end of the stream and thus close
A> the file. This behaciour can still be found in MS-DOS with the command:
A>   copy con: >file
A> where ^Z terminates the input.

 Should be "copy con file".

A> MS-DOS kernel completely ignores ^Z in any file.

 This is right - MS-DOS presents another ways to deal with file limits.




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] ^Z

2004-03-12 Thread Alain


Roberto Mariottini escreveu:
Hi Arkady,
pressing ^Z
in non-empty line does nothing (except that line end is ignored),
only first
^Z on line is processed as end of input.
Strange, but under MS-DOS I get same behavior. Another bug in MS-DOS?
I think this is the correct behaviour, IIRC in theory in text files an
End-Of-File must always be preceeded by an End-Of-Line. So I think that a
Ctrl-Z inside a line (so not immediately after a CR/LF) is interpreted as
normal charcter input, with no special End-Of-File meaning.
The confusion is still big, as many sources contradict each other on what a
"text file" is, and implementations too.
For example, Pascal function Eoln is always true if Eof is true, even if
ther isn't actually a CR/LF before Ctrl-Z (IIRC).
Some very ols OS used ^Z do know the end of the stream and thus close 
the file. This behaciour can still be found in MS-DOS with the command:
 copy con: >file
where ^Z terminates the input.

MS-DOS kernel completely ignores ^Z in any file. I know because of many 
problems in the past.

A CR/LF is not requited before thee ^Z, in any system, just that 
_usualy_ text files are have CR/LF after the last line. BUT for example 
some databese programs require a ^Z after the last record of a .DBF 
file, but other don't require it and some others don't even put it 
there. One of them (iirc dBaseII) has even a bug that a ^Z in any field 
sometimes causes the file to get truncated.

I hope this helps,
Alain


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


RE: [Freedos-kernel] ^Z

2004-03-12 Thread Roberto Mariottini
Hi Arkady,

> pressing ^Z
> in non-empty line does nothing (except that line end is ignored),
> only first
> ^Z on line is processed as end of input.
>
>  Strange, but under MS-DOS I get same behavior. Another bug in MS-DOS?

I think this is the correct behaviour, IIRC in theory in text files an
End-Of-File must always be preceeded by an End-Of-Line. So I think that a
Ctrl-Z inside a line (so not immediately after a CR/LF) is interpreted as
normal charcter input, with no special End-Of-File meaning.

The confusion is still big, as many sources contradict each other on what a
"text file" is, and implementations too.
For example, Pascal function Eoln is always true if Eof is true, even if
ther isn't actually a CR/LF before Ctrl-Z (IIRC).

Ciao



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel