[xml] Re: xml digest, Vol 1 #602 - 3 msgs

On Mon, 16 Sep 2002 00:00, you wrote:


As a list lurker, longtime libxml user & and professional cross platform 
software developer , I'd just like to add my voice to support your intended 
path for wince support. My (significant) experience in this area (multipl 
platform support not wince) leads me type to encourage anyone to take this 
route for anything other than small , short term software projects. The 
(extensive) use of inline conditional compilation to handle all cross 
platform issues is just too messy and NEVER pays off except in the short 
term. Providing a seperate module to create the missing std OS API will 
reward you in the long run , especially since I dont see wince providing that 
capability natively any time soon.

With appreciation of your contributions to libxml & co


Peter Farmer            |  Custom XML software   | Internet Engineering  
Zveno Pty Ltd           | Website XML Solutions  | Training & Seminars 
http://www.zveno.com/   |   Open Source Tools    |   - XML XSL Tcl 
Peter Farmer zveno com  +------------------------+--------------------- 
Ph. +61 8 92036380      | Mobile +61 417 906 851 | Fax +61 8 92036380 

Since you have the Win C code base as a starting point it seems the 
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?

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