2010-07-04 12:21 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/cdpapi.c
* src/rtl/cdpapihb.c
* include/hbapicdp.h
+ Added new low level hb_cdpList() function.
! cdp list generation logic now protected with mutex.
! HB_CDPLIST() .prg level function moved to cdpapihb.c,
thus clearing the last pending TOFIX here regarding
layer separation. Low level can now be moved to
common lib (or is there anything else missing?).
* contrib/hbqt/hbmk2_plugin_qt.prg
* Minor correction in one stdalone error msg.
This commit is contained in:
@@ -16,6 +16,20 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-07-04 12:21 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/rtl/cdpapi.c
|
||||
* src/rtl/cdpapihb.c
|
||||
* include/hbapicdp.h
|
||||
+ Added new low level hb_cdpList() function.
|
||||
! cdp list generation logic now protected with mutex.
|
||||
! HB_CDPLIST() .prg level function moved to cdpapihb.c,
|
||||
thus clearing the last pending TOFIX here regarding
|
||||
layer separation. Low level can now be moved to
|
||||
common lib (or is there anything else missing?).
|
||||
|
||||
* contrib/hbqt/hbmk2_plugin_qt.prg
|
||||
* Minor correction in one stdalone error msg.
|
||||
|
||||
2010-07-02 10:44 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ Added feature for plugins to register the file extensions
|
||||
|
||||
@@ -377,7 +377,7 @@ PROCEDURE Main( cSrc, cDst )
|
||||
|
||||
FErase( cTmp )
|
||||
ELSE
|
||||
OutErr( "Missing parameter. Call with: <.ui|.qrc> <.prg>" + hb_osNewLine() )
|
||||
OutErr( "Missing parameter. Call with: <input> <output>" + hb_osNewLine() )
|
||||
nError := 8
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -341,6 +341,7 @@ extern HB_EXPORT PHB_CODEPAGE hb_cdpSelect( PHB_CODEPAGE cdp );
|
||||
extern HB_EXPORT const char * hb_cdpSelectID( const char * id );
|
||||
extern HB_EXPORT PHB_CODEPAGE hb_cdpFind( const char * id );
|
||||
extern HB_EXPORT PHB_CODEPAGE hb_cdpFindExt( const char * id );
|
||||
extern HB_EXPORT const char ** hb_cdpList( void ); /* Caller must release the pointer */
|
||||
|
||||
extern HB_EXPORT HB_BOOL hb_cdpIsDigit( PHB_CODEPAGE cdp, int iChar );
|
||||
extern HB_EXPORT HB_BOOL hb_cdpIsAlpha( PHB_CODEPAGE cdp, int iChar );
|
||||
|
||||
@@ -2208,11 +2208,14 @@ const char * hb_cdpSelectID( const char * id )
|
||||
return cdp ? cdp->id : NULL;
|
||||
}
|
||||
|
||||
/* TOFIX: Move this to cdpapihb.c */
|
||||
HB_FUNC( HB_CDPLIST )
|
||||
/* Caller must release the pointer */
|
||||
const char ** hb_cdpList( void )
|
||||
{
|
||||
PHB_CODEPAGE cdp;
|
||||
int iCount;
|
||||
const char ** list;
|
||||
|
||||
HB_CDP_LOCK
|
||||
|
||||
cdp = s_cdpList;
|
||||
iCount = 0;
|
||||
@@ -2222,12 +2225,18 @@ HB_FUNC( HB_CDPLIST )
|
||||
cdp = cdp->next;
|
||||
}
|
||||
|
||||
hb_reta( iCount );
|
||||
list = ( const char ** ) hb_xgrab( ( iCount + 1 ) * sizeof( char * ) );
|
||||
|
||||
cdp = s_cdpList;
|
||||
iCount = 0;
|
||||
while( cdp )
|
||||
{
|
||||
hb_storvc( cdp->id, -1, ++iCount );
|
||||
list[ iCount++ ] = cdp->id;
|
||||
cdp = cdp->next;
|
||||
}
|
||||
list[ iCount ] = NULL;
|
||||
|
||||
HB_CDP_UNLOCK
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -116,6 +116,27 @@ HB_FUNC( HB_CDPINFO )
|
||||
hb_retc( cdp ? cdp->info : NULL );
|
||||
}
|
||||
|
||||
HB_FUNC( HB_CDPLIST )
|
||||
{
|
||||
const char ** list = hb_cdpList();
|
||||
HB_ISIZ nPos;
|
||||
|
||||
nPos = 0;
|
||||
while( list[ nPos ] )
|
||||
++nPos;
|
||||
|
||||
hb_reta( nPos );
|
||||
|
||||
nPos = 0;
|
||||
while( list[ nPos ] )
|
||||
{
|
||||
hb_storvc( list[ nPos ], -1, nPos + 1 );
|
||||
++nPos;
|
||||
}
|
||||
|
||||
hb_xfree( ( void * ) list );
|
||||
}
|
||||
|
||||
HB_FUNC( __NATSORTVER )
|
||||
{
|
||||
/* NOTE: CA-Cl*pper 5.2e Intl. will return: "NATSORT v1.2i x14 19/Mar/93" */
|
||||
|
||||
Reference in New Issue
Block a user