2008-05-29 11:45 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* tests/rto_get.prg
+ Some tests added.
* source/rtl/tget.prg
+ Some notes about C5.x behaviour.
! Formatting/indentation fixes.
% Minor optimizations.
* contrib/xhb/Makefile
* contrib/xhb/common.mak
! Added hbfast.h, hbxml.h
* contrib/hbfimage/fi_winfu.c
* contrib/hbfimage/fi_wrp.c
! Fixed two BCC warnings in new code.
* contrib/hbgd/gdwrp.c
! Changed to generate proper extern references even
for BCC. Now tests compile OK.
The trick was to explicitly #include <windows.h>
before all the other headers, instead of just requesting
it using HB_OS_WIN_32_USED.
* contrib/hbfimage/fi_winfu.c
* contrib/hbfimage/fi_wrp.c
* contrib/hbgd/gdwrp.c
* contrib/hbct/ct.h
* contrib/hbpgsql/postgres.c
- Removed #defining _CLIPDEFS_H. It's only needed when
using Clipper compatibility API headers (*.api, extend.h).
This commit is contained in:
@@ -8,6 +8,38 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2008-05-29 11:45 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
|
||||
* tests/rto_get.prg
|
||||
+ Some tests added.
|
||||
|
||||
* source/rtl/tget.prg
|
||||
+ Some notes about C5.x behaviour.
|
||||
! Formatting/indentation fixes.
|
||||
% Minor optimizations.
|
||||
|
||||
* contrib/xhb/Makefile
|
||||
* contrib/xhb/common.mak
|
||||
! Added hbfast.h, hbxml.h
|
||||
|
||||
* contrib/hbfimage/fi_winfu.c
|
||||
* contrib/hbfimage/fi_wrp.c
|
||||
! Fixed two BCC warnings in new code.
|
||||
|
||||
* contrib/hbgd/gdwrp.c
|
||||
! Changed to generate proper extern references even
|
||||
for BCC. Now tests compile OK.
|
||||
The trick was to explicitly #include <windows.h>
|
||||
before all the other headers, instead of just requesting
|
||||
it using HB_OS_WIN_32_USED.
|
||||
|
||||
* contrib/hbfimage/fi_winfu.c
|
||||
* contrib/hbfimage/fi_wrp.c
|
||||
* contrib/hbgd/gdwrp.c
|
||||
* contrib/hbct/ct.h
|
||||
* contrib/hbpgsql/postgres.c
|
||||
- Removed #defining _CLIPDEFS_H. It's only needed when
|
||||
using Clipper compatibility API headers (*.api, extend.h).
|
||||
|
||||
2008-05-29 03:01 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/contrib/gtwvg/gtwvg.h
|
||||
* harbour/contrib/gtwvg/wvtcore.c
|
||||
|
||||
@@ -56,9 +56,6 @@
|
||||
#ifndef _CT_H
|
||||
#define _CT_H 1
|
||||
|
||||
/* NOTE: we need this to prevent base types redefinition */
|
||||
#define _CLIPDEFS_H
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbapiitm.h"
|
||||
#include "hbapicdp.h"
|
||||
|
||||
@@ -50,15 +50,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* See doc/license files for licensing terms.
|
||||
*
|
||||
*/
|
||||
|
||||
/* NOTE: we need this to prevent base types redefinition */
|
||||
#define _CLIPDEFS_H
|
||||
|
||||
#define HB_OS_WIN_32_USED
|
||||
|
||||
#include "hbapi.h"
|
||||
@@ -66,7 +57,6 @@
|
||||
#include "hbstack.h"
|
||||
#include "hbapierr.h"
|
||||
#include "hbapifs.h"
|
||||
//#include "hrbdll.h"
|
||||
#include "hbvm.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@@ -76,6 +66,7 @@
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "FreeImage.h"
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
@@ -50,9 +50,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* NOTE: we need this to prevent base types redefinition */
|
||||
#define _CLIPDEFS_H
|
||||
|
||||
#define HB_OS_WIN_32_USED
|
||||
|
||||
#include "hbapi.h"
|
||||
@@ -60,7 +57,6 @@
|
||||
#include "hbstack.h"
|
||||
#include "hbapierr.h"
|
||||
#include "hbapifs.h"
|
||||
//#include "hrbdll.h"
|
||||
#include "hbvm.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@@ -70,6 +66,7 @@
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "FreeImage.h"
|
||||
|
||||
/* ************************* WRAPPED FUNCTIONS ****************************** */
|
||||
@@ -374,7 +371,7 @@ HB_FUNC( FI_LOADFROMMEM )
|
||||
|
||||
/* Retrieve parameters */
|
||||
fif = (FREE_IMAGE_FORMAT) hb_parni( 1 );
|
||||
szImage = hb_parcx( 2 );
|
||||
szImage = ( BYTE * ) hb_parcx( 2 );
|
||||
flags = hb_parni( 3 );
|
||||
|
||||
/* run function */
|
||||
@@ -903,7 +900,7 @@ HB_FUNC( FI_GETFILETYPEFROMMEM )
|
||||
int size;
|
||||
|
||||
/* Retrieve parameters */
|
||||
szImage = hb_parcx( 1 );
|
||||
szImage = ( BYTE * ) hb_parcx( 1 );
|
||||
stream = FreeImage_OpenMemory( szImage, hb_parclen(1) );
|
||||
size = ( hb_parinfo( 2 ) & HB_IT_NUMERIC ? hb_parni( 1 ) : 0 );
|
||||
|
||||
|
||||
@@ -50,11 +50,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* NOTE: we need this to prevent base types redefinition */
|
||||
#define _CLIPDEFS_H
|
||||
|
||||
#define HB_OS_WIN_32_USED
|
||||
|
||||
/* NOTE: We need this to generate proper extern references. */
|
||||
#if defined(HB_OS_WIN_32_USED)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbapiitm.h"
|
||||
#include "hbstack.h"
|
||||
@@ -68,6 +70,7 @@
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "gd.h"
|
||||
#include "gdfontt.h"
|
||||
#include "gdfonts.h"
|
||||
|
||||
@@ -50,8 +50,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#define _CLIPDEFS_H
|
||||
|
||||
#define HB_OS_WIN_32_USED
|
||||
|
||||
#include "hbapi.h"
|
||||
|
||||
@@ -21,6 +21,8 @@ C_SOURCES=\
|
||||
C_HEADERS=\
|
||||
hbcompat.h \
|
||||
hbcomprs.h \
|
||||
hbfast.h \
|
||||
hbxml.h \
|
||||
|
||||
PRG_SOURCES=\
|
||||
txml.prg \
|
||||
|
||||
@@ -9,6 +9,8 @@ LIB_PATH = $(LIB_DIR)$(LIBNAME)$(LIBEXT)
|
||||
C_HEADERS = \
|
||||
hbcompat.h \
|
||||
hbcomprs.h \
|
||||
hbfast.h \
|
||||
hbxml.h \
|
||||
|
||||
PRG_HEADERS = \
|
||||
classex.ch \
|
||||
|
||||
@@ -593,7 +593,7 @@ METHOD unTransform() CLASS Get
|
||||
ENDIF
|
||||
NEXT
|
||||
ELSE
|
||||
IF "E" $ ::cPicFunc
|
||||
IF "E" $ ::cPicFunc
|
||||
cBuffer := Left( cBuffer, ::FirstEditable() - 1 ) +;
|
||||
StrTran( StrTran( SubStr( cBuffer, ::FirstEditable(), ::LastEditable() - ::FirstEditable() + 1 ), ".", " " ), ",", "." ) +;
|
||||
SubStr( cBuffer, ::LastEditable() + 1 )
|
||||
@@ -603,20 +603,20 @@ METHOD unTransform() CLASS Get
|
||||
SubStr( cBuffer, ::LastEditable() + 1 )
|
||||
ENDIF
|
||||
|
||||
lHasDec := .F.
|
||||
FOR nFor := ::FirstEditable() TO ::LastEditable()
|
||||
IF ::IsEditable( nFor )
|
||||
IF lHasDec .AND. SubStr( cBuffer, nFor, 1 ) == " "
|
||||
cBuffer := Left( cBuffer, nFor - 1 ) + "0" + SubStr( cBuffer, nFor + 1 )
|
||||
ENDIF
|
||||
ELSE
|
||||
IF SubStr( cBuffer, nFor, 1 ) == "."
|
||||
lHasDec := .T.
|
||||
ELSE
|
||||
cBuffer := Left( cBuffer, nFor - 1 ) + Chr( 1 ) + SubStr( cBuffer, nFor + 1 )
|
||||
ENDIF
|
||||
lHasDec := .F.
|
||||
FOR nFor := ::FirstEditable() TO ::LastEditable()
|
||||
IF ::IsEditable( nFor )
|
||||
IF lHasDec .AND. SubStr( cBuffer, nFor, 1 ) == " "
|
||||
cBuffer := Left( cBuffer, nFor - 1 ) + "0" + SubStr( cBuffer, nFor + 1 )
|
||||
ENDIF
|
||||
NEXT
|
||||
ELSE
|
||||
IF SubStr( cBuffer, nFor, 1 ) == "."
|
||||
lHasDec := .T.
|
||||
ELSE
|
||||
cBuffer := Left( cBuffer, nFor - 1 ) + Chr( 1 ) + SubStr( cBuffer, nFor + 1 )
|
||||
ENDIF
|
||||
ENDIF
|
||||
NEXT
|
||||
ENDIF
|
||||
|
||||
cBuffer := StrTran( cBuffer, Chr( 1 ), "" )
|
||||
@@ -671,6 +671,9 @@ METHOD unTransform() CLASS Get
|
||||
|
||||
RETURN xValue
|
||||
|
||||
/* NOTE: CA-Cl*pper will corrupt memory if cChar contains
|
||||
multiple chars. [vszakats] */
|
||||
|
||||
METHOD overStrike( cChar ) CLASS Get
|
||||
|
||||
IF ::hasFocus
|
||||
@@ -719,9 +722,12 @@ METHOD overStrike( cChar ) CLASS Get
|
||||
|
||||
RETURN Self
|
||||
|
||||
/* NOTE: CA-Cl*pper will corrupt memory if cChar contains
|
||||
multiple chars. [vszakats] */
|
||||
|
||||
METHOD insert( cChar ) CLASS Get
|
||||
|
||||
LOCAL n
|
||||
LOCAL nFor
|
||||
LOCAL nMaxEdit
|
||||
|
||||
IF ::hasFocus
|
||||
@@ -762,12 +768,12 @@ METHOD insert( cChar ) CLASS Get
|
||||
|
||||
IF ::lPicComplex
|
||||
/* Calculating different nMaxEdit for ::lPicComplex */
|
||||
FOR n := ::nPos TO nMaxEdit
|
||||
IF !::IsEditable( n )
|
||||
FOR nFor := ::nPos TO nMaxEdit
|
||||
IF !::IsEditable( nFor )
|
||||
EXIT
|
||||
ENDIF
|
||||
NEXT
|
||||
nMaxEdit := n
|
||||
nMaxEdit := nFor
|
||||
::cBuffer := Left( SubStr( ::cBuffer, 1, ::nPos - 1 ) + cChar +;
|
||||
SubStr( ::cBuffer, ::nPos, nMaxEdit - 1 - ::nPos ) +;
|
||||
SubStr( ::cBuffer, nMaxEdit ), ::nMaxLen )
|
||||
@@ -1143,7 +1149,6 @@ METHOD pos( nPos ) CLASS Get
|
||||
|
||||
METHOD picture( cPicture ) CLASS Get
|
||||
|
||||
LOCAL cChar
|
||||
LOCAL nAt
|
||||
LOCAL nFor
|
||||
LOCAL cNum
|
||||
@@ -1151,12 +1156,11 @@ METHOD picture( cPicture ) CLASS Get
|
||||
IF PCount() > 0
|
||||
|
||||
IF cPicture != NIL
|
||||
|
||||
|
||||
::cPicture := cPicture
|
||||
::nPicLen := NIL
|
||||
::cPicFunc := ""
|
||||
::cPicMask := ""
|
||||
::lPicComplex := .F.
|
||||
::lPicBlankZero := .F.
|
||||
|
||||
IF ISCHARACTER( cPicture )
|
||||
@@ -1210,7 +1214,7 @@ METHOD picture( cPicture ) CLASS Get
|
||||
::cPicFunc := ""
|
||||
ENDIF
|
||||
ELSE
|
||||
::cPicMask := cPicture
|
||||
::cPicMask := cPicture
|
||||
ENDIF
|
||||
|
||||
IF ::cType == "D"
|
||||
@@ -1255,10 +1259,10 @@ METHOD picture( cPicture ) CLASS Get
|
||||
|
||||
/* To verify if it has non-modifiable embedded characters in the group. */
|
||||
|
||||
::lPicComplex := .F.
|
||||
IF ! Empty( ::cPicMask )
|
||||
FOR nFor := 1 TO Len( ::cPicMask )
|
||||
cChar := SubStr( ::cPicMask, nFor, 1 )
|
||||
IF !( cChar $ "!ANX9#" )
|
||||
IF !( SubStr( ::cPicMask, nFor, 1 ) $ "!ANX9#" )
|
||||
::lPicComplex := .T.
|
||||
EXIT
|
||||
ENDIF
|
||||
|
||||
@@ -283,59 +283,43 @@ FUNCTION Main( cArg01, cArg02, cArg03, cArg04 )
|
||||
o:display()
|
||||
o:setFocus()
|
||||
TGetTOVS( o, "1231234123456" )
|
||||
/*
|
||||
TEST_LINE( o:OverStrike( "1" ) )
|
||||
TEST_LINE( o:OverStrike( "2" ) )
|
||||
TEST_LINE( o:OverStrike( "3" ) )
|
||||
TEST_LINE( o:OverStrike( "1" ) )
|
||||
TEST_LINE( o:OverStrike( "2" ) )
|
||||
TEST_LINE( o:OverStrike( "3" ) )
|
||||
TEST_LINE( o:OverStrike( "4" ) )
|
||||
TEST_LINE( o:OverStrike( "1" ) )
|
||||
TEST_LINE( o:OverStrike( "2" ) )
|
||||
TEST_LINE( o:OverStrike( "3" ) )
|
||||
TEST_LINE( o:OverStrike( "4" ) )
|
||||
TEST_LINE( o:OverStrike( "5" ) )
|
||||
TEST_LINE( o:OverStrike( "6" ) )
|
||||
*/
|
||||
TEST_LINE( o:Assign() )
|
||||
|
||||
cStr07 := Space(10)
|
||||
SetPos( 14, 16 ) ; o := _GET_( cStr07, "cStr07", "@R 999 9999 999999",, )
|
||||
o:display()
|
||||
o:setFocus()
|
||||
TEST_LINE( o:OverStrike( "1" ) )
|
||||
TEST_LINE( o:OverStrike( "2" ) )
|
||||
TEST_LINE( o:OverStrike( "3" ) )
|
||||
TEST_LINE( o:OverStrike( "1" ) )
|
||||
TEST_LINE( o:OverStrike( "2" ) )
|
||||
TEST_LINE( o:OverStrike( "3" ) )
|
||||
TEST_LINE( o:OverStrike( "4" ) )
|
||||
TEST_LINE( o:OverStrike( "1" ) )
|
||||
TEST_LINE( o:OverStrike( "2" ) )
|
||||
TEST_LINE( o:OverStrike( "3" ) )
|
||||
TEST_LINE( o:OverStrike( "4" ) )
|
||||
TEST_LINE( o:OverStrike( "5" ) )
|
||||
TEST_LINE( o:OverStrike( "6" ) )
|
||||
TGetTOVS( o, "1231234123456" )
|
||||
TEST_LINE( o:Assign() )
|
||||
|
||||
cStr07 := Space(10)
|
||||
SetPos( 14, 16 ) ; o := _GET_( cStr07, "cStr07", "@R 999 9999 999999",, )
|
||||
o:display()
|
||||
o:setFocus()
|
||||
TEST_LINE( o:OverStrike( "1" ) )
|
||||
TEST_LINE( o:OverStrike( "2" ) )
|
||||
TEST_LINE( o:OverStrike( "3" ) )
|
||||
TEST_LINE( o:OverStrike( "1" ) )
|
||||
TEST_LINE( o:OverStrike( "2" ) )
|
||||
TEST_LINE( o:OverStrike( "3" ) )
|
||||
TEST_LINE( o:OverStrike( "4" ) )
|
||||
TEST_LINE( o:OverStrike( "1" ) )
|
||||
TEST_LINE( o:OverStrike( "2" ) )
|
||||
TEST_LINE( o:OverStrike( "3" ) )
|
||||
TEST_LINE( o:OverStrike( "4" ) )
|
||||
TEST_LINE( o:OverStrike( "5" ) )
|
||||
TEST_LINE( o:OverStrike( "6" ) )
|
||||
TGetTOVS( o, "1231234123456" )
|
||||
TEST_LINE( o:Assign() )
|
||||
|
||||
// ;
|
||||
|
||||
cStr07 := Space(10)
|
||||
SetPos( 14, 16 ) ; o := _GET_( cStr07, "cStr07", "@ER 999 9999 999999",, )
|
||||
o:display()
|
||||
o:setFocus()
|
||||
TGetTOVS( o, "1231234123456" )
|
||||
TEST_LINE( o:Assign() )
|
||||
|
||||
cStr07 := Space(10)
|
||||
SetPos( 14, 16 ) ; o := _GET_( cStr07, "cStr07", "@ER 999 9999 999999",, )
|
||||
o:display()
|
||||
o:setFocus()
|
||||
TGetTOVS( o, "1231234123456" )
|
||||
TEST_LINE( o:Assign() )
|
||||
|
||||
cStr07 := Space(10)
|
||||
SetPos( 14, 16 ) ; o := _GET_( cStr07, "cStr07", "@ER 999 9999 999999",, )
|
||||
o:display()
|
||||
o:setFocus()
|
||||
TGetTOVS( o, "1231234123456" )
|
||||
TEST_LINE( o:Assign() )
|
||||
|
||||
// ; Edmer #2
|
||||
@@ -344,11 +328,16 @@ FUNCTION Main( cArg01, cArg02, cArg03, cArg04 )
|
||||
SetPos( 14, 16 ) ; o := _GET_( nInt02, "nInt02", "9,999,999.99",, )
|
||||
o:display()
|
||||
o:setFocus()
|
||||
TEST_LINE( o:OverStrike( "1" ) )
|
||||
TEST_LINE( o:OverStrike( "2" ) )
|
||||
TEST_LINE( o:OverStrike( "3" ) )
|
||||
TEST_LINE( o:OverStrike( "4" ) )
|
||||
TEST_LINE( o:OverStrike( "5" ) )
|
||||
TGetTOVS( o, "12345" )
|
||||
TEST_LINE( o:Assign() )
|
||||
|
||||
// ;
|
||||
|
||||
nInt02 := 0
|
||||
SetPos( 14, 16 ) ; o := _GET_( nInt02, "nInt02", "@E 9,999,999.9999",, )
|
||||
o:display()
|
||||
o:setFocus()
|
||||
TGetTOVS( o, "12345" )
|
||||
TEST_LINE( o:Assign() )
|
||||
|
||||
// ;
|
||||
@@ -588,19 +577,18 @@ FUNCTION Main( cArg01, cArg02, cArg03, cArg04 )
|
||||
|
||||
SET CENTURY ON
|
||||
|
||||
#ifdef NULL
|
||||
SetPos( 14, 16 ) ; dDate01 := hb_SToD( "20070425" )
|
||||
o := _GET_( dDate01, "dDate01" )
|
||||
TEST_LINE( OBJ_CREATE() )
|
||||
TEST_LINE( o:SetFocus() )
|
||||
TEST_LINE( o:OverStrike("12345678") )
|
||||
TGetTOVS( o, "12345678" )
|
||||
TEST_LINE( o:KillFocus() )
|
||||
|
||||
SetPos( 14, 16 ) ; dDate01 := hb_SToD( "20070425" )
|
||||
o := _GET_( dDate01, "dDate01", "@E" )
|
||||
TEST_LINE( OBJ_CREATE() )
|
||||
TEST_LINE( o:SetFocus() )
|
||||
TEST_LINE( o:OverStrike("12345678") )
|
||||
TGetTOVS( o, "12345678" )
|
||||
TEST_LINE( o:KillFocus() )
|
||||
|
||||
SET CENTURY OFF
|
||||
@@ -609,44 +597,43 @@ FUNCTION Main( cArg01, cArg02, cArg03, cArg04 )
|
||||
o := _GET_( dDate01, "dDate01" )
|
||||
TEST_LINE( OBJ_CREATE() )
|
||||
TEST_LINE( o:SetFocus() )
|
||||
TEST_LINE( o:OverStrike("12345678") )
|
||||
TGetTOVS( o, "12345678" )
|
||||
TEST_LINE( o:KillFocus() )
|
||||
|
||||
SetPos( 14, 16 ) ; dDate01 := hb_SToD( "20070425" )
|
||||
o := _GET_( dDate01, "dDate01", "@E" )
|
||||
TEST_LINE( OBJ_CREATE() )
|
||||
TEST_LINE( o:SetFocus() )
|
||||
TEST_LINE( o:OverStrike("12345678") )
|
||||
TGetTOVS( o, "12345678" )
|
||||
TEST_LINE( o:KillFocus() )
|
||||
|
||||
SetPos( 14, 16 ) ; cStr01 := "hello world"
|
||||
o := _GET_( cStr01, "cStr01", "!!LY!!!!!!" )
|
||||
TEST_LINE( OBJ_CREATE() )
|
||||
TEST_LINE( o:SetFocus() )
|
||||
TEST_LINE( o:OverStrike("12345678") )
|
||||
TGetTOVS( o, "12345678" )
|
||||
TEST_LINE( o:KillFocus() )
|
||||
|
||||
SetPos( 14, 16 ) ; cStr01 := "hello world"
|
||||
o := _GET_( cStr01, "cStr01", "!!!.!!!!!!" )
|
||||
TEST_LINE( OBJ_CREATE() )
|
||||
TEST_LINE( o:SetFocus() )
|
||||
TEST_LINE( o:OverStrike("12345678") )
|
||||
TGetTOVS( o, "12345678" )
|
||||
TEST_LINE( o:KillFocus() )
|
||||
|
||||
SetPos( 14, 16 ) ; cStr01 := "hello world"
|
||||
o := _GET_( cStr01, "cStr01", "@R !!LY!!!!!!" )
|
||||
TEST_LINE( OBJ_CREATE() )
|
||||
TEST_LINE( o:SetFocus() )
|
||||
TEST_LINE( o:OverStrike("12345678") )
|
||||
TGetTOVS( o, "12345678" )
|
||||
TEST_LINE( o:KillFocus() )
|
||||
|
||||
SetPos( 14, 16 ) ; cStr01 := "hello world"
|
||||
o := _GET_( cStr01, "cStr01", "@R !!!.!!!!!!" )
|
||||
TEST_LINE( OBJ_CREATE() )
|
||||
TEST_LINE( o:SetFocus() )
|
||||
TEST_LINE( o:OverStrike("12345678") )
|
||||
TGetTOVS( o, "12345678" )
|
||||
TEST_LINE( o:KillFocus() )
|
||||
#endif
|
||||
|
||||
// ; Exercises
|
||||
|
||||
|
||||
Reference in New Issue
Block a user