[ wxwindows-Patches-1858847 ] the support of file system of PalmOS.

SourceForge.net noreply at sourceforge.net
Wed Jan 2 16:49:42 PST 2008


Patches item #1858847, was opened at 2007-12-27 10:38
Message generated for change (Settings changed) made by vadz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1858847&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Other
Group: new feature
>Status: Pending
Resolution: None
Priority: 5
Private: No
Submitted By: F,Yh (yhfu)
Assigned to: Vadim Zeitlin (vadz)
Summary: the support of file system of PalmOS.

Initial Comment:
The patch is intended for adding the support of file system of PalmOS.

1. Add the abstract layer for the file system of PalmOS

      The abstract layer is used for simplify the complex of the API of the PalmOS's File handle.
  It's archived by abstract the filename as *nix like path name. For example, the database
  in RAM named "mypdb" can access by the path name "/palmos/ram/0/mypdb". the "/palmos/ram/0"
  indicate that the file is exist in the first slot of RAM in the PalmOS.

      Some of the dirs:
      * the RAM dir: "/palmos/ram/0/", "/palmos/ram/1/", ...
      * the ROM dir: "/palmos/rom/0/", "/palmos/rom/1/", ...
      * the dir in extend card: "/palmos/vfs/0/", "/palmos/vfs/1/", "/palmos/vfs/2/", ...

     This lib's objective is for the porting of the programs use this API. The API for
  access the files of system are split two parts: One group (start with svfs_file_) are for
  "stream like" files, and another group (start with svfs_pdbrec_) are for the
  traditional PDB files.

2. PalmOS 6.1 makefile
   Add the make fuuctions:
     make .dependencies
     make distclean

3. Move the definition of wxConfig into config.h, because it's more suitable to include the proper
   file and define the wxConfig immediately.

4. add wxOS_PALM_OS, wxOS_PALM_LINUX, wxOS_PALM to wxOperatingSystemId

5. The palmos5 compiler pacc aways complain that it's could not find proper function to
   convert the wxString to char *, this should be a bug of the compiler. But I have to 
   add the #if #else to walk around it.
   src/common/filefn.cpp
   src/common/log.cpp
   src/common/sysopt.cpp

6. Implement some wide-char functions:
   wcslen, wcscpy, wcsncpy, wcscat, wcsncat, wcscmp, wcsncmp, wcschr, wcscoll, 
   wcsxfrm, wcsrchr, wcspbrk, wcsspn, wcscspn, wcsstr, wcstok

7. Complete some functions in src/palmos/utils.cpp

8. Complete the wxDir


----------------------------------------------------------------------

>Comment By: Vadim Zeitlin (vadz)
Date: 2008-01-03 01:49

Message:
Logged In: YES 
user_id=71618
Originator: NO

Sorry but there are really a lot of things in this patch which I don't
understand and so can't apply. It would be better to submit separate
patches for individual changes, this would allow us to advance much more
quickly. Anyhow, about this patch (not necessarily in order of importance
as I'm writing this as I'm reading it):

1. What are the changes to the makefiles for? E.g. what is DN_SRC? And why
doesn't it use TOPDIR? What is the logic with .dependencies.1 and
.dependencies.2 in makefile-engine? And what is this strange
ifeq($(AAAAAAA), 1111) test for?

2. Tests for __WXPALMOS5__ should use "#ifndef", not "#if !" as the latter
would break the build under non-PalmOS5 platforms.

3. You can't just comment out all these checks in wx/chkconf.h like
this... I don't know why did you have to do it and there are too many
changes here so I can't really explore them all but I think that you need
to change things in wx/palmos/setup.h and/or wx/palmos/chkconf.h instead.

4. Ok for wxConfig definition change but why did you add "#elif
__WXOS2__"? I'm far from sure that this is correct and would prefer to not
do it. Also, it's much better to remove the non-needed lines instead of
commenting them out

5. This is minor but I'd prefer to write "if !defined(__WXWINCE__) &&
!defined(__WXPALMOS__)" instead of writing 

#ifndef __WXPALMOS__
#ifndef __WXWINCE__
...

Or maybe we should even define some wxHAS_STD_HEADERS for all platforms
except those 2 and use it around includes for headers such as assert.h and
time.h. This would be more maintainable.

6. Please don't use hard tabs in wx sources, they have to be manually
removed before committing.

7. The check for wxUSE_LISTCTRL in filectrlg.h should be done in
chkconf.h, not here

8. I'm really surprised by the changes to wxFputs(): this function already
takes wxString so there is no need for conversion to char*, what can the
compiler have against it? Same goes for wxAtoi. What error exactly do you
get without  your changes?

9. The change to wxGenericFileCtrl::DoSetFilterIndex() doesn't seem to be
Palm-specific, could you please explain why is it needed? If it fixes a
real bug, please post a separate patch for it so that we could discuss it
easier.

10. I didn't read really carefully the changes to src/palmos/*.cpp files
as I don't know much about Palm API but a couple of superficial remarks:
a) PALMOS_TRACE is defined several times, why not do it in a header (maybe
wx/palmos/private.h)?
b) we don't use "if ( NULL == p )" style of comparisons anywhere in wx
code, it would be great if you could keep wxPalm code consistent with it by
writing "if ( p == NULL )" (or just "if ( p )" which is ok too) there too.
c) it would be really great to replace Chinese comments with English
ones...

11. Concerning the FS-related code itself, I'll reply on the mailing list

Most of these points are pretty minor, of course, but it should be much
simpler for you to correct them than for me to do it blindly. Could you
please do it and update the patch? Thanks a lot in advance!

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1858847&group_id=9863




More information about the wx-dev mailing list