2016-03-25 17:05 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* include/hbclass.ch
    ! use more restrictive PP rules to avoid possible wrong
      interactions with code using 'var' and 'data' identifiers
    * force class name to be valid identifier
    * commented unused rules

  * include/std.ch
    ! fixed CODEPAGE clause in COPY TO and APPEND FROM commands
    + added VIA and CODEPAGE clauses to JOIN command

  * src/rdd/dbcmd.c
    * updated comments with some function syntax
This commit is contained in:
Przemysław Czerpak
2016-03-25 17:05:31 +01:00
parent 0d57fdacfa
commit 3b77191f9f
4 changed files with 83 additions and 57 deletions

View File

@@ -269,6 +269,7 @@ HB_FUNC( BOF )
hb_retl( bBof );
}
/* dbAppend( [<lUnLockAll>=.T.] ) -> <lSuccess> */
HB_FUNC( DBAPPEND )
{
AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer();
@@ -314,9 +315,10 @@ HB_FUNC( DBCOMMITALL )
/*
* In Clipper the arguments are:
* dbCreate( cFile, aStruct, cRDD, lKeepOpen, cAlias, cDelimArg )
* In Harbour:
* dbCreate( cFile, aStruct, cRDD, lKeepOpen, cAlias, cDelimArg, cCodePage, nConnection ) (HB_EXTENSION)
* dbCreate( cFile, aStruct, cRDD, lKeepOpen, cAlias, cDelimArg ) -> NIL
* In Harbour (HB_EXTENSION):
* dbCreate( cFile, aStruct, cRDD, lKeepOpen, cAlias, cDelimArg, ;
* cCodePage, nConnection ) -> <lSuccess>
*/
HB_FUNC( DBCREATE )
{
@@ -386,7 +388,7 @@ HB_FUNC( DBCREATE )
}
/*
* hb_dbCreateTemp( <cAlias>, <aStruct>, <cRDD>, <cCodePage>, <nConnection> ) -> <lSuccess>
* hb_dbCreateTemp( <cAlias>, <aStruct>, <cRDD>, <cCodePage>, <nConnection> ) -> <lSuccess>
*/
HB_FUNC( HB_DBCREATETEMP )
{
@@ -451,7 +453,7 @@ HB_FUNC( HB_DBCREATETEMP )
if .F. it will be opened in the current one. */
/* NOTE: Has an identical parameter list with dbCreate() */
/* __dbOpenSDF( cFile, aStruct, cRDD, lKeepOpen, cAlias, cDelimArg, cCodePage, nConnection ) */
/* __dbOpenSDF( cFile, aStruct, cRDD, lKeepOpen, cAlias, cDelimArg, cCodePage, nConnection ) -> <lSuccess> */
HB_FUNC( __DBOPENSDF )
{
const char * szFileName, * szAlias, * szDriver, * szCpId;
@@ -914,8 +916,9 @@ HB_FUNC( DBUNLOCKALL )
hb_rddUnLockAll();
}
/* dbUseArea( [<lNewArea>], [<cDriver>], <cName>, [<xcAlias>], [<lShared>], [<lReadonly>], [<cCodePage>], [<nConnection>] ) -> NIL */
/* dbUseArea( [<lNewArea>], [<cDriver>], <cName>, [<xcAlias>], ;
[<lShared>], [<lReadonly>], [<cCodePage>], ;
[<nConnection>] ) -> <lSuccess> */
HB_FUNC( DBUSEAREA )
{
hb_retl( hb_rddOpenTable( hb_parc( 3 ), hb_parc( 2 ),
@@ -1951,7 +1954,7 @@ HB_FUNC( __DBARRANGE )
hb_retl( errCode == HB_SUCCESS );
}
/* __dbTrans( nDstArea, aFieldsStru, bFor, bWhile, nNext, nRecord, lRest ) */
/* __dbTrans( nDstArea, aFieldsStru, bFor, bWhile, nNext, nRecord, lRest ) -> <lSuccess> */
HB_FUNC( __DBTRANS )
{
if( HB_ISNUM( 1 ) )
@@ -2027,6 +2030,10 @@ HB_FUNC( __DBTRANS )
hb_errRT_DBCMD( EG_ARG, EDBCMD_USE_BADPARAMETER, NULL, HB_ERR_FUNCNAME );
}
/* __dbApp( <cNameName>, [<aFields>], ;
[<bFor>], [<bWhile>], [<nNext>], [<nRecord>], [<lRest>], ;
[<cRDD>], [<nConnection>], [<cCodePage>], ;
[<xDelimiter>] ) -> <lSuccess> */
HB_FUNC( __DBAPP )
{
AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer();
@@ -2051,6 +2058,10 @@ HB_FUNC( __DBAPP )
hb_errRT_DBCMD( EG_NOTABLE, EDBCMD_NOTABLE, NULL, "APPEND FROM" );
}
/* __dbCoppy( <cNameName>, [<aFields>], ;
[<bFor>], [<bWhile>], [<nNext>], [<nRecord>], [<lRest>], ;
[<cRDD>], [<nConnection>], [<cCodePage>], ;
[<xDelimiter>] ) -> <lSuccess> */
HB_FUNC( __DBCOPY )
{
AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer();