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

RE: [XaraXtreme-dev] UNICODE problems in cxfrec [Fwd: [XaraXtreme-commits] Commit Complete]

While writing just the low byte of a TCHAR as an ascii char isn't
strictly correct, it shouldn't actually get used much.  It certainly
gets used in the document header record and it also seems to be used in
export hint records (where it should be safe) and also in the export
info records saved by the name gallery code (it writes a class name so
this should also be safe).

These really do all need fixing.  There is also this bit at the top of

// This define has different meaning under linux
#if !defined(__WXMSW__)
#undef UNICODE

...which looks somewhat dodgy...


-----Original Message-----
From: owner-dev@xxxxxxxxxxxxxxxx [mailto:owner-dev@xxxxxxxxxxxxxxxx] On
Behalf Of Alex Bligh
Sent: 31 July 2006 17:27
To: xara-dev
Cc: Alex Bligh
Subject: [XaraXtreme-dev] UNICODE problems in cxfrec [Fwd:
[XaraXtreme-commits] Commit Complete]


There are a couple of other occurrences of this in the same file.
I am loathe to fix them as they are to do with saving. The
WriteASCII one looks particuarly dodgy. Can writing just the
low byte of a TCHAR be right?

More worryingly:

$ Scripts/all.sh | xargs egrep -n "if(n)?def +UNICODE"
Kernel/cxfile.cpp:1019:#ifdef UNICODE
Kernel/cxfile.cpp:1147:#ifdef UNICODE
Kernel/cxfile.cpp:1205:#ifdef UNICODE
wxOil/basestr.h:900:#ifdef UNICODE
wxOil/camnet.cpp:2173:#ifdef UNICODE
wxOil/helpuser.cpp:140:#ifdef UNICODE
wxOil/prdlgctl.cpp:185:#ifdef UNICODE
wxOil/registry.cpp:133:#ifdef UNICODE