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

Ok...



I would've liked to have everything done by today (serialization,
namespacing and namechanging), but I haven't been felling very well for the
last two days, so I haven't been very productive or very responsive with
Emails. I'll catch up on the Emails tomorrow.

The namespacing thing is done. It introduced some problems, though (namely
with ppfDirEntry and ppf_DirEntry). The serialization stuff, I haven't
finished. It'll probably take a day or two to do that.

In an effort to get PenguinFile to compile on VC++ 5.0, I've done these to
serialization unrelated changes:

-The pure virtual GetVFSInterface() method of Directory has been changed to
non-const. All subclasses have been updated. A non-virtual const method that
calls the virtual one and returns a const VFSInterface has been added. The
reason was const-correctness, and it made PFile not compile.

-I've removed some std:: prefixes to some standard library global functions
(ie, C functions). It might be a good idea to do the std::, but it didn't
compile. I think we should instead include the ::std namespace into
::pp::internal. That way, stuff always work. We use a different naming
convention than the standard library, so we shouldn't run into name clashes.

-I did the remove-parent-paramter-of-Directory-constructor thing. I also had
to update the GenericDir and PakFileDir classes.

-I removed this code from ppf_GlobablData.cpp:

#if HAVE_UNISTD_H
#  include <unistd.h>
#else
#  error "Sorry - POSIX functionality is needed"
#endif

-In ppf_GlobalData, this line was causing a compile error:

	if (Umount (FSURLs [i], ppfMF_force) == 0)

It was corrected to:

	if (Umount (*(FSURLs [i]), ppfMF_force) == 0)

This type of error was corrected several places in ppf_GlobalData.

-Changed the type of FSURLs in TGlobalData from an array of const pointers
to URLInfo's, to an array of non-const ones. The reason for this was that
non-const methods was called on URLInfo's pointed to by elements of FSURLs,
and this was generating errors.

-In TGlobalData, commented out the implementation of SetCWD(). The reason
was that it was using getcwd (3), which is Win32 incompatible. We'll have to
get back on this.

-In TGlobalData, I removed this line:

	ppAssert (ppf_IsPlainfsURL (Path));

The reason is that there is no such thing as a ppf_IsPlainfsURL().

-I removed this code from ppf_OpenDir.h:

#if HAVE_UNISTD_H
#  include <dirent.h>
#  include <unistd.h>
#  include <sys/types.h>
#  include <sys/stat.h>
#else
#  error "Sorry - POSIX functionality is needed"
#endif


-Changed ppf_OpenDirPlain to use URLInfo rather than the old system

-Commneted out implementation of ppf_StatPlain(), because it deleted the
name parameter of a DirEntry and replaced it. DirEntry can only give a const
pointer to its name, and the name cannot be set... I'm not exactly sure what
the point of replacing the name is, so I thought I'd leave it to you to fix
the problem (are there two versions of DirEntry? One internal, one
external?, if there is, than that needs fixing). The same goes for
ppf_LStatPlain().

-After some fooling around, I completely commented out the file
ppf_OpenDir.cpp . The reason for this is that it didn't compile, I'm not
exactly sure what each function is supposed to do, and it seems that there
are two versions of DirEntry: ppf_DirEntry and ppfDirEntry. I don't know
what to do about that (it doesn't work with removing the ppf and ppf_
prefixes, obviously). You'll have to fix this.

-I let ppf_PakFileConstants keep its ppf_ prefix. The class should be
removed anyway, and the constant values placed directly in the
::pp::internal namespace. I moved initializations to the implementation
file, as VC++ 5.0 cannot handle initialization of members directly in the
class declaration.

-commneted out the implementation for PakFile::Mount(), as it didn't use
URLInfo, and I wasn't sure how to make it do that with the functionality it
required (namely to get the bare filename with no extension).

-commneted out part of the implementation for PakFile::Unmount(). The part
commented out was the part having to do with the old serialization scheme.
It'll need to get reimplemented when the new one is in place.

-Part of the implementation for ppf_PakMWriteLEInt64() was commented out,
since it had constants ending in "LL" (ie, long long). VC++ does not support
this.


-This code was removed from ppfMisc.cpp:

#if HAVE_UNISTD_H
#  include <sys/types.h>
#  include <sys/stat.h>
#  include <fcntl.h>
#  include <unistd.h>
#else
#  error "Sorry - POSIX functionality is needed"
#endif

-The implementation of ppfCloseDir() was commented out. The reason for this
was that it was deleting const pointers, and this was causing PFile not to
compile.

-Removed all #warning precompiler directives. MS VC++ 5.0 does not support
these.






--