Mail Archives: djgpp-workers/1999/11/15/12:32:35
On Mon, 15 Nov 1999, Laurynas Biveinis wrote:
> Eli Zaretskii wrote:
> > I don't know, they might. Did you try to call `getcwd' in a recursive
> > program, like the one which calls `ftw'? If not, it might be a good
> > idea.
>
> Well, I'm not certain, about what kind of recursive situation you're
> talking about.
`ftw' recursively descends a directory tree, applying a user-defined
function to each file. What happens if you pass it a user-defined
function that, if the file is a directory, chdirs to that directory and
prints what getcwd returns? Just for fun, make it chdir by calling
__dpmi_in directly.
> BTW, how could DOS store `current directory' itself? IMHO in global
> variable.
DOS can do it because it is itself the server of the chdir call. Our
libc isn't, so it isn't simple for it to keep track of cwd.
- Raw text -