From 8b84b0a6ea359b0d86f2e96e5659c031e8d8fe1f Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 25 Apr 2000 22:23:18 +0000 Subject: [PATCH] 20000426-00:22 GMT+1 Victor Szakats --- harbour/ChangeLog | 18 ++++++++++++++++++ harbour/makefile.bc | 4 +++- harbour/source/rtl/transfrm.c | 21 +++++++++++++++++++++ harbour/source/rtl/xsavescr.c | 3 ++- harbour/source/vm/hvm.c | 11 +++-------- 5 files changed, 47 insertions(+), 10 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 47d85fbad6..d76cb6eb80 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,20 @@ +20000426-00:22 GMT+1 Victor Szakats + + * source/rtl/xsavescr.c + * ChangeLog + ! Fixed NOTE and ChangeLog entry + + * makefile.bc + ! -DHB_OBJ_... default switch removed. + + * source/rtl/transform.c + + PF_STRING + + support for @S picture + ! Now five more HBTESTs pass. + + * source/vm/hvm.c + ! windows.h inclusion standardized. + 2000-04-25 17:40 GMT-4 David G. Holm * include/hbcomp.h @@ -101,6 +118,7 @@ * source/rtl/Makefile * makefile.bc * makefile.vc + % __SAVESCREEN()/__RESTSCREEN() rewritten in C. 20000425-03:49 GMT+1 Victor Szakats diff --git a/harbour/makefile.bc b/harbour/makefile.bc index 4f8e5adfb6..5c123f5888 100644 --- a/harbour/makefile.bc +++ b/harbour/makefile.bc @@ -42,6 +42,8 @@ LIB_DIR = lib\b16 !else CC = bcc32 +# NOTE: Using TASM for some reason, this should be normally TASM32. +# I'll leave it to TASM until a better solution is found AS = tasm BIN_DIR = bin\b32 @@ -81,7 +83,7 @@ HBPP_DIR = utils\hbpp # C compiler definition and C flags. These should never have to change. # -CFLAGS = -I$(INCLUDE_DIR) -d $(C_USR) $(CFLAGS) -DHARBOUR_OBJ_GENERATION +CFLAGS = -I$(INCLUDE_DIR) -d $(C_USR) $(CFLAGS) CLIBFLAGS = -c $(CFLAGS) $(CLIBFLAGS) CLIBFLAGSDEBUG = -v $(CLIBFLAGS) HARBOURFLAGS = -i$(INCLUDE_DIR) -n -q0 -w -es2 -gc0 $(PRG_USR) $(HARBOURFLAGS) diff --git a/harbour/source/rtl/transfrm.c b/harbour/source/rtl/transfrm.c index 93b4cbe4e6..6edc0f857e 100644 --- a/harbour/source/rtl/transfrm.c +++ b/harbour/source/rtl/transfrm.c @@ -65,6 +65,7 @@ #define PF_EXCHANG 0x0100 /* @E. Also means exchange . and , */ #define PF_EMPTY 0x0200 /* @Z */ #define PF_NUMDATE 0x0400 /* Internal flag. Ignore decimal dot */ +#define PF_STRING 0x0800 /* @S */ /* PictFunc -> Analyze function flags and return binary flags bits @@ -125,6 +126,9 @@ static USHORT PictFunc( char ** pszPic, ULONG * pulPicLen, ULONG * pulPicStart ) case 'R': uiPicFlags |= PF_REMAIN; break; + case 'S': + uiPicFlags |= PF_STRING; + break; case 'X': uiPicFlags |= PF_DEBIT; break; @@ -360,6 +364,23 @@ HB_FUNC( TRANSFORM ) szResult = ( char * ) hb_xgrab( ulExpLen + ulPicLen ); ulResultPos = 0; + /* [jlalin] */ + if( uiPicFlags & PF_STRING ) + { + char * szPic2 = hb_itemGetCPtr( pPic ); + int ulLen = atol( szPic2 + 2 ); + + if( ulLen & ( ulLen <= ulExpLen ) ) + { + memcpy( szResult, szExp, ulLen ); + szResult[ ulLen ] = '\0'; + ulExpPos = ulLen - 1; + } + + if( uiPicFlags & PF_UPPER ) + hb_strupr( szResult ); + } + /* Support date function for strings */ if( uiPicFlags & PF_DATE ) { diff --git a/harbour/source/rtl/xsavescr.c b/harbour/source/rtl/xsavescr.c index b0936c483e..a3c3f8e301 100644 --- a/harbour/source/rtl/xsavescr.c +++ b/harbour/source/rtl/xsavescr.c @@ -70,7 +70,8 @@ HB_FUNC( __XSAVESCREEN ) } /* NOTE: There's no check about the screen size on restore, so this will - fail if the user has changed the screen resolution before calling it. + fail if the user has changed the screen resolution between calling + save and restore. [vszakats] */ HB_FUNC( __XRESTSCREEN ) diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index 0dabfdbb7e..2d12174656 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -49,8 +49,7 @@ * */ -/* NOTE: Temporary name [vszakats] */ -#ifdef HB_INCLUDE_WINEXCHANDLER +#if defined(HARBOUR_OBJ_GENERATION) || defined(HB_INCLUDE_WINEXCHANDLER) #define HB_OS_WIN_32_USED #endif @@ -69,11 +68,6 @@ #include "hbpcode.h" #include "hbset.h" -#ifdef HB_OS_WIN_32 - /* do not include it on U*ix and pure DOS */ - #include -#endif - typedef struct _SYMBOLS { PHB_SYMB pModuleSymbols; /* pointer to a one module own symbol table */ @@ -4122,4 +4116,5 @@ WINBASEAPI LONG WINAPI UnhandledExceptionFilter( struct _EXCEPTION_POINTERS * Ex return EXCEPTION_EXECUTE_HANDLER; /* EXCEPTION_CONTINUE_SEARCH; */ } -#endif \ No newline at end of file +#endif +