2010-03-07 11:47 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/hvm.c
! Adjustment to symEval declaration after last change.
* contrib/hbmysql/tmysql.prg
! Fixed CLIPVALUE2SQL() to return NULL for NIL
values. Should fix sf.bet bug #2964744.
% Optimized CLIPVALUE2SQL().
* contrib/xhb/tframe.prg
! Fixed HB_ENUMINDEX() to :__enumIndex().
% Minor optimization.
* Some formatting.
* contrib/xhb/hblog.prg
! Fixed HB_ENUMINDEX() to :__enumIndex().
* contrib/hbtip/sendmail.prg
! Fixed mime type spec: "text/plain;filename=" -> "text/plain; name="
; Latter two suggested by Lorenzo.
This commit is contained in:
@@ -17,6 +17,28 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-03-07 11:47 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/vm/hvm.c
|
||||
! Adjustment to symEval declaration after last change.
|
||||
|
||||
* contrib/hbmysql/tmysql.prg
|
||||
! Fixed CLIPVALUE2SQL() to return NULL for NIL
|
||||
values. Should fix sf.bet bug #2964744.
|
||||
% Optimized CLIPVALUE2SQL().
|
||||
|
||||
* contrib/xhb/tframe.prg
|
||||
! Fixed HB_ENUMINDEX() to :__enumIndex().
|
||||
% Minor optimization.
|
||||
* Some formatting.
|
||||
|
||||
* contrib/xhb/hblog.prg
|
||||
! Fixed HB_ENUMINDEX() to :__enumIndex().
|
||||
|
||||
* contrib/hbtip/sendmail.prg
|
||||
! Fixed mime type spec: "text/plain;filename=" -> "text/plain; name="
|
||||
|
||||
; Latter two suggested by Lorenzo.
|
||||
|
||||
2010-03-07 10:57 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbapi.h
|
||||
* small cleanup in marking hb_symEval with HB_LEGACY_LEVEL3
|
||||
|
||||
@@ -1685,40 +1685,32 @@ METHOD TableStruct( cTable ) CLASS TMySQLServer
|
||||
// Returns an SQL string with clipper value converted ie. Date() -> "'YYYY-MM-DD'"
|
||||
STATIC FUNCTION ClipValue2SQL( Value )
|
||||
|
||||
LOCAL cValue
|
||||
|
||||
SWITCH ValType( Value )
|
||||
CASE "N"
|
||||
cValue := hb_NToS( Value )
|
||||
EXIT
|
||||
RETURN hb_NToS( Value )
|
||||
|
||||
CASE "D"
|
||||
IF ! Empty( Value )
|
||||
/* MySQL dates are like YYYY-MM-DD */
|
||||
cValue := "'" + StrZero( Year( Value ), 4 ) + "-" + StrZero( Month( Value ), 2 ) + "-" + StrZero( Day( Value ), 2 ) + "'"
|
||||
IF Empty( Value )
|
||||
RETURN "''"
|
||||
ELSE
|
||||
cValue := "''"
|
||||
/* MySQL dates are like YYYY-MM-DD */
|
||||
RETURN "'" + StrZero( Year( Value ), 4 ) + "-" + StrZero( Month( Value ), 2 ) + "-" + StrZero( Day( Value ), 2 ) + "'"
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE "C"
|
||||
CASE "M"
|
||||
IF Empty( Value )
|
||||
cValue := "''"
|
||||
RETURN "''"
|
||||
ELSE
|
||||
cValue := "'"
|
||||
Value := mysql_escape_string( value )
|
||||
cValue += value + "'"
|
||||
RETURN "'" + mysql_escape_string( value ) + "'"
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE "L"
|
||||
cValue := iif( Value, "1", "0" )
|
||||
EXIT
|
||||
RETURN iif( Value, "1", "0" )
|
||||
|
||||
OTHERWISE
|
||||
cValue := "''" // NOTE: Here we lose values we cannot convert
|
||||
CASE "U"
|
||||
RETURN "NULL"
|
||||
|
||||
ENDSWITCH
|
||||
|
||||
RETURN cValue
|
||||
RETURN "''" // NOTE: Here we lose values we cannot convert
|
||||
|
||||
@@ -656,4 +656,4 @@ FUNCTION hb_SetMimeType( cFile, cFname, cFext )
|
||||
CASE ( cFile LIKE ".+\.vrt" ); RETURN "x-world/x-vrt=" + cFname + cFext
|
||||
ENDCASE
|
||||
|
||||
RETURN "text/plain;filename=" + cFname + cFext
|
||||
RETURN "text/plain; name=" + cFname + cFext
|
||||
|
||||
@@ -462,7 +462,7 @@ METHOD PROCEDURE Out( ... ) CLASS HB_LogConsole
|
||||
LOCAL nLen := Len( hb_aParams() )
|
||||
FOR EACH xPar IN hb_aParams()
|
||||
cMsg += hb_CStr( xPar )
|
||||
IF HB_EnumIndex() < nLen
|
||||
IF xPar:__EnumIndex() < nLen
|
||||
cMsg += " "
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
@@ -100,40 +100,38 @@ RETURN Self
|
||||
|
||||
METHOD StartSet( aRows, aCols, onLoad, onUnload ) CLASS THtmlFrameSet
|
||||
|
||||
LOCAL i
|
||||
LOCAL cStr := ""
|
||||
LOCAL cItem
|
||||
|
||||
cStr += CRLF() + " <FRAMESET "
|
||||
|
||||
IF aRows != NIL .and. Valtype( aRows ) == "A" .and. !Empty( aRows )
|
||||
IF aRows != NIL .AND. Valtype( aRows ) == "A" .AND. !Empty( aRows )
|
||||
|
||||
cStr += ' rows="'
|
||||
|
||||
FOR EACH cItem in aRows
|
||||
i:=HB_ENUMINDEX()
|
||||
|
||||
IF i < Len( aRows )
|
||||
IF cItem:__enumIndex() < Len( aRows )
|
||||
cStr += cItem + ","
|
||||
ELSE
|
||||
cStr += cItem
|
||||
ENDIF
|
||||
|
||||
NEXT
|
||||
|
||||
cStr += '"'
|
||||
ENDIF
|
||||
|
||||
IF aCols != NIL .and. Valtype( aCols ) == "A" .and. !Empty( aCols )
|
||||
IF aCols != NIL .AND. Valtype( aCols ) == "A" .AND. !Empty( aCols )
|
||||
|
||||
cStr += ' cols="'
|
||||
|
||||
FOR EACH cItem IN aCols
|
||||
i:=hb_enumindex()
|
||||
IF i < Len( aCols )
|
||||
|
||||
IF cItem:__enumIndex() < Len( aCols )
|
||||
cStr += cItem + ","
|
||||
ELSE
|
||||
cStr += cItem
|
||||
ENDIF
|
||||
|
||||
NEXT
|
||||
|
||||
cStr += '"'
|
||||
|
||||
@@ -259,12 +259,7 @@ static const char * s_vm_pszLinkedMain = NULL; /* name of startup function set b
|
||||
|
||||
/* virtual machine state */
|
||||
|
||||
#ifdef HB_LEGACY_LEVEL3
|
||||
HB_SYMB hb_symEval = { "EVAL", {HB_FS_PUBLIC}, {hb_vmDoBlock}, NULL }; /* symbol to evaluate codeblocks */
|
||||
#else
|
||||
/* TODO: Rename to s_symEval. */
|
||||
static HB_SYMB hb_symEval = { "EVAL", {HB_FS_PUBLIC}, {hb_vmDoBlock}, NULL }; /* symbol to evaluate codeblocks */
|
||||
#endif
|
||||
HB_SYMB hb_symEval = { "EVAL", { HB_FS_PUBLIC }, { hb_vmDoBlock }, NULL }; /* symbol to evaluate codeblocks */
|
||||
|
||||
static HB_BOOL s_fHVMActive = HB_FALSE; /* is HVM ready for PCODE executing */
|
||||
static HB_BOOL s_fDoExitProc = HB_TRUE; /* execute EXIT procedures */
|
||||
|
||||
Reference in New Issue
Block a user