RE: [sqlite] SQLite for Win32 TCHAR

2004-03-17 Thread Michael Smith
This is to clarify what I meant:
 
I would like to know if anyone has modified sqlite so that it entirely works
with TCHAR, either when it is typedef'd as unsigned short or char (per
UNICODE).  
 
This is an example of what I would like to see:
 
sqlite *sqlite_open(LPTCSTR filename, int mode, LPTSTR* errmsg);
 
typedef int (*sqlite_callback)(void*,int,LPTSTR*, LPTSTR*);
 
int sqlite_exec(sqlite*,  LPCTSTR sql,  sqlite_callback,  void *, LPTSTR
*errmsg);
 
and following this the underlying code fully supports TCHAR all down to the
functions in os.c.
 
In studying the code I realize its not a simple task and it may not even be
possible or desirable considering the logic which supports UTF8 throughout.
Other sources of concern are buffer sizes and how the changes would affect
read/write performance etc
 
Thanks for your feedback to this point,
 
Mike Smith
 
 
 
 

-Original Message-
From: Steven Van Ingelgem [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 1:27 AM
To: Andrew Francis; Michael Smith
Cc: [EMAIL PROTECTED]
Subject: Re: [sqlite] SQLite for Win32 TCHAR


I understand what he means... 

I am using SQLite 2.8.11 and I did notice this too... Some Win32 fucntions
should have 'A' attached to the end. This way it does not complain when
using SQLite embedded in a UNICODE project.

[ I even think I submitted a diff with things you would have to change to
have absolutely no warnings any more (for a Win32 unicode build that is)]


greets...

At 06:11 17/03/2004, Andrew Francis wrote:


Michael Smith wrote:



Has anyone ported the SQLite code to support the Win32 TCHAR type and API?


I'll confess I'm not actually sure what you mean by "ported" - do you mean
using TCHAR (which is, btw, just a typedef for char or short depending on
whether UNICODE is #define'd) in the sqlite library interface, or using
TCHAR for Win32 calls?

Regardless, I'd start by looking at the sqlite ports to Windows CE /
PocketPC. From memory, there are a couple around. Windows CE provides only
Unicode versions of the Win32 functions, so generally WinCE code has to be
TCHAR/Unicode 'clean.'

-- 
Andrew Francis
Software Developer
Family Health Software


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



G00fy, (aka KaReL, aka Steven)

Main Webpage : http://komma.cjb.net <http://komma.cjb.net/> 
CQ Database  : http://lid.fragland.net/ <http://lid.fragland.net/> 
ICQ #: 35217584




[sqlite] SQLite for Win32 TCHAR

2004-03-16 Thread Michael Smith
Hello,

Has anyone ported the SQLite code to support the Win32 TCHAR type and API?

Thanks,
Mike