Re: [xml] PocketPC (Windows CE) Port


I fully agree with you in that developing a separate wince xml io module will do the trick much better than the #fidef game. Everytime I tried to port something to PocketPC (or Windows CE) I found the same problem. And the fastest track is, of course, the dirty one!

Anyway I found a little bit of incoherence in the include policy along libxml code, so it was much easier (and faster,again) to ifdef my changes so they became much more visible, instead of go changing several modules to homogeinize the includes.

For the records, the port is working great already in two applications though only parts have been really tested (neither xpath nor html).

Finally, I support the idea of a wince compatibility module development and commit myself to help as much as I can to that effort.



At 13:35 14/09/2002 +0200, you wrote:
Hi there,

somewhere about a week ago, Javier said he managed to compile libxml2 on a
Pocket PC with Windows CE. He sent his changes to me, because of the lack of
possibility to make a regular diff.

Now, WinCE spacific files he placed in a subdirectory of ./win32, which is
okay and hurts noone. He also modified the IO somewhat, in a way I
personally found less appealing :=) Basically there are three things I am
not fond about:

1. Replaced every call to read/write with calls to fread/fwrite, with
apropriate #ifdefs.
2. Excluded every call to getenv.
3. Called SetLastError, a native API, in the middle of the code.

Number one alone uglifies the code, for fread and read have different
parameters and different local variables are needed in functions which call
these. I find, few more of these and noone will be able to read the code
anymore without preprocessing it first :-)

The fact is that Windows CE does not have open/read/write/close functions. I
believe that Windows CE does have all required IO functionality, but exposed
through the native API. Unlike desktop Windows, the C-runtime in WinCE does
not wrap the required part.

Now, I thought about make an implementation of open/read/write/close, based
on the native WinCE API, which then can be kept in a separate C file. I
think that is a cleaner solution.

The C-runtime in desktop Windows does have implementations of these, and
these implementations do nothing else but call the native API internally.
The source code for MS C-Runtime is also available, at least the relevant
part. Looking at that code and porting it to WinCE should not be a big

What do you think?


xml mailing list, project page
xml gnome org

mensaje enviado desde
emails (pop)-paginas web (espacio ilimitado)-agenda-favoritos (bookmarks)-foros -Chat

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