From b9f7254c8dea873feb0863493f90f6235ac52663 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 7 Mar 2010 10:48:30 +0000 Subject: [PATCH] 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. --- harbour/ChangeLog | 22 ++++++++++++++++++++++ harbour/contrib/hbmysql/tmysql.prg | 30 +++++++++++------------------- harbour/contrib/hbtip/sendmail.prg | 2 +- harbour/contrib/xhb/hblog.prg | 2 +- harbour/contrib/xhb/tframe.prg | 16 +++++++--------- harbour/src/vm/hvm.c | 7 +------ 6 files changed, 43 insertions(+), 36 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 86b451dffc..608fa7ec52 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -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 diff --git a/harbour/contrib/hbmysql/tmysql.prg b/harbour/contrib/hbmysql/tmysql.prg index f2a914b6f5..fd7968660b 100644 --- a/harbour/contrib/hbmysql/tmysql.prg +++ b/harbour/contrib/hbmysql/tmysql.prg @@ -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 diff --git a/harbour/contrib/hbtip/sendmail.prg b/harbour/contrib/hbtip/sendmail.prg index 62853e7e7e..5abddfe375 100644 --- a/harbour/contrib/hbtip/sendmail.prg +++ b/harbour/contrib/hbtip/sendmail.prg @@ -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 diff --git a/harbour/contrib/xhb/hblog.prg b/harbour/contrib/xhb/hblog.prg index 1d538db01e..793e27ef1f 100644 --- a/harbour/contrib/xhb/hblog.prg +++ b/harbour/contrib/xhb/hblog.prg @@ -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 diff --git a/harbour/contrib/xhb/tframe.prg b/harbour/contrib/xhb/tframe.prg index 94b7763d6b..adec612b35 100644 --- a/harbour/contrib/xhb/tframe.prg +++ b/harbour/contrib/xhb/tframe.prg @@ -100,40 +100,38 @@ RETURN Self METHOD StartSet( aRows, aCols, onLoad, onUnload ) CLASS THtmlFrameSet - LOCAL i LOCAL cStr := "" LOCAL cItem cStr += CRLF() + "