2010-05-05 08:02 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* src/rtl/achoice.prg
    ! Added patch by Jerry Finuliar to fine tune cursor
      positioning behavior.

  * contrib/hbmysql/mysql.c
    + Added MYSQL_REAL_ESCAPE_STRING() function.
    ! Fixed some types to be in sync with actual MYSQL implementation
      (int -> unsigned int, int -> unsigned long)
      in MYSQL_ESCAPE_STRING(), MYSQL_ESCAPE_STRING_FROM_FILE(),
      MYSQL_FETCH_ROW() functions.

  * utils/hbmk2/hbmk2.prg
    + Added comment on dbfnsx lib availability in xhb.
This commit is contained in:
Viktor Szakats
2010-05-05 06:06:26 +00:00
parent 29f66e8c29
commit 2f5d29aff5
4 changed files with 62 additions and 25 deletions

View File

@@ -17,6 +17,21 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-05-05 08:02 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/achoice.prg
! Added patch by Jerry Finuliar to fine tune cursor
positioning behavior.
* contrib/hbmysql/mysql.c
+ Added MYSQL_REAL_ESCAPE_STRING() function.
! Fixed some types to be in sync with actual MYSQL implementation
(int -> unsigned int, int -> unsigned long)
in MYSQL_ESCAPE_STRING(), MYSQL_ESCAPE_STRING_FROM_FILE(),
MYSQL_FETCH_ROW() functions.
* utils/hbmk2/hbmk2.prg
+ Added comment on dbfnsx lib availability in xhb.
2010-05-04 18:54 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbqt/doc/en/class_hbqplaintextedit.txt
* contrib/hbqt/hbqt_hbqplaintextedit.cpp
@@ -24,8 +39,8 @@
* contrib/hbqt/qtgui/HBQPlainTextEdit.cpp
* contrib/hbqt/qtgui/THBQPlainTextEdit.prg
* contrib/hbqt/qth/HBQPlainTextEdit.qth
+ Started: basework for different kinds of block copy/paste/move/etc
operations. Nothing is final yet but hope it to be ready
+ Started: basework for different kinds of block copy/paste/move/etc
operations. Nothing is final yet but hope it to be ready
within a day or two.
2010-05-04 08:02 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
@@ -51,18 +66,18 @@
* contrib/hbqt/hbqt_hbqplaintextedit.cpp
* contrib/hbqt/hbqt_hbqplaintextedit.h
* contrib/hbide/ideeditor.prg
* contrib/hbide/ideshortcuts.prg
+ Implemented: persistent blocks and cut/copy/paste operations
+ Implemented: persistent blocks and cut/copy/paste operations
across files and locations within the same file.
Persistance: block remains intact untill another block marking
operation is initiated. Any other editing actions can be carried
as normal outside of the block boundaries. One block per source is
permitted.
Persistance: block remains intact untill another block marking
operation is initiated. Any other editing actions can be carried
as normal outside of the block boundaries. One block per source is
permitted.
Keyboard Mappings can be redefined for
Keyboard Mappings can be redefined for
CTRL+ X.Cut C.Copy V.Paste Z.Undo Y.Redo A.SelectAll
Those macros will be honored in block cut/copy/paste actions as well.
@@ -77,7 +92,7 @@
* contrib/hbide/ideshortcuts.prg
* contrib/hbide/idethemes.prg
+ Implemented: almost all menu/toolbar actions to public API.
Probably this will allow the user to configure hbIDE to
Probably this will allow the user to configure hbIDE to
the behavior he is used to.
+ Implemented: close button on the right-hand corner of editing tabs.
@@ -85,7 +100,7 @@
+ Added: more Harbour keywords to color engine, OR, AND, SELF.
! Included: some more options in the main menu which were
! Included: some more options in the main menu which were
available on toolbars only.
! Cleaned some redundant code.

View File

@@ -341,14 +341,14 @@ HB_FUNC( MYSQL_FETCH_ROW ) /* MYSQL_ROW * mysql_fetch_row( MYSQL_RES * ) */
if( mresult )
{
int num_fields = mysql_num_fields( mresult );
unsigned int num_fields = mysql_num_fields( mresult );
PHB_ITEM aRow = hb_itemArrayNew( num_fields );
MYSQL_ROW mrow = mysql_fetch_row( mresult );
if( mrow )
{
unsigned long * lengths = mysql_fetch_lengths( mresult );
int i;
unsigned int i;
for( i = 0; i < num_fields; ++i )
hb_arraySetCL( aRow, i + 1, mrow[ i ], lengths[ i ] );
}
@@ -550,23 +550,39 @@ HB_FUNC( MYSQL_INSERT_ID )
hb_errRT_BASE( EG_ARG, 2020, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
HB_FUNC( MYSQL_REAL_ESCAPE_STRING ) /* unsigned long STDCALL mysql_real_escape_string( MYSQL * mysql, char * to, const char * from, unsigned long length ); */
{
MYSQL * mysql = hb_MYSQL_par( 1 );
if( mysql )
{
const char * from = hb_parcx( 1 );
unsigned long nSize = hb_parclen( 1 );
char * buffer = ( char * ) hb_xgrab( nSize * 2 + 1 );
nSize = mysql_real_escape_string( mysql, buffer, from, nSize );
hb_retclen_buffer( ( char * ) buffer, nSize );
}
else
hb_errRT_BASE( EG_ARG, 2020, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
HB_FUNC( MYSQL_ESCAPE_STRING )
{
const char * from = hb_parcx( 1 );
int iSize = hb_parclen( 1 );
char * buffer = ( char * ) hb_xgrab( iSize * 2 + 1 );
iSize = mysql_escape_string( buffer, from, iSize );
hb_retclen_buffer( ( char * ) buffer, iSize );
unsigned long nSize = hb_parclen( 1 );
char * buffer = ( char * ) hb_xgrab( nSize * 2 + 1 );
nSize = mysql_escape_string( buffer, from, nSize );
hb_retclen_buffer( ( char * ) buffer, nSize );
}
static char * filetoBuff( const char * fname, int * size )
static char * filetoBuff( const char * fname, unsigned long * size )
{
char * buffer = NULL;
HB_FHANDLE handle = hb_fsOpen( fname, FO_READWRITE );
if( handle != FS_ERROR )
{
*size = ( int ) hb_fsSeek( handle, 0, FS_END );
*size = ( unsigned long ) hb_fsSeekLarge( handle, 0, FS_END );
hb_fsSeek( handle, 0, FS_SET );
buffer = ( char * ) hb_xgrab( *size + 1 );
*size = hb_fsReadLarge( handle, buffer, *size );
@@ -581,14 +597,14 @@ static char * filetoBuff( const char * fname, int * size )
HB_FUNC( MYSQL_ESCAPE_STRING_FROM_FILE )
{
int iSize;
char * from = filetoBuff( hb_parc( 1 ), &iSize );
unsigned long nSize;
char * from = filetoBuff( hb_parc( 1 ), &nSize );
if( from )
{
char * buffer = ( char * ) hb_xgrab( iSize * 2 + 1 );
iSize = mysql_escape_string( buffer, from, iSize );
hb_retclen_buffer( buffer, iSize );
char * buffer = ( char * ) hb_xgrab( nSize * 2 + 1 );
nSize = mysql_escape_string( buffer, from, nSize );
hb_retclen_buffer( buffer, nSize );
hb_xfree( from );
}
}

View File

@@ -624,7 +624,9 @@ STATIC PROCEDURE DispLine( cLine, nRow, nCol, lSelect, lHiLite, nNumCols )
iif( lHiLite, CLR_ENHANCED, CLR_STANDARD ), CLR_UNSELECTED ) )
hb_dispOutAt( nRow, nCol, iif( ISCHARACTER( cLine ), PadR( cLine, nNumCols ), Space( nNumCols ) ) )
SetPos( nRow, nCol )
IF lHiLite
SetPos( nRow, nCol )
ENDIF
ColorSelect( CLR_STANDARD )

View File

@@ -998,6 +998,10 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
aLIB_BASE_3_MT := { "macromt", "pp", "common" }
cLIB_BASE_PCRE := "pcrepos"
cLIB_BASE_ZLIB := "zlib"
/* NOTE: 'dbfnsx' was added to xhb on 2009-01-08. We chose to prioritize
on newer xhb versions, so for older versions, a dummy lib should
be created. [vszakats] */
ENDIF
nCCompVer := Val( GetEnv( "HB_COMPILER_VER" ) ) /* Format: <09><00>[.<00>] = <major><minor>[.<revision>] */