Dear Friends

I'd like to suggest if possible an new standart for xharbour api functions

so we can build xharbour with unicode support

is possible to use this standarization for all api declaration for char* 
/const char*

#if defined (_UNICODE) && !defined (UNICODE)
 #define UNICODE
#endif
#if defined (UNICODE) && !defined (_UNICODE)
 #define _UNICODE
#endif

#ifndef _WIN32
 #include <ctype.h>
 typedef unsigned long       DWORD;
 typedef long    LONG;
 typedef int                 BOOL;
 typedef unsigned char       BYTE;
 typedef unsigned short      WORD;
 typedef unsigned int        UINT;

 typedef unsigned short WCHAR;    // wc,   16-bit UNICODE character
 typedef const WCHAR *LPCWSTR;
 typedef const char *LPCSTR;
 typedef WCHAR *LPWSTR;
 typedef char *LPSTR;

 #ifdef  _UNICODE
  typedef wchar_t TCHAR;
  typedef LPCWSTR LPCTSTR;
  typedef LPWSTR LPTSTR;
  #define _T(x)      L ## x
 #else   /* _UNICODE */               // r_winnt
  typedef char TCHAR;
  typedef LPCSTR LPCTSTR;
  typedef LPSTR LPTSTR;
  #define _T(x)      x
 #endif /* _UNICODE */                // r_winnt


#else
   #include <TCHAR.H>
        #include <windows.H>
       #ifndef STRICT
  #define STRICT
 #endif
#endif


and declare our functions
From
extern HB_FORCE_EXPORT char *     hb_parc( int iParam, ... );  /* retrieve a 
string parameter */
extern HB_EXPORT       char *     hb_parcx( int iParam, ... );  /* retrieve 
a string parameter */

to
extern HB_FORCE_EXPORT LPTSTR     hb_parc( int iParam, ... );  /* retrieve a 
string parameter */
extern HB_EXPORT       LPTSTR     hb_parcx( int iParam, ... );  /* retrieve 
a string parameter */

this will make easy to build xharbour with unicode support

Regards
Luiz 


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to