2012-05-04 01:51 UTC+0200 Viktor Szakats (harbour syenar.net)

* include/harbour.hbx
  * src/rtl/cdpapihb.c
    + HB_CDPCHARMAX( [<cCP>] ) -> <nMaxCharCode>
      (ATM 0xFFFF for unicode or 0xFF for non-unicode (default) CPs)
This commit is contained in:
Viktor Szakats
2012-05-03 23:53:24 +00:00
parent 1721eee814
commit 1be0971119
3 changed files with 13 additions and 1 deletions

View File

@@ -16,6 +16,12 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-05-04 01:51 UTC+0200 Viktor Szakats (harbour syenar.net)
* include/harbour.hbx
* src/rtl/cdpapihb.c
+ HB_CDPCHARMAX( [<cCP>] ) -> <nMaxCharCode>
(ATM 0xFFFF for unicode or 0xFF for non-unicode (default) CPs)
2012-05-04 01:12 UTC+0200 Viktor Szakats (harbour syenar.net)
* src/rtl/hbstrsh.c
+ HB_STRSHRINK() updated to work on custom character indexes (UTF8)
@@ -166,7 +172,7 @@
; TOFIX: cmdline arguments via Main() parameters, hb_AParams()
and hb_cmdLine() on Windows.
; TODO: Add a way to detect maximum bit width of unicode chars,
for now I hard-coded 16-bit.
for now I hard-coded 16-bit. [DONE]
2012-04-26 10:35 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/src/rtl/hbgtcore.c

View File

@@ -335,6 +335,7 @@ DYNAMIC hb_ByteSwapL
DYNAMIC hb_ByteSwapLL
DYNAMIC hb_ByteSwapU
DYNAMIC hb_ByteSwapW
DYNAMIC hb_cdpCharMax
DYNAMIC hb_cdpInfo
DYNAMIC hb_cdpIsUTF8
DYNAMIC hb_cdpList

View File

@@ -106,6 +106,11 @@ HB_FUNC( HB_CDPINFO )
hb_retc( cdp ? cdp->info : NULL );
}
HB_FUNC( HB_CDPCHARMAX )
{
hb_retnl( ( 1 << ( ( int ) ( hb_cdpIsUTF8( hb_cdpFindExt( hb_parcx( 1 ) ) ) ? sizeof( HB_WCHAR ) : sizeof( HB_UCHAR ) ) * 8 ) ) - 1 );
}
HB_FUNC( HB_CDPISUTF8 )
{
hb_retl( hb_cdpIsUTF8( hb_cdpFindExt( hb_parcx( 1 ) ) ) );