Re: EOF location?



Richard wrote:
Clever Monkey wrote:

It might, but it is not. I was making the point that I was on a Win32
machine with POSIX utilities that allow us to inspect files.

There are many utilities that 'allow us to inspect files'. Using ones
that will use Win32 semantics may show Win32 features rather than POSIX
features. But in fact neither will show us what you claimed for EOF.

I'm no longer sure what I've supposed to have claimed. [Though see my comments below, and my reply elsewhere, as I think this horse is well and truly dead.]

There are
several ways to do this. Just trying to be clear, here. (By the way,
even if I was running cygwin, I would consider this simply a programming
environment and set of libraries running on "some sort of" Win32/DOS.)

Exactly, a POSIX/Unix environment, not a Win32/DOS one.

Right, except with 100% Win32/DOS file semantics. About the only thing different to me is that I can work in a Bash shell instead of a cmd.exe shell. Technically this is not acceptable as a POSIX environment, as a fair bit more of the OS would have to change (I've been involved, obliquely, with work to make Win32 truly POSIX). Win32 (well, I guess NT 4 and 5) cannot be called, referred to, or presented as a POSIX or Unix environment without a fair amount of changes to the OS.

It's just an XP box with some payware tools installed so I can have a real shell and convenient tools.

For the purposes of talking about EOL chars (my only intent in this thread, really) this seemed appropriate. I don't want to go off in several directions discussing what is or is not Win32. To me this is arguing the Buddha nature; fun in its own way but not germane to the current conversation. Suffice it to say that I am on a plain Win32 development system, only with a subset of POSIX tools running as an application that use the regular Win32 APIs to get work done (and parts of a custom libc supplied from the days when Windows had no real C library).

Each
line is 11 characters long; 9 characters and two line-end characters.
Note also that the size in bytes is the same as the character count.
Well duhhh.

I was replying in the same spirit of the OP (or the closest thing to an
OP that my node is willing to give me) of "showing your work".

Unfortunately your 'work' was lacking:

Well, surely not for the part of my reply directed to Pete. Remember that the "work" we are talking about here is related to the EOL discussion. It is, as far as I know, quite accurate and clear.

Honest, teacher, I did *most* of my homework! Unfortunately, I made the mistake of tagging on a few sentences at the end that I did not fact-check to the limit required by USENET. Mea maxima culpa.

Which leads us to...

"""The EOF/EOT marker is "present", but is
usually used up by API calls that scan for it while retrieving the
contents of a file."""

A-ha! I now know what you are taking so much umbrage with! All that essentially unrelated stuff about POSIX and showing your work leads us to this. I can't recall if you actually quoted this previously and it got lost in the noise.

Yes, this was an untrue statement. I was conflating the notion of "end-of-file" as referenced in various APIs with the EOF character on a specific platform. I assumed such characters were still necessary on Win32. My misunderstanding was compounded by having to work on code (not ours!) that stopped because it reached an EOF char in a file, and decided it was time to stop.

A short test in C cleared this up. I suppose if I had done this in my original reply all this back and forth could have been avoided.

[Rest snipped for "brevity".]
.



Relevant Pages

  • waitpid with a time limit
    ... My company may be getting a contract to port a Win32 application to ... the Win32 stuff I'm seeing have straightforward Posix ... indicate the completion of the child process by posting to a semaphore. ... Then we simulate a timed waitpid() call by making a sem_timedwaitcall ...
    (comp.os.linux.development.apps)
  • Re: Win32 condition variables redux
    ... Win32 is no natural ground for condition variables as ... defined by POSIX. ... it was wrong for me to try to lay a POSIX layer on top of ... My abstraction layer won't have condition variables, ...
    (comp.programming.threads)
  • Re: Confused about which way to go
    ... First versions of NT was supposed to run OS/2, posix and Win32 ... Every subsystem eventualy called native NT API. ... posix and OS/2 subsystems become absolete. ...
    (borland.public.delphi.non-technical)
  • Re: bug in visual studio .net 2003 - breakpoints and memcpy
    ... Alexander Grigoriev wrote: ... Both Win32 and Posix define the conversion. ... Prev by Date: ...
    (microsoft.public.win32.programmer.kernel)
  • Re: portable C code?
    ... Either ANSI or ISO. ...
    (comp.unix.programmer)