Mail Archives: djgpp/2004/07/23/05:00:37
"Eli Zaretskii" <eliz AT gnu DOT org> wrote in message news:2914-Fri23Jul2004104314+0300-eliz AT gnu DOT org...
> > Didn't I read in the documentation that "make" uses COMSPEC to determine
> > which shell to invoke?
>
> It does, except that Windows stuffs COMMAND.COM into COMSPEC's value
> when it sees a DOS program. Try printing the value of COMSPEC from a
> Makefile, and you will see it.
Interesting!
echo $(COMSPEC) --> C:\WINDOWS\SYSTEM32\COMMAND.COM
ver --> MS-DOS Version 5.00.500
That's command.com, all right.
cmd /c ver --> Microsoft Windows XP [Version 5.1.2600]
And that is cmd.exe executing!
> > OK, how do I emulate "copy /a" using "cp.exe" (truncate on End Of Text)?
>
> Why, do you still have text files that end in a Ctrl-Z character?
Yes, in fact it is for a data recording system that writes data as formatted text in a file
on a MS-DOS file system. The file is pre-allocated, so only the data in the
file changes during recording, and not the file system. In that way, the file system will never
get corrupted when the power is turned off. The Ctrl-Z character is the end of recorded data.
Copy /a is a convenient way to separate the recorded data from the unused file portion.
For now, it works and I know a little bit what is going on.
Thanks,
-RoB-
- Raw text -