[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Win32 PFile

Peter Burns wrote:
>Hopefully you will find attached some more changes for PenguinFile under

Found them.

>In PenguinFile.dsp I turned on the rtti for the release version. I also
>defined PP_DEBUG
>and PP_NDEBUG here rather than in ppconfig-win32.h.diff

Ok. Applying those now.
Ooops. I just saw that many of your .dsp files are still missing from CVS.
Which need to be included?

src/PenguinUtilities.dsp ?
src/PenguinUtilities.def ? (BTW: The debugging functions in there don't
need to be exported. Unless we want to use them in our demo/test code that
is. They are no official API functions)

src/PenguinFile/PenguinFile.dsp ?
src/PenguinFile/StaticPenguinFile.dsp ? 
src/PenguinSound/StaticPenguinSound.dsp ?

There's also still src/PenguinSound/psound_test.dsp  - that should be
removed, right?

And what about the *.plg?
And the *.mak are autogenerated from the *.dsp, right?

>I modified debug.h so that it uses DebugBreak in win32. I don't know
>whether this is a good thing or not as it doesn't seem to work very

Hmm, ok.

>well. I also added a macro called ppEvilTrick to do what a lot of the
>other macros in debug.h were doing.

Looks good. The "FunPointer" argument to ppEvilTrick is a bit misleading as
it's really a function *name*.

>URLInfo.cpp has by far the most problems for win32. Take a careful look
>at those changes as they are probably the wrong thing to do. They do
>however indicate spots were something is going wrong.

The "unclear" things are:

< 	if (is_absolute)
> 	if (is_absolute && !is_native)

Unneccessary. At the top of the function is a line
   if (is_native) return; /* already in native mode */
taking care of that

< 	if (is_native)
> 	if (!CWDPath.is_native)

CWDPath is returned by FileGlobalData.GetCWDPath () which always returns a
PFile-style path. So this is wrong.

>    if (fs == ppfFS_pak)
>       is_native = true;
>    else if (!is_native)
>       ToNative();

I'm not sure where to place this. Some context would be helpful. And I
highly doubt it's correct, as an URLInfo object converting itself to native
in the middle of a function doing something entirely different (ToAbsolute
() according to the line numbers) is dangerous at best. What did you want
do do with this?

There's some more stuff in ToAbsolute (). And there *is* a bug in it,
right. I'll dig into it now.
Ok, that should be it.

< 		do { URL++; } while (*URL == '/');
> 		//do { URL++; } while (*URL == '/');

That's in ParseBasics (). It's skipping the leading slashes. What's wrong
with it?

Ok, I updated URLInfo.cpp and applied the patches to debug.h and
The PenguinFile.dsp thing is not yet committed, as I'd first like to know
what .dsp's need to be added at all.


PS: Did you get the mail from Karsten regarding CVS?

Windows IS NOT a virus...viruses do something.