c3e1436da04df92aeaee308282ff7c7aaeebfb7d
116 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c3e1436da0 |
2009-06-26 02:22 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbvm.h
* harbour/include/hbrdddbf.h
* harbour/include/hbapidbg.h
* harbour/include/hbset.h
* harbour/include/hbcomp.h
* harbour/include/hbapirdd.h
* harbour/include/hbstack.h
* harbour/include/hbsxfunc.h
* harbour/include/hbapilng.h
* harbour/include/hbgtcore.h
* harbour/include/hbapifs.h
* harbour/include/hbdbsort.h
* harbour/include/hbapigt.h
* harbour/include/hbapi.h
* harbour/include/hbapierr.h
* harbour/include/hbapiitm.h
* harbour/include/hbrddfpt.h
* harbour/contrib/hbmysql/mysql.c
* harbour/contrib/hbct/bitnum.c
* harbour/contrib/hbct/token2.c
* harbour/contrib/hbct/charsprd.c
* harbour/contrib/hbct/ctnet.c
* harbour/contrib/hbct/charonly.c
* harbour/contrib/hbct/atadjust.c
* harbour/contrib/hbct/ctwin.c
* harbour/contrib/hbct/charsort.c
* harbour/contrib/hbct/ctwin.h
* harbour/contrib/hbct/charmix.c
* harbour/contrib/hbct/charevod.c
* harbour/contrib/hbct/maxline.c
* harbour/contrib/hbct/wordrepl.c
* harbour/contrib/hbct/charrepl.c
* harbour/contrib/hbct/files.c
* harbour/contrib/hbct/video.c
* harbour/contrib/hbct/charswap.c
* harbour/contrib/hbct/dattime3.c
* harbour/contrib/hbct/charop.c
* harbour/contrib/hbct/misc2.c
* harbour/contrib/hbct/charone.c
* harbour/contrib/hbct/ctstr.c
* harbour/contrib/hbct/screen1.c
* harbour/contrib/hbct/token1.c
* harbour/contrib/hbct/ctstr.h
* harbour/contrib/hbct/charmirr.c
* harbour/contrib/hbct/relation.c
* harbour/contrib/hbct/atnum.c
* harbour/contrib/hbct/like.c
* harbour/contrib/hbct/count.c
* harbour/contrib/hbct/disk.c
* harbour/contrib/hbct/ctstrfil.c
* harbour/contrib/hbct/posdiff.c
* harbour/contrib/hbct/addascii.c
* harbour/contrib/hbct/tab.c
* harbour/contrib/hbct/numline.c
* harbour/contrib/hbct/dattime2.c
* harbour/contrib/hbct/asciisum.c
* harbour/contrib/hbct/expand.c
* harbour/contrib/hbct/pos2.c
* harbour/contrib/hbct/numat.c
* harbour/contrib/hbct/atrepl.c
* harbour/contrib/hbct/wordtoch.c
* harbour/contrib/hbct/print.c
* harbour/contrib/hbct/justify.c
* harbour/contrib/xhb/hbxml.c
* harbour/contrib/xhb/dbf2txt.c
* harbour/contrib/xhb/xhbis.c
* harbour/contrib/xhb/fparse.c
* harbour/contrib/xhb/xstrdel.c
* harbour/contrib/xhb/hbcomprs.c
* harbour/contrib/xhb/datesxhb.c
* harbour/contrib/xhb/xhbmsgs.c
* harbour/contrib/xhb/freadlin.c
* harbour/contrib/xhb/txtline.c
* harbour/contrib/xhb/xhbtrim.c
* harbour/contrib/xhb/xhbcopyf.c
* harbour/contrib/xhb/cstructc.c
* harbour/contrib/xhb/xhbfunc.c
* harbour/contrib/hbtpathy/tplinux.c
* harbour/contrib/hbgt/charmixg.c
* harbour/contrib/hbgt/strexpan.c
* harbour/contrib/hbgt/charodd.c
* harbour/contrib/hbgt/strright.c
* harbour/contrib/hbgt/asciisgt.c
* harbour/contrib/hbgt/strdiffg.c
* harbour/contrib/hbgt/chrtotal.c
* harbour/contrib/hbgt/strcount.c
* harbour/contrib/hbgt/strleft.c
* harbour/contrib/hbgt/ascposgt.c
* harbour/contrib/hbgt/chrfirst.c
* harbour/contrib/hbgt/chrcount.c
* harbour/contrib/hbgt/strpbrk.c
* harbour/contrib/hbgt/chareven.c
* harbour/contrib/hbgt/strcspn.c
* harbour/contrib/hbgt/atdiff.c
* harbour/contrib/hbsqlit3/hbsqlit3.c
* harbour/contrib/hbmzip/hbmzip.c
* harbour/contrib/hbnf/proper.c
* harbour/contrib/hbnf/fttext.c
* harbour/contrib/hbnf/chdir.c
* harbour/contrib/hbnf/getver.c
* harbour/contrib/hbnf/ftattr.c
* harbour/contrib/hbnf/mkdir.c
* harbour/contrib/hbnf/rmdir.c
* harbour/contrib/Makefile
* harbour/contrib/hbcurl/hbcurl.c
* harbour/contrib/rddsql/sddmy/mysqldd.c
* harbour/contrib/rddsql/sddpg/pgsqldd.c
* harbour/contrib/rddsql/sddfb/fbirddd.c
* harbour/contrib/rddsql/sddodbc/odbcdd.c
* harbour/contrib/rddsql/sqlmix.c
* harbour/contrib/hbhpdf/harupdf.c
* harbour/contrib/rddads/adsx.c
* harbour/contrib/rddads/adsfunc.c
* harbour/contrib/rddads/rddads.h
* harbour/contrib/rddads/ads1.c
* harbour/contrib/hbmisc/hb_f.c
* harbour/contrib/hbmisc/strfmt.c
* harbour/contrib/hbmisc/stringsx.c
* harbour/contrib/hbmisc/spd.c
* harbour/contrib/hbtip/utils.c
* harbour/contrib/hbwin/wapi_winbase.c
* harbour/contrib/hbwin/win_misc.c
* harbour/contrib/hbbtree/hb_btree.h
* harbour/contrib/hbbtree/hb_btree.c
* harbour/source/pp/hbpp.c
* harbour/source/vm/runner.c
* harbour/source/vm/estack.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/hvm.c
* harbour/source/vm/cmdarg.c
* harbour/source/vm/memvars.c
* harbour/source/vm/dynlibhb.c
* harbour/source/vm/set.c
* harbour/source/main/harbour.c
* harbour/source/debug/dbgentry.c
* harbour/source/common/hbfsapi.c
* harbour/source/common/hbfopen.c
* harbour/source/rtl/gtdos/gtdos.c
* harbour/source/rtl/diskspac.c
* harbour/source/rtl/console.c
* harbour/source/rtl/chrasc.c
* harbour/source/rtl/fscopy.c
* harbour/source/rtl/run.c
* harbour/source/rtl/spfiles.c
* harbour/source/rtl/defpath.c
* harbour/source/rtl/philes.c
* harbour/source/rtl/oldbox.c
* harbour/source/rtl/math.c
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/cdpapi.c
* harbour/source/rtl/gtcrs/gtcrs.c
* harbour/source/rtl/dirdrive.c
* harbour/source/rtl/hbi18n1.c
* harbour/source/rtl/trim.c
* harbour/source/rtl/hbzlibgz.c
* harbour/source/rtl/philesx.c
* harbour/source/rtl/mlcfunc.c
* harbour/source/rtl/filehb.c
* harbour/source/rtl/fstemp.c
* harbour/source/rtl/is.c
* harbour/source/rtl/hbrunfun.c
* harbour/source/rtl/ampm.c
* harbour/source/rtl/setcolor.c
* harbour/source/rtl/oemansi.c
* harbour/source/rtl/disksphb.c
* harbour/source/rtl/hbzlib.c
* harbour/source/rtl/strpeek.c
* harbour/source/rtl/replic.c
* harbour/source/rtl/stuff.c
* harbour/source/rtl/hbstrfmt.c
* harbour/source/rtl/transfrm.c
* harbour/source/rtl/hbhex.c
* harbour/source/rtl/trace.c
* harbour/source/rtl/hbadler.c
* harbour/source/rtl/samples.c
* harbour/source/rtl/filebuf.c
* harbour/source/rtl/hbcrc.c
* harbour/source/rtl/gete.c
* harbour/source/rtl/hbmd5.c
* harbour/source/rtl/langapi.c
* harbour/source/rtl/gtcgi/gtcgi.c
* harbour/source/rtl/errapi.c
* harbour/source/rtl/hbregexc.c
* harbour/source/rtl/natmsg.c
* harbour/source/rtl/fssize.c
* harbour/source/rtl/hbinet.c
* harbour/source/rtl/colorind.c
* harbour/source/rtl/copyfile.c
* harbour/source/rtl/mouseapi.c
* harbour/source/rtl/soundex.c
* harbour/source/rtl/memofile.c
* harbour/source/rtl/hbffind.c
* harbour/source/rtl/gtapi.c
* harbour/source/rtl/direct.c
* harbour/source/rtl/filesys.c
* harbour/source/rtl/file.c
* harbour/source/rtl/val.c
* harbour/source/rtl/hbregex.c
* harbour/source/rtl/rat.c
* harbour/source/rtl/isprint.c
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/rdd/dbsql.c
* harbour/source/rdd/workarea.c
* harbour/source/rdd/wacore.c
* harbour/source/rdd/sdf1.c
* harbour/source/rdd/dbdetach.c
* harbour/source/rdd/dbcmdx.c
* harbour/source/rdd/dbfnsx/dbfnsx1.c
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/delim1.c
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/hsx/hsx.c
* harbour/source/rdd/dbcmd53.c
* harbour/source/rdd/usrrdd/usrrdd.c
* harbour/source/rdd/wafunc.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/source/rdd/hbsix/sxsem.c
* harbour/source/rdd/hbsix/sxord.c
* harbour/source/rdd/hbsix/sxfname.c
* harbour/source/rdd/hbsix/sxtable.c
* harbour/source/rdd/hbsix/sxdate.c
* harbour/source/rdd/hbsix/sxutil.c
* harbour/source/rdd/hbsix/sxcompr.c
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/hbcmplib.c
* harbour/source/compiler/ppcomp.c
* changed 'char *' and changed 'BYTE *' to 'const char *' in
the following functions:
const char * hb_vmFindModuleSymbolName( PHB_SYMB pSym );
void hb_vmInitSymbolGroup( void * hNewDynLib, int argc,
const char * argv[] );
void hb_dbgEntry( int nMode, int nLine, const char *szName,
int nIndex, PHB_ITEM pFrame );
void hb_dbgAddBreak( void *handle, const char *cModule,
int nLine, const char *szFunction );
void hb_dbgAddWatch( void *handle, const char *szExpr, BOOL bTrace );
PHB_ITEM hb_dbgGetExpressionValue( void *handle,
const char *expression );
BOOL hb_dbgIsValidStopLine( void *handle, const char *szModule,
int nLine );
void hb_dbgSetToCursor( void *handle, const char *szModule,
int nLine );
void hb_dbgSetWatch( void *handle, int nWatch,
const char *szExpr, BOOL bTrace );
const char * hb_setGetCPtr( HB_set_enum set_specifier );
const char * hb_setGetAltFile( void );
const char * hb_setGetDateFormat( void );
const char * hb_setGetTimeFormat( void );
const char * hb_setGetDefault( void );
const char * hb_setGetDelimChars( void );
const char * hb_setGetDevice( void );
const char * hb_setGetExtraFile( void );
const char * hb_setGetPath( void );
const char * hb_setGetMFileExt( void );
const char * hb_setGetPrintFile( void );
const char * hb_setGetEOL( void );
const char * hb_setGetHBOUTLOG( void );
const char * hb_setGetHBOUTLOGINFO( void );
const char * hb_setGetOSCODEPAGE( void );
void hb_compInitPP( HB_COMP_DECL, int argc,
const char * const argv[] );
void hb_compGenPCodeN( const BYTE * pBuffer, ULONG ulSize,
HB_COMP_DECL );
int hb_compMain( int argc, const char * const argv[],
BYTE ** pBufPtr, ULONG * pulSize,
const char * szSource );
void hb_compChkCompilerSwitch( HB_COMP_DECL, int,
const char * const args[] );
void hb_compChkDefines( HB_COMP_DECL, int iArg,
const char * const args[] );
void hb_compGenCString( FILE * yyc, const BYTE * pText, ULONG ulLen );
AREAP hb_rddRequestArea( const char * szAlias, PHB_ITEM pCargo,
BOOL fNewArea, BOOL fWait );
char * hb_stackDirBuffer( void );
LONG hb_sxPtoD( const char * pDate );
const char * hb_langID( void );
const char * hb_langSelectID( const char * pszID );
const char * hb_langDGetItem( int iIndex );
const char * hb_langDGetErrorDesc( ULONG ulIndex );
BOOL hb_fsChDir( const char * pszDirName );
HB_FHANDLE hb_fsCreate( const char * pszFileName, ULONG ulAttr );
HB_FHANDLE hb_fsCreateEx( const char * pszFilename, ULONG ulAttr,
USHORT uiFlags );
HB_FHANDLE hb_fsCreateTemp( const char * pszDir,
const char * pszPrefix,
ULONG ulAttr, char * pszName );
HB_FHANDLE hb_fsCreateTempEx( char * pszName, const char * pszDir,
const char * pszPrefix,
const char * pszExt, ULONG ulAttr );
const char * hb_fsCurDir( USHORT uiDrive );
USHORT hb_fsCurDirBuff( USHORT uiDrive, char * pbyBuffer,
ULONG ulLen );
void hb_fsBaseDirBuff( char * pbyBuffer );
BOOL hb_fsDelete( const char * pszFileName );
BOOL hb_fsFile( const char * pszFileName );
BOOL hb_fsIsDirectory( const char * pszFilename );
HB_FOFFSET hb_fsFSize( const char * pszFileName, BOOL bUseDirEntry );
HB_FHANDLE hb_fsExtOpen( const char * pszFileName,
const char * pDefExt,
char * hb_fsExtName( const char * pFilename,
const char * pDefExt, USHORT uiExFlags,
const char * pPaths );
BOOL hb_fsMkDir( const char * pszDirName );
HB_FHANDLE hb_fsOpen( const char * pszFileName, USHORT uiFlags );
BOOL hb_fsRmDir( const char * pszDirName );
BOOL hb_fsRename( const char * pszOldName,
const char * pszNewName );
BOOL hb_fsGetFileTime( const char * pszFileName,
LONG * plJulian, LONG * plMillisec );
BOOL hb_fsSetFileTime( const char * pszFileName,
LONG lJulian, LONG lMillisec );
BOOL hb_fsGetAttr( const char * pszFileName, ULONG * pulAttr );
BOOL hb_fsSetAttr( const char * pszFileName, ULONG ulAttr );
HB_FHANDLE hb_fsPOpen( const char * pFilename, const char * pMode );
BOOL hb_fsCopy( const char * pSource, const char * pDest );
BOOL hb_spFile( const char * pFilename, char * pRetPath );
BOOL hb_spFileExists( const char * pFilename, char * pRetPath );
HB_FHANDLE hb_spOpen( const char * pFilename, USHORT uiFlags );
HB_FHANDLE hb_spCreate( const char * pFilename, ULONG ulAttr );
HB_FHANDLE hb_spCreateEx( const char * pFilename,
ULONG ulAttr, USHORT uiFlags );
PHB_FILE hb_fileExtOpen( const char * pFilename,
const char * pDefExt, USHORT uiExFlags,
const char * pPaths, PHB_ITEM pError );
PHB_FILE hb_fileCreateTemp( const char * pszDir,
const char * pszPrefix,
ULONG ulAttr, char * pszName );
PHB_FILE hb_fileCreateTempEx( char * pszName, const char * pszDir,
const char * pszPrefix,
const char * pszExt, ULONG ulAttr );
HB_ERRCODE hb_gtBox( SHORT uiTop, SHORT uiLeft, SHORT uiBottom,
SHORT uiRight, const BYTE * pbyFrame );
HB_ERRCODE hb_gtDrawBox( SHORT uiTop, SHORT uiLeft, SHORT uiBottom,
SHORT uiRight, const BYTE * pbyFrame,
int iColor );
HB_ERRCODE hb_gtWrite( const BYTE * pbyStr, ULONG ulLen );
HB_ERRCODE hb_gtWriteAt( USHORT uiRow, USHORT uiCol,
const BYTE * pbyStr, ULONG ulLen );
HB_ERRCODE hb_gtWriteCon( const BYTE * pbyStr, ULONG ulLen );
HB_ERRCODE hb_gtPutText( USHORT uiRow, USHORT uiCol,
const BYTE * pStr, ULONG ulLength,
int iColor );
HB_ERRCODE hb_gtOutStd( const BYTE * pbyStr, ULONG ulLen );
HB_ERRCODE hb_gtOutErr( const BYTE * pbyStr, ULONG ulLen );
HB_ERRCODE hb_gtBoxEx( int iTop, int iLeft, int iBottom, int iRight,
const BYTE * pbyFrame, int iColor );
void hb_mouseRestoreState( const BYTE * pBuffer );
const char * hb_strLTrim( const char * szText, ULONG * ulLen );
const char * hb_conNewLine( void );
const char * hb_conSetColor( const char * szColor );
const char * hb_errGetDescription( PHB_ITEM pError );
const char * hb_errGetFileName( PHB_ITEM pError );
const char * hb_errGetOperation( PHB_ITEM pError );
const char * hb_errGetSubSystem( PHB_ITEM pError );
int hb_ctwAddWindowBox( int iWindow, const BYTE * szBox, int iColor );
const char *ct_at_exact_forward
( const char *pcString, size_t sStrLen,
const char *pcMatch, size_t sMatchLen,
size_t *psMatchStrLen );
const char *ct_at_exact_backward
( const char *pcString, size_t sStrLen,
const char *pcMatch, size_t sMatchLen,
size_t *psMatchStrLen );
const char *ct_at_wildcard_forward
( const char *pcString, size_t sStrLen,
const char *pcMatch, size_t sMatchLen,
char cWildCard, size_t *psMatchStrLen );
const char *ct_at_wildcard_backward
( const char *pcString, size_t sStrLen,
const char *pcMatch, size_t sMatchLen,
char cWildCard, size_t *psMatchStrLen );
const char *ct_at_charset_forward
( const char *pcString, size_t sStrLen,
const char *pcCharSet, size_t sCharSetLen,
size_t *psMatchedCharPos );
const char *ct_at_charset_backward
( const char *pcString, size_t sStrLen,
const char *pcCharSet, size_t sCharSetLen,
size_t *psMatchedCharPos );
char * hb_adsOemToAnsi( const char * pcString, ULONG ulLen );
char * hb_adsAnsiToOem( const char * pcString, ULONG ulLen );
struct hb_BTree * hb_BTreeNew( const char *FileName,
USHORT usPageSize, USHORT usKeySize,
ULONG ulFlags, USHORT usBuffers );
struct hb_BTree * hb_BTreeOpen( const char *FileName, ULONG lFlags,
USHORT usBuffers );
BOOL hb_BTreeInsert( struct hb_BTree * pBTree, const char * szKey,
PHB_ITEM pData );
BOOL hb_BTreeDelete( struct hb_BTree * pBTree, const char * szKey,
LONG lData );
BOOL hb_BTreeSeek( struct hb_BTree * pBTree, const char * szKey,
LONG lData, BOOL bSoftSeek );
const char * hb_BTreeKey( struct hb_BTree * pBTree );
* modified RDD methods:
HB_ERRCODE PUTVALUEFILE( AREAP, USHORT, const char *, USHORT );
HB_ERRCODE GETVALUEFILE( AREAP, USHORT, const char *, USHORT );
* modified GT methods:
void REST( HB_GT_PTR, int, int, int, int, const BYTE * );
void PUTTEXT( HB_GT_PTR, int, int, BYTE, const BYTE *, ULONG );
void WRITEAT( HB_GT_PTR, int, int, const BYTE *, ULONG );
void WRITE( HB_GT_PTR, const BYTE *, ULONG );
void WRITECON( HB_GT_PTR, const BYTE *, ULONG );
void BOX( HB_GT_PTR, int, int, int, int, const BYTE *, BYTE );
void BOXD( HB_GT_PTR, int, int, int, int, const BYTE *, BYTE );
void BOXS( HB_GT_PTR, int, int, int, int, const BYTE *, BYTE );
void OUTSTD( HB_GT_PTR, BYTE *, ULONG );
void OUTERR( HB_GT_PTR, BYTE *, ULONG );
void MOUSERESTORESTATE( HB_GT_PTR, const BYTE * );
* modified RDD structers:
DBFIELDINFO, DBOPENINFO, DBORDERCONDINFO, DBCONSTRAINTINFO,
DBORDERCREATEINFO
+ modified parameters and behevior:
const char * hb_fsNameConv( const char * szFileName, char ** pszFree );
const char * hb_osEncode( const char * szFileName, char ** pszFree );
const char * hb_osDecode( const char * szFileName, char ** pszFree );
Please look at implementation and current usage of these functions.
+ added new function:
BOOL hb_itemGetWriteCL( PHB_ITEM pItem,
char ** pszValue, ULONG * pulLen );
which converts item string buffer to writable state to use with
functions like FREAD() instead of hb_itemUnShare*()
* updatd other code to respect above modifications
! fixed bugs (also GPF traps) located by above modifications
TODO: please make build tests. Especially in OS2 - not tested at all.
|
||
|
|
26a11bd859 |
2009-03-21 16:07 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/bin/hb-func.sh
! restored default optimization flag (-O3) in hb* scripts
* harbour/harbour.spec
! fixed recent modification
* harbour/contrib/rddads/ads1.c
* harbour/contrib/rddads/adsfunc.c
* harbour/contrib/hbmisc/strfmt.c
* harbour/contrib/hbcrypt/sha1.c
! fixed wrongly used C reference operator
* harbour/contrib/hbwin/win_prn2.c
* harbour/contrib/hbwin/wapi_commctrl.c
* harbour/source/vm/maindllp.c
! fixes for unicode builds
* harbour/include/std.ch
+ added SET TIME FORMAT [TO] <f>
* harbour/include/set.ch
* harbour/include/hbset.h
* harbour/source/vm/set.c
+ added _SET_TIMEFORMAT
The folowing modifiers are supported:
hh - hours
mm - minutes
ss - seconds
fff - fraction part of seconds
p - 1-st letter from PM / AM signature. When used time is shown
in 12 hour format otherwise 24 hour format is used
ex: Set( __SET_TIMEFORMAT, "hh:mm pm" )
default _SET_TIMEFORMAT value is "hh:mm:ss:fff"
+ added C function: char * hb_setGetTimeFormat( void );
* harbour/include/hbpp.h
* harbour/source/pp/ppcore.c
+ added support for timestamp constant values in the form:
t"YYYY-MM-DD HH:MM:SS.fff"
The exact accepted timestamp pattern is is:
YYYY-MM-DD [H[H][:M[M][:S[S][.f[f[f[f]]]]]]] [PM|AM]
i.e.:
tValue := t"2009-03-21 5:31:45.437 PM"
or:
YYYY-MM-DDT[H[H][:M[M][:S[S][.f[f[f[f]]]]]]] [PM|AM]
with literal "T" as date and time part delimiters (XML timestamp
format), i.e.:
tValue := t"2009-03-21T17:31:45.437"
The folowing characters can be used as date delimiters: "-", "/", "."
if PM or AM is used HH is in range < 1 : 12 > otherwise
in range < 0 : 23 >
* harbour/source/compiler/complex.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.yyh
+ added support for t"YYYY-MM-DD HH:MM:SS.fff" time stamp constant
to compiler
+ added support for VFP datetime constant values:
{ ^ [ YYYY-MM-DD [,] ] [ HH[:MM[:SS][.FFF]] [AM|PM] ] }
The following characters can be used as date delimiters: "-", "/".
Dot "." as date delimiter is not supported.
There is no limit on number of characters in YYYY, MM, DD, HH, MM,
SS, FFF parts. Important is only their value. This is the format
in semi PP notation:
{ ^ <YEAR> <sep:/-> <MONTH> <sep:/-> <DAY> [[<sep2:,>]
[ <HOUR> [ : <MIN> [ : <SEC> [ . <FRAQ> ] ] ] [AM|PP] ] }
In practice it allows to also parse xHarbour datetime constant
values with compatible conditions though xHarbour support onlu "/"
as date delimiter.
NOTE: there is one important difference to VFP and xHarbour in
decoding above format. In VFP and xHarbour when date part is
missing then it's set by default to: 1899-12-30 so this code:
{ ^ 12:00 }
gived the same results as:
{ ^ 1899/12/30 12:00 }
Harbour does not set any default date value when timestamp
constant value contains only time part.
If you want we can change it for strict VFP compatiblity.
Now this extension is enabled by default for testing. In the future
it will be probably covered by HB_COMPAT_FOXPRO macro.
* harbour/source/macro/macro.yyc
* harbour/source/macro/macro.y
* harbour/source/macro/macro.yyh
* harbour/source/macro/macrolex.c
+ added support for t"YYYY-MM-DD HH:MM:SS.fff" time stamp constant
to macro compiler
* harbour/include/hbmacro.h
* harbour/source/vm/macro.c
+ added new function:
void hb_macroGenPushTimeStamp( LONG lDate, LONG lTime, HB_COMP_DECL );
* harbour/include/hberrors.h
* harbour/source/compiler/hbgenerr.c
+ added new compile time error: "Invalid timestamp constant '%s'"
* harbour/source/compiler/cmdcheck.c
* use Harbour API timestamp functions instead of calling system
functions
* harbour/include/hbpcode.h
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbstripl.c
* harbour/source/compiler/hbopt.c
+ added new PCODE HB_P_PUSHTIMESTAMP (replaced one unused PCODE value)
to store timestamp constant values in the PCODE
* harbour/include/hbcomp.h
* harbour/source/compiler/hbmain.c
+ added new function:
void hb_compGenPushTimeStamp( LONG lDate, LONG lTime, HB_COMP_DECL );
* harbour/include/hbexprop.h
* harbour/source/common/expropt1.c
+ added new C functions:
HB_EXPR_PTR hb_compExprNewTimeStamp( LONG, LONG, HB_COMP_DECL );
* harbour/include/hbexprb.c
* harbour/include/hbcompdf.h
* harbour/source/common/expropt2.c
+ added timestamp expressions support
+ added compile time optimization for timestamp expressions
* updated function optimization for timestamp expressions
* harbour/include/hbdate.h
* harbour/source/common/hbdate.c
* changed hb_dateMilliSeconds() to return UTC julian timestamp in
milliseconds
* changed existing seconds, time and timestamp functions to operate
on common OS specific functions to eliminate possible problems
with different OS time counters
+ added new functions to operates on time and timestamp values.
See source code for details.
+ harbour/source/rtl/cputime.c
* moved double hb_secondsCPU( int n ) function to separate file
* harbour/source/rtl/seconds.c
- removed old version of date/seconds functions
* harbour/source/vm/hashes.c
* harbour/source/vm/arrays.c
+ added support for timestamp values as hash item indexes
* harbour/source/vm/hashfunc.c
+ added support for find timestamp values in hash and array items
by simple date value in AScan(), hb_HScan(), hb_AScan() and hb_RAScan()
functions when exact comparison is not used.
* harbour/source/vm/asort.c
+ added support for sorting timestamp values
* harbour/source/vm/classes.c
+ added support for timestamp scallar classes
+ added support for timestamp typed instance variables
* harbour/source/vm/memvars.c
+ added support for timestamp values in .mem files
* harbour/source/vm/estack.c
+ show timestamp values in stack dump
* harbour/include/hbapi.h
* harbour/source/vm/arrays.c
+ added new C functions:
double hb_arrayGetTD( PHB_ITEM pArray, ULONG ulIndex );
BOOL hb_arraySetTD( PHB_ITEM pArray, ULONG ulIndex, double dTimeStamp )
BOOL hb_arrayGetTDT( PHB_ITEM pArray, ULONG ulIndex,
LONG * plJulian, LONG * plMilliSec );
BOOL hb_arraySetTDT( PHB_ITEM pArray, ULONG ulIndex,
LONG lJulian, LONG lMilliSec );
* harbour/include/hbapi.h
* harbour/source/vm/extend.c
+ accept timestamp items in date functions - use only date part of
timestamp value
+ added new C functions:
double hb_partd( int iParam, ... );
BOOL hb_partdt( LONG * plJulian, LONG * plMilliSec , int iParam, ... );
void hb_rettd( double dTimeStamp );
void hb_rettdt( LONG lJulian, LONG lMilliSec );
int hb_stortd( double dTimeStamp, int iParam, ... );
int hb_stortdt( LONG lJulian, LONG lMilliSec, int iParam, ... );
* harbour/include/hbapiitm.h
* harbour/source/vm/itemapi.c
+ accept timestamp items in date functions - use only date part of
timestamp value
+ added new C functions:
char * hb_itemGetTS( PHB_ITEM pItem, char * szDateTime );
PHB_ITEM hb_itemPutTS( PHB_ITEM pItem, const char * szDateTime );
double hb_itemGetTD( PHB_ITEM pItem );
PHB_ITEM hb_itemPutTD( PHB_ITEM pItem, double dTimeStamp )
BOOL hb_itemGetTDT( PHB_ITEM pItem, LONG * plJulian, LONG * plMilliSec );
PHB_ITEM hb_itemPutTDT( PHB_ITEM pItem, LONG lJulian, LONG lMilliSec );
+ support for timestamp items in hb_itemString(), hb_itemPadConv() and
hb_itemTypeStr() functions
* harbour/include/hbvm.h
* harbour/include/hbxvm.h
* harbour/include/hbapi.h
* harbour/source/vm/hvm.c
+ added HB_IT_TIMESTAMP items
* modified HB_IT_DATE internal item structure to use common structure
with HB_IT_TIMESTAMP - it simplifies HVM code and eliminates additional
RT conditions.
+ added HB_IS_TIMESTAMP() and ISTIMESTAMP() macros
+ added HB_IS_DATETIME() and ISDATETIME() macros - they return true
if item/parameter is DATE or TIMESTAMP type.
+ added void hb_vmPushTimeStamp( long lJulian, long lMilliSec );
and xhb_vmPushTimeStamp()
+ added support for timestamp values in relational operators:
<, <=, >, >=, =, ==
When two timestamp values are compared then VM compares date and
time parts in both values.
When date and timestamp values are used in <, <=, >, >=, = operations
then VM compares only date part in both values.
When date and timestamp values are used in == operation then VM
compares date part in both values and then check if time part
of timestamp value is 0.
+ added support for timestamp values in + and - math operations.
The following rules are used in timestamp arithmetic:
<t> + <t> => <t>
<t> - <t> => <n>
<t> + <n> => <t>
<n> + <t> => <t>
<t> - <n> => <t>
<d> + <t> => <t>
<t> + <d> => <t>
<d> - <t> => <n>
<t> - <d> => <n>
When number is result or argument of timestamp operation then the
its integer part is a number of day and fractional part is the time.
* harbour/source/rtl/dateshb.c
+ added new .prg functions to mange date and timestamp values:
HB_DATETIME() -> <tTimeStamp>
HB_CTOD( <cDate> [, <cDateFormat> ] ) -> <dDate>
HB_DTOC( <dDate> [, <cDateFormat> ] ) -> <cDate>
HB_NTOT( <nValue> ) -> <tTimeStamp>
HB_TTON( <tTimeStamp> ) -> <nValue>
HB_TTOC( <tTimeStamp>, [ <cDateFormat> ] [, <cTimeFormat> ] ) ->
<cTimeStamp>
HB_CTOT( <cTimeStamp>, [ <cDateFormat> ] [, <cTimeFormat> ] ) ->
<tTimeStamp>
HB_TTOS( <tTimeStamp> ) -> <cYYYYMMDDHHMMSSFFF>
HB_STOT( <cDateTime> ) -> <tTimeStamp>
<cDateTime> should be in one of the above form:
- "YYYYMMDDHHMMSSFFF"
- "YYYYMMDDHHMMSSFF"
- "YYYYMMDDHHMMSSF"
- "YYYYMMDDHHMMSS"
- "YYYYMMDDHHMM"
- "YYYYMMDDHH"
- "YYYYMMDD"
- "HHMMSSFFF"
- "HHMMSSF"
- "HHMMSS"
- "HHMM"
- "HH"
Important is number of digits.
HB_TSTOSTR( <tTimeStamp> ) -> <cTimeStamp> // YYYY-MM-DD HH:MM:SS.fff
HB_STRTOTS( <cTimeStamp> ) -> <tTimeStamp>
<cTimeStamp> should be in one of the above form:
YYYY-MM-DD [H[H][:M[M][:S[S][.f[f[f[f]]]]]]] [PM|AM]
YYYY-MM-DDT[H[H][:M[M][:S[S][.f[f[f[f]]]]]]] [PM|AM]
The folowing characters can be used as date delimiters: "-", "/", "."
T - is literal "T" - it's for XML timestamp format
if PM or AM is used HH is in range < 1 : 12 > otherwise
in range < 0 : 23 >
HB_HOUR( <tTimeStamp> ) -> <nHour>
HB_MINUTE( <tTimeStamp> ) -> <nMinute>
HB_SEC( <tTimeStamp> ) -> <nSeconds> // with milliseconds
* harbour/source/rtl/datec.c
+ accept timestamp parameters in CMONTH() and CDOW() functions
* harbour/source/rtl/empty.c
+ added support for timestamp items
* harbour/source/rtl/itemseri.c
+ added support for timestamp items serialization
* harbour/source/rtl/minmax.c
+ added support for timestamp values to MIN() and MAX() functions.
when only one of given parameters is timestamp value and other
is date value and date parts are equal then always date item
is returned as both MIN() or MAX() value.
* harbour/source/rtl/dates.c
+ added new C functions: hb_timeFormat(), hb_timeUnformat(),
hb_timeStampFormat(), hb_timeStampUnformat()
* harbour/source/rtl/valtype.c
+ added .prg functions: HB_ISDATETIME(), HB_ISTIMESTAMP()
* harbour/source/rtl/transfrm.c
+ added support for timestamp items formatting.
+ added new function modifier @T.
When @T is used without @D then only time part of timestamp value
is formatted and return.
When @D is used without @T then only date part of timestamp value
is formatted and return.
* harbour/source/rtl/tbrowse.prg
+ display timestamp values
* harbour/source/rtl/philes.c
+ accept timestamp value as second parameter of HB_FSETDATETIME()
function
+ store file data and time in second parameter of HB_FGETDATETIME()
as timestamp value.
Old parameters (2-dDate, 3-cTime) are still supported but please think
about removing them - they are redundant.
* harbour/source/rtl/filesys.c
* updated function names
* harbour/source/rdd/dbf1.c
+ added native support for time and timestamp fields
* harbour/include/hbrddcdx.h
* harbour/include/hbrddnsx.h
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbfnsx/dbfnsx1.c
* harbour/source/rdd/dbffpt/dbffpt1.c
+ added support for indexing timestamp fields
+ added support for using DATE values with timestamp fields
which replicate HVM behavior.
SEEK and SEEKLAST with date value when active index is on
timestamp positions to 1-st or last record where date part
of indexed timesamp value is equal.
Settings scopes to date values when active index is on timestamp
value reduce the visible record range to these ones which have
date part of timestamp value in the range of dates values used
for scopes. It possible to mix date and timestamp values in scope
and set one scope to date value and the second to timesamp.
* harbour/source/rdd/sdf1.c
* harbour/source/rdd/delim1.c
+ added support for exporting timestamp fields
* harbour/source/rdd/dbsql.c
! fixed typo in logical value export
+ export timestamp fields.
Please update the format to given SQL syntax.
* harbour/contrib/hbct/files.c
+ changed SETFDATI() to optionally accept timestamp parameter
instead of two parameters dDate and cTime
* harbour/contrib/hbct/misc1.c
+ added timestamp support to XTOC() function
* harbour/contrib/hbct/misc2.c
+ added timestamp support to COMPLEMENT() function
* harbour/contrib/hbct/dattime2.c
+ accept timestamp values in ADDMONTH(), DOY(), ISLEAP(), QUARTER()
LASTDAYOM(), WEEK() functions
* harbour/contrib/hbmzip/hbmzip.c
+ updated HB_ZipFileCreate( hZip, cZipName, tDateTime, cTime, ... )
functions to optionaly accept timestamp value in 3-rd parameter
instead od dDate, and cTime in 3-rd and 4-th parameters.
+ updated HB_UnzipFileInfo( hUnzip, @cZipName, @tDateTime, @cTime, ... )
to return timestamp value in 3-rd parameter instead of date value.
TODO: Please think about removing 4-th parameter from:
HB_ZipFileCreate( hZip, cZipName, tDateTime, cTime, ... )
HB_UnzipFileInfo( hUnzip, @cZipName, @tDateTime, @cTime, ... )
Now it's redundant.
* harbour/contrib/hbmzip/readme.txt
* updated parameters description for above functions
* harbour/contrib/hbnf/descendn.c
+ added timestamp support to FT_DESCEND() function
* harbour/contrib/hbclipsm/date.c
+ accept timestamp values in DATEASAGE(), DATEASARRAY() and DATEISLEAP()
functions
* harbour/contrib/hbmisc/dates2.c
+ accept timestamp values in ISLEAPYEAR(), DAYSINMONTH(), EOM(), BOM(),
WOM(), WOY(), EOY() and BOY() functions
The following contrib files should be updated but I'm leaving it to
other developers who want to keep this code alive:
contrib/hbtip/utils.c
contrib/hbvpdf/hbvpdf.prg
contrib/hbvpdf/hbvpdft.prg
contrib/hbwin/win_dll.c
some minor cleanups if necessary and authors will find
timestamp values usable
contrib/hbole/ole2.c
contrib/hbwin/win_ole.c
add support for timestamp values in OLE
contrib/rddado/adordd.prg
contrib/rddads/ads1.c
contrib/rddads/adsx.c
contrib/rddsql/...
add support for timestamp values in RDDs
Warning: this implementation is not xHarbour compatible. There are many
important differences. Mostly on C level and used API. Please be careful
in porting xHarbour source code to Harbour.
|
||
|
|
b611140372 |
2009-03-06 11:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rdd/usrrdd/usrrdd.c
! removed unnecessary declaration
* harbour/source/compiler/harbour.yyc
! removed unnecessary ";"
* harbour/source/vm/classes.c
* harbour/source/compiler/hbpcode.c
* pacified some warnings for compilers which can detect that
hb_errInternal() does not returns
* harbour/source/rtl/hbgtcore.c
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/rdd/dbfnsx/dbfnsx1.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/contrib/rddads/adsx.c
* marked all places where we put some link time bindings after
hb_errInternal() as: /* not executed, only to force linking ... */
|
||
|
|
dde57c5c70 |
2008-12-18 05:02 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* include/hbclass.ch
* include/hbcomp.ch
* include/hberrors.h
* include/hbgenerr.c
* include/hbmain.c
* include/hbopt.c
+ PCode optimizations:
1) Self := QSELF(), Self:method -> QSELF():method
2) Declared, but unused variables are removed from code
These optimizations are enabled if jump optimizations are enabled.
+ added recursive pcode tree tracer. It is capable to generate new
warning: Variable %s is assigned, but not used.
Warning is not generated in these cases:
1) unoptimal Self := QSELF() pcode [generated by preprocessor rules]
2) if variable name starts with '_nowarn_'. This allows to
suppress warning in case unoptimal pcode is generated by
preprocessor rules
3) assigned value is NIL. This let us force garbage collection
using oVar := NIL
Warning has warning level 3.
; NOTE: if you are using -w3 -es2 in makefiles, you'll need to fix your
redundant code to compile the project
* source/rtl/achoice.prg
* source/rtl/browse.prg
* source/rtl/tbrowse.prg
* source/rtl/teditor.prg
* source/rtl/tget.prg
* source/rtl/tgetlist.prg
* source/rtl/tlabel.prg
* source/rtl/tmenusys.prg
* source/rtl/tpersist.prg
* source/rtl/treport.prg
* source/debug/dbgtmenu.prg
* source/debug/debugger.prg
* source/debug/dbgtobj.prg
* fixed 'assigned but not used' warnings
* utils/hbdoc/hbdoc.prg
* utils/hbdoc/genasc.prg
* utils/hbdoc/genhpc.prg
* utils/hbdoc/genhtm.prg
* utils/hbdoc/genchm.prg
* utils/hbdoc/genng.prg
* utils/hbdoc/genos2.prg
* utils/hbdoc/genrtf.prg
* utils/hbdoc/gentrf.prg
* utils/hbdoc/ft_funcs.prg
* utils/hbmake/hbmake.prg
* #pragma -w2
; NOTE: I've been fixing warnings in utils/hbdoc/* for 2 hours,
but only fixed half of files. There are a lot of garbage code here.
I do not thing this code is working...
I used fallback method: restored original files and used -w2
; NOTE: hbmake.prg has about 140 unused assignments.
I've also fallback to -w2, because some of unused code is complex,
ex., ASCAN() with block parameters. I'm not using hbmake, and I'm
affraid to break something important.
* compiler/hbpcode.c
- removed Ron's copyright on hb_compStrongType(). We do not have this
functions in the compiler at all. I guess this text is just a result
of .c header copy-paste from xHarbour's hbstrong.c some time ago.
|
||
|
|
c4636942ec |
2008-10-27 21:43 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/Makefile
* contrib/make_vc_all.bat
* contrib/make_b32_all.bat
* contrib/make_gcc_all.sh
+ Added rddsql to default builds.
Please test.
* contrib/hbdbgfx/dbgfxc.c
* Added TODO. (multiplatform support in one the functions)
* include/hbsetup.h
* include/hbexprb.c
* contrib/hbct/ctnet.c
* contrib/hbct/color.c
* contrib/hbct/dattime2.c
* contrib/xhb/hboutdbg.c
* contrib/hbtpathy/tpwin32.c
* contrib/hbmzip/hbmzip.c
* contrib/hbsqlit3/hbsqlit3.c
* contrib/hbfbird/firebird.c
* contrib/hbziparc/hbzipcpp.old
* contrib/hbnf/getver.c
* contrib/hbpgsql/postgres.c
* contrib/hbclipsm/gauge.c
* contrib/rddads/adsfunc.c
* contrib/rddads/ads1.c
* contrib/hbgd/gdwrp.c
* contrib/hbmisc/spd.c
* contrib/hbtip/utils.c
* contrib/hbwin/win_prt.c
* contrib/examples/pp/hbppcore.c
* contrib/examples/pp/hbppcomp.c
* source/pp/pplib.c
* source/pp/ppcore.c
* source/pp/hbpp.c
* source/vm/estack.c
* source/vm/debug.c
* source/vm/itemapi.c
* source/vm/hvm.c
* source/vm/cmdarg.c
* source/vm/fm.c
* source/vm/extrap.c
* source/vm/classes.c
* source/main/harbour.c
* source/common/hbver.c
* source/common/hbverdsp.c
* source/common/hbstr.c
* source/common/hbdate.c
* source/rtl/gtxwc/gtxwc.c
* source/rtl/hbgtcore.c
* source/rtl/gtcrs/gtcrs.c
* source/rtl/errorint.c
* source/rtl/gtsln/gtsln.c
* source/rtl/gttrm/gttrm.c
* source/rtl/gtpca/gtpca.c
* source/rtl/fkmax.c
* source/rtl/langapi.c
* source/rtl/hbffind.c
* source/rdd/workarea.c
* source/rdd/sdf1.c
* source/rdd/delim1.c
* source/rdd/dbf1.c
* source/rdd/wafunc.c
* source/compiler/hbmain.c
* source/compiler/cmdcheck.c
* source/compiler/hbpcode.c
* source/compiler/genhrb.c
* source/compiler/gencobj.c
* source/compiler/genobj32.c
* source/compiler/genc.c
* source/compiler/hbusage.c
* source/compiler/hbfunchk.c
* source/compiler/hbgenerr.c
* utils/hbmake/hbmgauge.c
* Changed snprintf() calls to hb_snprintf().
; TODO: Finish the mappings in headers.
* tests/wvtext.prg
* include/inkey.ch
* source/rtl/gtwvt/gtwvt.c
* Changed K_HB_RESIZE to HB_K_RESIZE. The reason is
that we already got a HB_K_MULTICODE code (few lines
below, I didn't know about it before), and it's better
to keep consistency with that.
|
||
|
|
64f97582d9 |
2008-09-13 18:49 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbpp.h
* harbour/include/hbvm.h
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hbtrace.h
* harbour/include/hbapilng.h
* harbour/include/hbinit.h
* harbour/source/rtl/langapi.c
* harbour/source/pp/ppcore.c
* harbour/source/pp/hbpp.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/hvm.c
* harbour/source/common/hbver.c
* harbour/source/common/hbtrace.c
* harbour/source/common/expropt2.c
* harbour/source/compiler/complex.c
* harbour/source/compiler/hbident.c
* harbour/source/compiler/hbfunchk.c
* changed some declarations from 'char *' to 'const char *' and
fixed casting for some more pedantic compilers
* harbour/source/pp/ppcore.c
! fixed one typo which could cause memory leak and even GPF
* harbour/common.mak
* harbour/source/vm/Makefile
* harbour/source/rtl/Makefile
- harbour/source/rtl/set.c
+ harbour/source/vm/set.c
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* moved from RTL to HVM
* eliminated hb_set global structure
* moved set structure to HVM stack
+ added internal function hb_setClone() which is used to create
copy of SET structure for child threads
* hidden HB_SET_STRUCT declaration - 3-rd part code must not access it
directly. Dedicated hb_set*() functions should be used instead.
+ added new function:
BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem )
which allow to change some set by 3-rd party code.
TODO: not all SETs can be changed yet - if someone have a while
then please add code for missing ones.
* harbour/include/set.ch
* harbour/include/hbset.h
+ added _SET_CODEPAGE which works like _SET_LANGUAGE giving common
interface
* harbour/include/hbsetup.h
+ added HB_CODEPAGE_DEFAULT which works like HB_LANG_DEFAULT
* harbour/source/vm/hvm.c
! fixed builds which uses non EN lang or code page modules
by forcing linking the chosen ones
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* harbour/include/hbapicdp.h
* harbour/source/rtl/cdpapi.c
- removed global code page variable: hb_cdp_page and moved
code page settings to HVM stack
+ added new function hb_cdpID() which returns current code page
character ID
+ added new functions hb_vmCDP() and hb_vmSetCDP() to get/set
active for given thread code page structure
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* harbour/include/hbapilng.h
* harbour/source/rtl/langapi.c
+ moved lang setting to HVM stack
+ added new functions hb_vmLang() and hb_vmSetLang() to get/set
active for given thread language module
* harbour/include/hbvmpub.h
* harbour/include/hbstack.h
* harbour/include/hbapi.h
* harbour/source/vm/estack.c
* harbour/source/vm/dynsym.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/memvars.c
* changed memvar handles for HB_HANDLE to void * which is directly
casted to PHB_ITEM - new memvar references
* changed HB_DYNS declarations for MT mode. In MT mode HB_DYNS does
not contain area and memvar handles which are moved to thread
local HVM stack
+ added array for thread local memvar and area handles to HVM stack
% eliminated global continues array with all memvars and detached locals
% changed HB_IT_MEMVAR to use pointers to HB_ITEM directly - it resolve
synchronization problems in MT mode and should also improve the speed
and reduce memory usage. It should be well visible in applications which
uses lot of detached locals.
- removed hb_memvarsInit() and hb_memvarsFree() - they are not necessary
now because we do not longer use array with all allocated memvars
and detached local and private stack initialization is made
automatically
+ added internal functions hb_dynsymGetMemvar()/hb_dynsymSetMemvar()
+ added hb_memvarGetValueBySym() for debugger
* moved PRIVATE variable stack to HVM stack
* eliminated all static variables in memvars module
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* harbour/source/rtl/fserror.c
* moved IO errors to HVM stack
+ added special IO error handling which works without HVM stack
It allows to use hb_fs*() functions without allocated stack
by 3-rd party threads.
* harbour/source/rtl/filesys.c
* moved hb_fsCurDir() to HVM stack with special handling to work
with HVM stack like IO errors
* harbour/source/rdd/workarea.c
* allocated RDD node array in bigger peaces to reduce later RT
reallocations in MT mode. If user want to add dynamically more
then 64 RDDs then it should synchronize this operation himself.
* harbour/source/rdd/wacore.c
* moved WA list, current WA, default RDD and neteer() flag to HVM stack
* harbour/include/hbdefs.h
- removed HB_HANDLE declaration
* harbour/include/hbapi.h
- removed HB_VALUE structure - it's not longer used due to different
memvar handling
* updated hb_struMemvar to new memvar handling
* replaced hb_vmIsLocalRef() and hb_memvarsIsMemvarRef() with
hb_vmIsStackRef() which respect multiple stack and new memvar
and static structures and location in GC mark pass.
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* harbour/source/vm/hvm.c
+ added support for thread specific data located on HVM stack
Now it's possible to allocate static variables which are
local to thread. Such variables are allocated on HVM stack
and automatically destroyed. To declare new TSD variable use:
HB_TSD_NEW( <name>, <size>, <init>, <destruct> )
<name> - name of variable which holds TSD handler
<size> - size of TSD are which has to be allocated
<init> - init function, executed when new TSD is allocated by thread
(thread access given TSD 1-st time). This function receives
void * pointer to allocated area.
<destruct> - destructor function executed when HVM stack is destroyed
f.e.:
static HB_TSD_NEW( s_scrData, sizeof( HB_SCRDATA ),
NULL, hb_xSaveRestRelease );
To initialize dynamically allocated TSD variable use:
HB_TSD_INIT( <name>, <size>, <init>, <destruct> )
Pointer to TSD can be accessed using hb_stackGetTSD( &<name> )
where <name> is name of variable which holds TSD handler, f.e.:
PHB_SCRDATA pScrData = ( PHB_SCRDATA ) hb_stackGetTSD( &s_scrData );
See source/rtl/xsavescr.c as an example
It's also possible to test if data has been already allocated for
current thread by:
hb_stackTestTSD( &<name> ) => pData
it works like hb_stackGetTSD() but return NULL if current thread data
has not been allocated yet.
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* changed hb_stack location to thread local storage in MT mode
+ added functions and macros to access/assign new HVM stack members
+ changed garbage collection mark functions to work with multiple
stacks, thread local static and memvar variables
* harbour/source/rtl/xsavescr.c
* use TSD data for screen buffer to make __XSAVESCREEN()/__XRESTSCREEN()
thread independent
* harbour/source/rtl/idle.c
* use TSD data for idle task settings and codeblocks
- removed hb_idleShutDown() - it's not longer necessary
* harbour/source/rtl/setkey.c
* use TSD data for allocated keys to make SETKEY() thread independent
* harbour/source/rtl/math.c
* moved math error handler, math error block, math error mode and
math error structure to TSD
* harbour/source/rtl/errorapi.c
* moved error handler, error block, error launch counter and DOS error
value to TSD
* harbour/source/rtl/inkey.c
* moved inkey "before" and "after" blocks to TSD
* harbour/source/rdd/hsx/hsx.c
* moved HSX handles array to TSD
* harbour/include/hbapigt.h
* harbour/source/rtl/console.c
- removed hb_setkeyInit() and hb_setkeyExit() - they are not longer
necessary, allocated resources will be freed by TSD destructor
function
* harbour/include/hbapi.h
* harbour/source/rtl/console.c
* removed hb_conXSaveRestRelease() - it's not longer necessary,
allocated resources will be freed by TSD destructor function
* harbour/source/vm/macro.c
* moved s_macroFlags to TSD
* harbour/source/rtl/accept.c
* moved accept buffer to TSD
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hbxvm.h
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/complex.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/hbopt.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbstripl.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.yyh
* harbour/source/vm/hvm.c
+ added new PCODE HB_P_THREADSTATICS
+ added support for static variables which are local to thread:
THREAD STATIC <varname [:= <exp>], ...>
They work like normal static variables but each thread operates
on its own copy.
* added protection against possible double call to hb_xfree()
It can happen due to wrong marking expressions as used by bison
and executing destructors after our free code when syntax error
appear.
* harbour/source/rtl/perfuncs.prg
* harbour/source/rtl/menuto.prg
* harbour/source/rtl/getlist.prg
* harbour/source/rtl/readvar.prg
* harbour/source/rtl/text.prg
* use THREAD STATIC variables to make above code MT safe
* harbour/include/hbgtcore.h
* harbour/source/rtl/hbgtcore.c
+ added hb_gt_BaseFree() which will release current GT pointer
locked by hb_gt_Base() function. This function will be used
to optional automatic GT access synchronization when threads
share the same GT.
* harbour/source/rtl/gtapi.c
* harbour/source/rtl/inkeyapi.c
* harbour/source/rtl/mouseapi.c
* harbour/contrib/hbct/ctwin.c
* free GT pointer by hb_gt_BaseFree()
TODO: CTWIN is not MT safe yet - it will be updated together
with core GT when we add multi window interface for
thread with own console window.
* harbour/bin/hb-func.sh
* harbour/config/linux/gcc.cf
+ added rt lib to Linux builds
* harbour/bin/postinst.sh
* create MT safe version of FM stat library: fmmt
* harbour/bin/pack_src.sh
+ added support for ZIP packing
* harbour/include/hbapi.h
* harbour/include/hbvm.h
* harbour/source/vm/hvm.c
+ added hb_vmThreadInit()/hb_vmThreadQuit() functions - they initialize
HVM for calling thread so it can execute .prg code and call HVM
functions. They can be used by 3-rd party code threads.
+ added hb_vmUnlock()/hb_vmLock() functions which informs that
thread will not operate on HVM structures for some time allowing
to execute single thread only processes like GC.
+ added hb_vmThreadQuitRequest() which sends stop request to given
thread
+ added hb_vmWaitForThreads() which stops main thread execution waiting
for other threads
+ added hb_vmSuspendThreads() and hb_vmResumeThreads() used be GC
to stop all HVM threads before mark/swap scan
+ added linked list of HVM stacks
+ added hb_vmTerminateThreads() used by main HVM thread in QUIT state
* moved EXIT procedures execution from QUIT request to HVM QUIT state
in MT mode. It may effects some non structural code which tries to
access private variables in EXIT functions but it's much cleaner
and understandable for user. Please remember that we guaranties
that ALWAYS code in BEGIN SEQUENCE is _always_ executed even after
HVM QUIT request just like destructs. Personally I think that we
should move EXIT procedures execution also in ST mode.
* changed startup and cleanup code for new internal structures
* changes startup and cleanup code for MT mode
% removed some redundant HB_ITEM type settings
! eliminated non MT safe code which was using reference counters
without protection
* harbour/common.mak
* harbour/source/vm/Makefile
+ harbour/include/hbthread.h
+ harbour/source/vm/thread.c
+ added C level functions to manage threads and synchronization objects
See hbthread.h for detail description. They are based on PTHREAD API
and PTHREAD documentation can be used as reference. I intentionally
keep this list small for easier multiplatform porting.
Now they have been implemented for PTHREADS (POSIX threads supported by
many different OSes), MS-Win32/64 and OS2. The OS2 version is not tested
at all. I do not even know if it can be compiled so please make tests.
I used Internet resources and some part of xHarbour code as documentation
for OS2 MT API. It should be quite easy to add other platforms if necessary.
Harbour core code needs non recursive mutexes, conditional variables and
TLS for one pointer. If platforms does not support conditional variables
(f.e. MS-Win or OS2) then they can be emulated using multistate semaphores.
+ added .prg functions to manage threads and synchronization objects:
hb_threadStart( <@sStart()> | <bStart> [, <params,...> ] ) -> <pThID>
hb_threadJoin( <pThID> [, @<xRetCode> ] ) -> <lOK>
hb_threadDetach( <pThID> ) -> <lOK>
hb_threadQuitRequest( <pThID> ) -> <lOK>
hb_threadWaitForAll() -> NIL
hb_mutexCreate() -> <pMtx>
hb_mutexLock( <pMtx> [, <nTimeOut> ] ) -> <lLocked>
hb_mutexUnlock( <pMtx> ) -> <lOK>
hb_mutexNotify( <pMtx> [, <xVal>] ) -> NIL
hb_mutexNotifyAll( <pMtx> [, <xVal>] ) -> NIL
hb_mutexSubscribe( <pMtx>, [ <nTimeOut> ] [, @<xSubscribed> ] ) -> <lSubscribed>
hb_mutexSubscribeNow( <pMtx>, [ <nTimeOut> ] [, @<xSubscribed> ] ) -> <lSubscribed>
The function list should give similar to xHarbour API but they are not exactly
the same and except of hb_mutex*() functions which should replicate xHarbour behavior.
+ harbour/source/vm/vmmt
+ harbour/source/vm/vmmt/Makefile
+ added hbvmmt library to GNU make builds.
Non GNU make builds should be updated.
* harbour/contrib/hbct/pos1.c
* harbour/contrib/gtwvg/gtwvg.c
* harbour/contrib/rddads/ads1.c
* harbour/contrib/hbmisc/spd.c
* harbour/contrib/hbbmcdx/bmdbfcdx.c
* harbour/contrib/examples/rdddbt/dbfdbt1.c
* harbour/source/vm/runner.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/hvm.c
* harbour/source/rtl/console.c
* harbour/source/rtl/strcase.c
* harbour/source/rtl/spfiles.c
* harbour/source/rtl/defpath.c
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/dateshb.c
* harbour/source/rtl/mlcfunc.c
* harbour/source/rtl/fstemp.c
* harbour/source/rtl/is.c
* harbour/source/rtl/setcolor.c
* harbour/source/rtl/errorint.c
* harbour/source/rtl/transfrm.c
* harbour/source/rtl/dates.c
* harbour/source/rtl/filesys.c
* harbour/source/rtl/gtdos/gtdos.c
* harbour/source/rtl/gtwin/gtwin.c
* harbour/source/rtl/gtwvt/gtwvt.c
* harbour/source/rtl/gtxwc/gtxwc.c
* harbour/source/rtl/gttrm/gttrm.c
* harbour/source/rtl/gtpca/gtpca.c
* harbour/source/rtl/gtcgi/gtcgi.c
* harbour/source/rtl/gtcrs/gtcrs.c
* harbour/source/rtl/gtstd/gtstd.c
* harbour/source/rtl/gtsln/gtsln.c
* harbour/source/rtl/gtsln/gtsln.h
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/sdf1.c
* harbour/source/rdd/delim1.c
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/hbdbsort.c
* harbour/source/rdd/workarea.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/rdd/hsx/hsx.c
* harbour/source/rdd/hbsix/sxfname.c
* use API functions instead of direct accessing to hb_cdp_page or hb_set
* harbour/source/rtl/fstemp.c
* harbour/source/rtl/fssize.c
* harbour/source/rtl/hbffind.c
* harbour/source/rtl/filesys.c
* encapsulate potentially slow IO operation inside
hb_vmUnlock()/hb_vmLock() calls to allow other thread GC
activation
* harbour/contrib/hbnf/fttext.c
! fixed casting
* harbour/contrib/gtwvg/gtwvg.h
- removed #include <comctl32.h> - my MinGW and MinGW/CE instalations do
not have them. If it exists in some newer ones then it has to be
covered by #if version checking.
* harbour/source/vm/dynsym.c
- removed hb_dynsymLog() and hb_dynsymMemvarHandle()
* modified code to be MT safe and improved speed of some operations
* added MUEXT protection for global dynamic table access
* harbour/include/hbapi.h
* harbour/source/vm/garbage.c
* changed to work with MT HVM
* changed to work with new memvar structures and thread local static and
memvar variables
* added MUEXT protection for linked block lists
+ added parameter to hb_gcCollectAll() which will force GC activation
in MT mode by temporary suspending all executed threads.
+ added logical parameter to HB_GCALL() functions which is passed to
hb_gcCollectAll()
* harbour/source/vm/fm.c
* added MUEXT protection for FM statistic module
* added MT protection for reference counters. For platforms
which supports atomic incrmenetation/decrementation (f.e.
Interlocked*() functions in MS-Win) such operations are
used. For other it's MUTEX protection. It gives MT safe
readonly access for HVM complex variables without user
synchronization. The MUTEX protection can cause some speed
overhead so it's good to define MT safe version of
HB_ATOM_INC()/HB_ATOM_DEC() in hbthread.h if given platform
has them. Now they are defined only for Windows. For other
platforms We can define can define them in assembler for some
most popular CPUs in the future.
* harbour/source/vm/classes.c
* changed class definition array. Now it keeps pointers to class
structures.
* In MT mode allocated at HVM startup big enough array for class
definitions to avoid later RT reallocations. It effectively eliminates
MUTEX synchronization for class structure access.
* protect by MUTEX code for new class creation
* harbour/source/debug/dbgentry.c
* eliminated hbvmopt.h and direct accessing to HVM structures
* harbour/source/rtl/gtclip.c
* protect with MUTEX access to internal clipboard data
* harbour/source/rdd/nulsys/nulsys.c
+ added hb_rddCloseAll()
+ harbour/tests/mt
+ harbour/tests/mt/mttest01.prg
+ harbour/tests/mt/mttest02.prg
+ harbour/tests/mt/mttest03.prg
+ harbour/tests/mt/mttest04.prg
+ harbour/tests/mt/mttest05.prg
+ harbour/tests/mt/mttest06.prg
+ harbour/tests/mt/mttest07.prg
+ added some demonstration/test small MT programs written
using Harbour language. Some of them can be also compiled
by xHarbour but xHarbour does not pass any of my tests in
real multi-CPU machine so do not expect they will work
correctly.
Harbour threads needs OS threads support. Each Harbour thread is directly
mapped to OS thread. It's not very efficient on some older system where
cost of thread creation and/or task switching is very expensive but it
should not be bigger problem for modern OS-es which can support threads
in practice nearly in user space only.
I haven't touched Harbour function calling convention which comes from
Clipper. It means that we do not pass pointer to VM to each functions
like CLIP or xBase++. To resolve the problem I have to use thread local
storage (TLS) where such pointer is kept. If platform does not support
TLS then it can be emulated by us. Anyhow the speed of accessing TLS
data and extracting HB_STACK poitner is critical for performance.
Some compilers depending on used hardware and OS give native support
for TLS (f.e. __thread keyword in GCC/BCC or __declspec( thread ) in MSVC).
This should give optimal performance. On other Harbour uses TLS functions
like TlsGetValue() (MS-WIN) or pthread_getspecific() (PTHREAD) are used.
OS2 gives quite interesting TLS functionality which seems to be quite fast
though it will be interesting to know how it is iplemented internally for
real multi CPU machines (if it depends on CPU exception then the
performance will be bad). We need TLS only for one pointer to HB_STACK
structure.
I haven't added any tricks like HB_THREAD_STUB in xHarbour to reduce
the cost of TLS access. If it will be necessary for some platform the we
can add it.
Except TLS Harbour threads needs OS support for non recursive mutexes or
critical sections and conditional variables. If platforms does not support
conditional variables (f.e. MS-Win or OS2) then they can be emulated using
multistate semaphores. I intentionally didn't create code which may need
recursive mutexes. The non recursive ones are often faster and some
platforms may not support recursive mutexes so they will have to be
emulated by us.
Harbour uses reference counters for complex variables. It means that even
readonly access to complex item causes internal write operations necessary
to increment/decrement its reference counter. To make such readonly access
MT safe we have to make incrementation and decrementation with result
checking atomic. By default it's done by mutex inside vm/fm.c but some
platforms have native support for atomic inc/dec operations, f.e.
Interlocked*() functions in MS-Win. If they are available then such
functions should be used to not reduce the performance by mutex call
very often used functions. For many CPUs it should be quite easy to
implement such atomic inc/dec functionality in assembler. F.e. for
GCC and x86@32 it may looks like:
static __inline__ void hb_atomic_inc32( volatile int * p )
{
__asm__ __volatile__(
"lock incl %0"
:"=m" (*p) :"m" (*p)
);
}
static __inline__ int hb_atomic_dec32( volatile int * p )
{
unsigned char c;
__asm__ __volatile__(
"lock decl %0"
"sete %1"
:"=m" (*p), "=qm" (c) :"m" (*p) : "memory"
);
return c == 0;
}
and then it's enough to define in hbthreads.h:
#define HB_ATOM_INC( p ) hb_atomic_inc32( ( volatile int * ) p )
#define HB_ATOM_DEC( p ) hb_atomic_dec32( ( volatile int * ) p )
Probably I'll make it for some most popular CPUs in the future.
In Harbour each thread which wants to call HVM functions have to allocate
it's own HVM stack. It's done hb_vmThreadInit(). The HVM stack is freed
by calling hb_vmThreadQuit(). This functions can be called also by 3-rd
party threads if they want to call HVM functions or execute .prg code.
Calling HVM functions without allocated stack will cause GPF.
I moved most of static variables to HVM stack to make them thread
local. But some of them like FS errors have their own alternative
copy which is used when thread does not allocate HVM stack. It allows
to use hb_fs*() functions without HVM stack but programmer have to
know that error codes return by hb_fs*Error() functions can be
overwritten by other threads which also didn't allocated HVM stack.
To execute garbage collector scan and mark pass it's necessary to
stop other HVM threads. Otherwise the scan may give false results.
It's also possible to not stop threads but protect with mutex all
operations on GC items but it will probably cause performance reduction
and will force some other modifications. Maybe I'll implement it
in the future.
I didn't use any OS level thread KILL or CANCEL calls. All HVM threads
have to be cleanly removed without any resource leaks.
QUIT command terminate only calling thread. If main (startup) HVM
thread call QUIT then it sends QUIT request to all existing threads.
In QUIT state ALWAYS statements and destructors are executed.
New thread is created by:
hb_threadStart( <@sStart()> | <bStart> [, <params,...> ] ) -> <pThID>
The returned value is a pointer to internal thread structure which
can be used in JOIN or DETACH operations. Each thread should be Joined
or DETACHED to avoid resource leaks. If programmer does not store
<pThID> or all instances of <pThID> are destroyed then thread is
automatically detached. I do not know clear method of thread detaching
in OS2. If some OS2 users knows it then plase update vm/hbthread.c.
When thread terminates then all locked by this thread mutexes are
released.
Each thread uses its own memvars (PRIVATEs and PUBLICs) and work areas.
When new thread is created then it inherits from parent thread:
- code page
- language
- SETs
- default RDD
error block is initialized to default value by calling ERRORSYS()
and PUBLIC variable GetList := {} is created.
The following objects are initialized to default value:
- error block
- math error handler and math error block
- macro compiler features setting (hb_setMacro())
or move them to SETs.
We can think about inheriting them. It's also possible to add
inheriting of all visible memvars but I do not know it's good
idea.
Compilation and linking:
For MT mode HVM library should be compiled with HB_MT_VM macro.
GNU make automatically creates hbvmmt library which should be
linked with Harbour MT programs instead of hbvm.
Non GNU make files should be updated.
If given compiler support TLS then you can try to set HB_USE_TLS
to force using native compiler TLS support. Now it's enabled by
default only for BCC. For Linux and GCC builds it may depend also
on used GLIBC version. In older system there is no TLS support
at all or TLS works only for shared binaries so I haven't enabled
it. If you will test some other compiler then please add default
native TLS support for them in hbthread.h
Users using hb* scripts can simply use -mt switch when they want
to create MT program, f.e.:
hbmk -n -w3 -es2 -mt mttest01.prg
There are still some minor things which should be done but I'll
do them later. Current state seems to be fully functional.
The most important and still missing is our own file lock server
for RDD synchronization in POSIX systems. Kernel internally
recognize POSIX locks by PID and file i-node - not PID and file
handle. It means that the same file open more then once by one
process shares locks. Because POSIX locks can be overwritten
then we do not have any synchronization between aliased workareas
or threads using the same table in *nixes. We have to make
synchronization ourselves. I'll create such lock server ASAP.
Please test and enjoy using Harbour threads.
|
||
|
|
215e18e9bd |
2008-08-13 05:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/pp/ppcore.c
* harbour/source/pp/hbpp.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/hvm.c
* harbour/source/common/hbver.c
* harbour/source/macro/macrolex.c
* harbour/source/hbpcre/pcrecomp.c
* harbour/source/compiler/hbpcode.c
* harbour/contrib/hbmisc/spd.c
* harbour/contrib/hbsqlit3/sqlite3/sqlite3.c
* pacified warnings
* harbour/config/w32/dm.cf
* updated to work with SHELL env
- comment -w7 switch
|
||
|
|
c8bc7d5225 |
2007-11-12 19:22 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
+ harbour/include/hbassert.h
* harbour/include/hb_io.h
* harbour/source/rtl/gtstd/gtstd.c
* harbour/source/rtl/gtpca/gtpca.c
* harbour/source/rtl/fssize.c
* harbour/source/rtl/hbinet.c
* harbour/source/rtl/filesys.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/hbopt.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbstripl.c
* harbour/utils/hbver/hbverfix.c
* harbour/utils/hbpp/hbppcore.c
* removed dependences to unsupported by new MSVC header files
most of this modifications can be enabled also for standard Win32
builds
* harbour/source/common/hbwince.c
* do not create dummy LocalLock() and LocalUnlock() function in MSVC
WinCE builds
* harbour/source/rtl/gtwin/gtwin.c
+ added HB_WINCE_USE_POCKET_CONSOLE macro which enable
console support in WINCE builds (macro suggested by Marek Paliwoda)
* harbour/source/rtl/gtwvt/gtwvt.h
* harbour/source/rtl/gtwvt/gtwvt.c
* changed default window and font size on WinCE to values suggested
by Marek Paliwoda
Marek if you have a while please make test with MSVC WinCE/PocketPC
builds and current SVN code.
|
||
|
|
a3fc484d14 |
2007-11-07 13:53 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/pp/ppcore.c
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/cdpapi.c
* harbour/source/rtl/mlcfunc.c
* harbour/source/vm/classes.c
* harbour/source/common/reserved.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/hbfunchk.c
* cleaned possible dangerous code reported by Chen - many thanks
|
||
|
|
581507c90d |
2007-06-01 15:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/harbour.spec
* set attributes explicitly to clean some wrong attributes committed
to CVS and minor cleanup
* harbour/include/hbapierr.h
* harbour/source/rtl/errorapi.c
+ added hb_errorBlock()
* harbour/source/macro/macro.yyc
* harbour/source/compiler/harbour.yyc
* manual hack to pacify BCC warning messages
* harbour/include/hbpcode.h
* harbour/include/hbxvm.h
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/hbopt.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbstripl.c
* harbour/source/vm/hvm.c
+ added support for:
BEGIN SEQUENCE WITH <errorBlockExp>
[<statements;...>]
[ RECOVER [ USING oErr ] ]
...
[ ALWAYS ]
...
END
It works like normal BEGIN SEQUENCE but sets <errorBlockExp> as
ErrorBlock() before executing <statements;...> and restore
previous ErrorBlock() at the end or when exception will appear.
I hope it will make some xHarbour user happy ;-)
* harbour/include/hbcompat.ch
+ added preprocessor directive for TRY / CATCH / FINALLY / END
working like in xHarbour - translated to:
BEGIN SEQUENCE WITH { |oErr| Break( oErr ) }
...
[ RECOVER [ USING oErr ] ]
...
[ ALWAYS ]
...
END
|
||
|
|
75bd21860c |
2007-05-22 01:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
* harbour/include/hbapicls.h
* harbour/include/hbcomp.h
* harbour/include/hbvm.h
* harbour/include/hbvmpub.h
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/gencli.c
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbopt.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbstripl.c
* harbour/source/debug/dbgentry.c
* harbour/source/rdd/wafunc.c
* harbour/source/rtl/itemseri.c
* harbour/source/rtl/gtsln/gtsln.c
* harbour/source/vm/classes.c
* harbour/source/vm/dynsym.c
* harbour/source/vm/hvm.c
* harbour/source/vm/memvars.c
* harbour/source/vm/runner.c
* casting: changed some 'char *' to 'const char *', added const to some
other declarations, added workaround for GCC warnings about
dereferencing pointer with strict-aliasing optimization, etc.
|
||
|
|
88cda3200d |
2007-03-22 12:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/common.mak
* updated for new files - please check
* harbour/harbour.spec
* added compiler library
* harbour/bin/pack_src.sh
* harbour/bin/hb-func.sh
* updated for new files and libraries
* harbour/config/w32/mingw32.cf
* harbour/config/w32/watcom.cf
* harbour/config/w32/xcc.cf
* added winsock libraries
* harbour/include/hbapicdp.h
* harbour/source/rtl/cdpapi.c
+ added hb_cdpicmp() - not case sensitive version of hb_cdpcmp()
* harbour/include/hbapiitm.h
* harbour/source/vm/itemapi.c
+ hb_itemStrICmp(), hb_itemCopyFromRef(), hb_itemMoveFromRef()
* harbour/include/hbapi.h
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbexprop.h
* harbour/include/hbmacro.h
* harbour/include/hbpcode.h
* harbour/include/hbvmpub.h
* harbour/include/hbxvm.h
* harbour/source/common/expropt1.c
* harbour/source/compiler/complex.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/gencli.c
* harbour/source/compiler/genhrb.c
* harbour/source/compiler/genobj32.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.yyh
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/hbopt.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbstripl.c
* harbour/source/macro/macro.y
* harbour/source/macro/macro.yyc
* harbour/source/macro/macro.yyh
* harbour/source/macro/macrolex.c
* harbour/source/vm/Makefile
* harbour/source/vm/arrays.c
* harbour/source/vm/asort.c
* harbour/source/vm/classes.c
* harbour/source/vm/eval.c
* harbour/source/vm/garbage.c
* harbour/source/vm/hvm.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/macro.c
+ harbour/source/vm/hashes.c
+ harbour/source/vm/hashfunc.c
+ added hash items, f.e.:
local h1 := {=>}, h2 := { "a"=>1.234, "b"=>2.345 }
? h2[ "a" ], h2[ "b ]
+ added support for DYNAMIC function declaration - it allow to define
functions which are lately bound at runtime, f.e.:
/*** t01.prg ***/
dynamic func1
proc main()
local h:=__hrbload("t02.hrb")
? func1()
return
/*** t02.prg ***/
func func1
return "Hello!!!"
% use new FUNCALL structure to hold EXTERNAL and DYNAMIC functions,
it reduce memory usage, FUNCALL is much smaller then FUNCTION
% use symbol scope bits when possible instead of making some linear scan
+ added new enumarator message: __ENUMKEY - it allow to access
key value when hash item is base enumerator value, f.e.:
proc main()
local v, h:={"a"=>1.000,"b"=>2.000,"c"=>3.000}
heval( h, { |k,v,i| qout( k, v, i ) } ); ?
for each v in h
? v, "=>", v:__enumKey(), v:__enumValue(), v:__enumIndex(), ;
valtype(v:__enumBase())
v += 0.123
next
? ;heval( h, { |k,v,i| qout( k, v, i ) } )
return
+ added C level hb_hash*() functions
+ added support for full HASH item cloning and updated array cloning
to also clone nested hashes - please note that xHarbour does not do
that, in xHarbour ACLONE() clones _ONLY_ nested arrays and HCLONE()
_DOES_NOT_ clone _ANY_ nested items.
* harbour/include/hbextern.ch
+ added hash functions HB_H*()
* changed INET*() functions to HB_INET*()
+ added hash functions H*() and socket functions INET*() when
HB_COMPAT_XHB is set
* harbour/include/hbtypes.h
+ added missing HB_EXTERN_BEGIN / HB_EXTERN_END
* harbour/include/hbpp.h
* harbour/source/pp/ppcore.c
! added protection against automatic word concatenation in some cases
! fixed preprocessing expressions when match marker matches ';' token
* harbour/source/rtl/Makefile
+ harbour/source/rtl/itemseri.c
+ added functions for item serialization: HB_SERIALIZE() and
HB_DESERIALIZE() - these function are not binary compatible
with xHarbour functions with the same names but make very
similar job with the exception to serialization of codeblock
and object variables - Harbour does not allow to serialize
codeblocks and serialize objects as arrays.
In most cases these functions can replace the xHarbour ones
+ added HB_DESERIALBEGIN() and HB_DESERIALIZE() functions covered
by HB_COMPAT_XHB macro - this functions are only for compatibility
with existing xHarbour code, In Harbour HB_DESERIALBEGIN() is
dummy function which returns first parameter and HB_DESERIALNEXT()
is a simple wrapper to HB_DESERIALIZE() so it's not necessary to
use them.
* harbour/source/rtl/hbinet.c
* changed INET*() functions to HB_INET*() and enable them for default
build
+ added INET*() functions wrappers covered by HB_COMPAT_XHB macro
* harbour/source/rtl/hbrandom.c
+ added HB_RANDOMINT() - xHarbour compatible
* harbour/source/rtl/len.c
+ added support for HASHes
* harbour/source/rtl/valtype.c
+ added support for HASHes
+ added set of HB_IS*() functions - they are a little bit faster then
calling VALTYPE( v ) == <cVal>
- removed HB_ISBYREF() - this function cannot longer work, it was using
a Clipper incompatible anomalies in passing variables by reference I
fixed so it has to stop to work. If it will be realy necessary to
implement HB_ISBYREF() function then please inform me - it will have
to be done at compiler level or with some much deeper HVM stack
checking.
* harbour/source/vm/extend.c
! fixed hb_extIsArray() and hb_extIsObject() to work well with
parameters passed by reference.
Please note that now hb_extIsArray() return TRUE only for pure arrays
not object values.
* harbour/contrib/Makefile
+ harbour/contrib/tip/Changelog
+ harbour/contrib/tip/Makefile
+ harbour/contrib/tip/atokens.c
+ harbour/contrib/tip/base64x.c
+ harbour/contrib/tip/cgi.prg
+ harbour/contrib/tip/client.prg
+ harbour/contrib/tip/credent.prg
+ harbour/contrib/tip/cstr.prg
+ harbour/contrib/tip/encb64.prg
+ harbour/contrib/tip/encmthd.c
+ harbour/contrib/tip/encoder.prg
+ harbour/contrib/tip/encqp.prg
+ harbour/contrib/tip/encurl.prg
+ harbour/contrib/tip/ftpcln.prg
+ harbour/contrib/tip/hbhex2n.c
+ harbour/contrib/tip/httpcln.prg
+ harbour/contrib/tip/mail.prg
+ harbour/contrib/tip/popcln.prg
+ harbour/contrib/tip/smtpcln.prg
+ harbour/contrib/tip/tip.ch
+ harbour/contrib/tip/url.prg
+ harbour/contrib/tip/utils.c
+ added TIP library - code borrowed from xHarbour
Please test - a lot of above code is not well tested, also some peaces
were written over year ago for different things (f.e. serialization for
NETRDD) and now I collected them and committed.
The TIP library was not tested at all. It can be compiled but I cannot
say if it works - I hope that people familiar with it can make necessary
test and fixes.
It's also not the final version of low level HASH item code. I'm working
on more efficient structure which uses binary tries but I cannot say when
I'll finish it (maybe in this weekend or maybe in next year) so I committed
working version now even if I'm not happy with overall performance (BTW
not worser then in xHarbour)
|
||
|
|
8ce0d03aa0 |
2007-03-09 04:40 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/common.mak
* harbour/makefile.bc
* harbour/makefile.vc
* harbour/bin/hb-func.sh
* harbour/config/global.cf
* harbour/include/error.ch
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
- harbour/include/hbexprc.c
* harbour/include/hbexprop.h
* harbour/include/hbmacro.h
* harbour/source/Makefile
* harbour/source/common/expropt1.c
* harbour/source/common/expropt2.c
* harbour/source/compiler/Makefile
- harbour/source/compiler/exproptc.c
- harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/hbcomp.c
* harbour/source/compiler/hbgenerr.c
+ harbour/source/compiler/hbmain.c
* harbour/source/compiler/hbpcode.c
* harbour/source/macro/Makefile
* harbour/source/macro/macro.y
* harbour/source/macro/macro.yyc
- harbour/source/macro/macroc.c
+ harbour/source/main/Makefile
+ harbour/source/main/harbour.c
* harbour/source/vm/macro.c
* resolved name conflicts between compiler and macro compiler.
Now new compiler library is created.
There are some things which can be improved and cleaned yet
but it's enough to create single binaries with compiler+HVM+RTLs.
I updated non GNU make files but I cannot tested the modifications
- please check and fix me if necessary
|
||
|
|
d4f042a2a5 |
2007-02-27 12:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbexprc.c
* harbour/include/hbmacro.h
* harbour/include/hbpcode.h
* harbour/include/hbxvm.h
* harbour/source/common/hbdate.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbopt.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbstripl.c
* harbour/source/rtl/abs.c
* harbour/source/rtl/at.c
* harbour/source/rtl/chrasc.c
* harbour/source/rtl/datec.c
* harbour/source/rtl/dateshb.c
* harbour/source/rtl/diskspac.c
* harbour/source/rtl/disksphb.c
* harbour/source/rtl/gtfunc.c
* harbour/source/rtl/left.c
* harbour/source/rtl/len.c
* harbour/source/rtl/math.c
* harbour/source/rtl/minmax.c
* harbour/source/rtl/mod.c
* harbour/source/rtl/philes.c
* harbour/source/rtl/philesx.c
* harbour/source/rtl/replic.c
* harbour/source/rtl/round.c
* harbour/source/rtl/set.c
* harbour/source/rtl/space.c
* harbour/source/rtl/strcase.c
* harbour/source/rtl/strpeek.c
* harbour/source/rtl/transfrm.c
* harbour/source/rtl/trim.c
* harbour/source/rtl/type.c
* harbour/source/rtl/val.c
* harbour/source/rtl/word.c
* harbour/source/vm/hvm.c
* harbour/source/vm/macro.c
* added some PCODEs to cover all possible combination of ++, --, <op>=
operations in the same way and keep Clipper compatible RT errors.
* added some other PCODEs to optimize some commonly used expressions/
statements
* use HB_ERR_ARGS_BASEPARAMS instead of hb_paramError()
* some other cleanups and minor optimizations
* harbour/utils/hbtest/rt_math.prg
* update expected result for MOD() - it was not Clipper compatible and
it will be hard to make it compatible without introducing some Clipper's
side effects
|
||
|
|
48f8dba263 |
2007-02-08 23:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbgtinfo.ch
* harbour/contrib/libct/ctwin.c
* harbour/source/rtl/gtalleg/gtalleg.c
* harbour/source/rtl/gtcrs/gtcrs.c
* harbour/source/rtl/gtdos/gtdos.c
* harbour/source/rtl/gtos2/gtos2.c
* harbour/source/rtl/gtpca/gtpca.c
* harbour/source/rtl/gtsln/gtsln.c
* harbour/source/rtl/gtstd/gtstd.c
* harbour/source/rtl/gtwin/gtwin.c
* harbour/source/rtl/gtwvt/gtwvt.c
* harbour/source/rtl/gtxwc/gtxwc.c
+ added support for GTI_FULLSCREEN, GTI_KBDSUPPORT, GTI_ISCTWIN
* harbour/source/rtl/hbgtcore.c
! fixed line and box drawing when the coordinates are out of screen size
* harbour/include/hbapi.h
* harbour/include/hbcomp.h
* harbour/include/hbpcode.h
* harbour/include/hbstack.h
* harbour/include/hbvm.h
* harbour/include/hbxvm.h
* harbour/source/compiler/complex.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.yyh
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbstripl.c
* harbour/source/vm/classes.c
* harbour/source/vm/estack.c
* harbour/source/vm/hvm.c
* harbour/source/vm/itemapi.c
! added protection against cyclic references in arrays
* eliminated action parameter from hb_vmRequestReenter() /
hb_vmRequestRestore()
* moved s_lRecoverBase and s_uiActionRequest to HB_STACK structure
for future MT HVM version
+ added internal item structure hb_struRecover - it's not real item
but this structure is used to keep information about BEGIN SEQUENCE
data - it reduce HB_STACK usage
+ added support for ALWAYS clause in BEGIN SEQUENCE
The syntax is:
BEGIN SEQUENCE
<code>
[ RECOVER [ USING oErr ] ]
<recoverCode>
[ ALWAYS ]
<alwaysCode>
END [ SEQUENCE ]
It's guaranteed that <alwaysCode> is _ALWAYS_ executed even if
inside <code> or <recoverCode> some new exceptions like RETURN,
BREAK or QUIT will appear.
Please note that when the following code is executed:
BEGIN SEQUENCE
<code>
ALWAYS
<alwaysCode>
END
(without RECOVER clause) then BREAK exception inside <code> is not
recovered, <alwaysCode> is executed and then BREAK exception is
passed to outer BEGIN SEQUENCE. This is the same semantic as
used in TRY / [ CATCH ] / FINALLY / END
Those of you who prefer to use TRY / CATCH / FINALLY / END instead
of BEGIN SEQUENCE / RECOVER / ALWAYS / END can simply add to your
source code:
#command TRY => BEGIN SEQUENCE
#command CATCH [ oErr ] => RECOVER [ USING <oErr> ]
and:
errorBlock( {|oErr| break( oErr ) } )
Though instead of 'break( oErr )' I suggest to use some small function
which will support some basic recovery/substitute operations like in
default errorsys() and LockErrHandler() to not break existing code
which may depends on the default behavior.
If you want I can add direct support for TRY / CATCH / FINALLY / END
but I'm not sure it's really necessary.
Please note also that in Harbour ALWAYS code is execute even for QUIT
excpetion.
When <alwaysCode> is executed current exception is stored and restored
when is finished. If new exception appears inside <alwaysCode> then
restored exception depends on the priority in the following order:
QUIT // highest priority
BREAK
RETURN
If both exceptions have the same priority and contain additional value
(error object in BREAK or return value in RETURN) then the recently set
one is restored. It's similar behavior to destructor code.
* harbour/source/common/hbstr.c
* moved one character length string table (hb_szAscii) from hvm.c
to use it also in compiler and preprocessor
* harbour/source/compiler/ppcomp.c
* harbour/source/pp/ppcore.c
* harbour/source/pp/pplib.c
* tuned error messages to be more Clipper compatible
% use static strings from hb_szAscii
* harbour/source/rtl/alert.prg
* use hb_gtInfo( GTI_FULLSCREEN ) to detect type of GT driver
! some minor fixes
TOFIX: we have to also use GTI_ISCTWIN or add window allocation
to standard GT drivers to be Clipper compatible when CTWIN
is used - In Clipper Tools ALERT() works in differ way then
the standard one. It creates separate window box to display
data, supports SETKEY(), etc. I'll think about adding some
extended support for ALERT() and similar operations (f.e.
separate debugger windows) to GT API so it will be also
possible to overload standard alert() command by GUI message
box in GTGUI and similar GT drivers.
* harbour/source/rtl/binnumx.c
! fixed U2BIN() - wrong casting
|
||
|
|
71acb177c3 |
2007-01-24 10:25 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/config/w32/bcc32.cf
* harbour/include/hbexprb.c
* harbour/include/hbpcode.h
* harbour/include/hbxvm.h
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbstripl.c
* harbour/source/rtl/set.c
* harbour/source/rtl/gtsln/gtsln.c
* harbour/source/vm/hvm.c
* recent fixes from Beta1
* harbour/contrib/libct/Makefile
- harbour/contrib/libct/bit1.c
- harbour/contrib/libct/bit2.c
- harbour/contrib/libct/bit3.c
+ harbour/contrib/libct/bitnum.c
! rewritten bit functions
* harbour/contrib/libct/addascii.c
* cleanup
* harbour/contrib/odbc/Makefile
* harbour/contrib/odbc/odbc.c
* harbour/contrib/odbc/sql.ch
- harbour/contrib/odbc/sql.h
- harbour/contrib/odbc/sqlext.h
- harbour/contrib/odbc/sqltypes.h
* harbour/contrib/odbc/todbc.prg
! synced with xHarbour
* harbour/contrib/rdd_ads/ads1.c
! fixed typo in DBI_GETHEADERSIZE
* harbour/contrib/rdd_ads/adsfunc.c
+ added ADSDDREMOVEINDEXFILE - borrowed from xHarbour
* harbour/source/rtl/alert.prg
* minor cleanup
* harbour/source/rtl/gtfunc.c
* use HB_ERR_ARGS_BASEPARAMS in error messages
* harbour/source/rtl/transfrm.c
* casting
|
||
|
|
40999edb49 |
2006-12-28 16:40 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hbexprb.c
* harbour/include/hbexprc.c
* harbour/include/hbpcode.h
* harbour/include/hbpp.h
* harbour/include/hbxvm.h
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/gencli.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/hbgenerr.c
* harbour/source/compiler/hbpcode.c
* harbour/source/vm/hvm.c
* harbour/source/vm/macro.c
* changed HB_P_MACROPUSHINDEX PCODE behavior - now it does not evaluated
macro expression
* eliminated HB_ET_MACRO_INDEX - HB_ET_MACRO_LIST can be used instead
* accept ... in codeblocks only when codeblocks parameters are defined
as variables, f.e: {|a,b,...|qout(a+b,...)}
! fixed error in a[&s]:=100
+ added support for a[...] - now ... can be used in the same context as
xbase++ like multivalue macro (a[&s])
* disabled ++, --, <op>= optimizations when -kc (strict Clipper
compatibility mode) compiler switch is used
|
||
|
|
7a13cae5e3 |
2006-12-27 15:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hberrors.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbpcode.h
* harbour/include/hbxvm.h
* harbour/source/common/expropt1.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hbgenerr.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbstripl.c
* harbour/source/vm/hvm.c
+ added support for passing optional parameters to called function, f.e.:
proc p( a, b, ... )
qout( a, b, "X", ... )
* forbid creating function pointer when function is used with parameters,
f.e.: x:=@f1(1,2,3)
* harbour/source/compiler/complex.c
* cleaned all restrictions on reserved words I've found - if I missed
sth then please inform me. The previous behavior and some error
messages are used with -kc compiler switch
* harbour/source/rtl/symbol.prg
* harbour/source/rtl/tobject.prg
! eliminated limitations in number of constructor parameters
(new syntax with passing optional parameters used)
|
||
|
|
f63975287b |
2006-12-18 19:30 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/config/w32/bcc32.cf
* cleanup
+ harbour/config/w32/xcc.cf
+ added XCC support
* harbour/contrib/btree/hb_btree.c
* use hb_vmAtInit()/hb_vmAtExit() instead of INIT/EXIT functions defined
from C code
* harbour/contrib/libct/tab.c
* casting
* harbour/contrib/odbc/odbc.c
! removed #include <malloc.h> - it should not be used with new C
compilers
I think that we should replace this library with hbodbc from xHarbour.
* harbour/contrib/ole/ole2.c
* updated for XCC
* harbour/include/hbdefs.h
* include stdint.h if available
* harbour/source/compiler/complex.c
! fixed yet another stupid mistake in WITHOBJECT token
* harbour/include/hbpcode.h
* harbour/include/hbxvm.h
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbstripl.c
* harbour/source/vm/hvm.c
+ added HB_P_SWAP <n> PCODE
* harbour/include/hbcompdf.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbexprc.c
* harbour/include/hbexprop.h
! fixed GPF during compilation of @:var, @:&var, @o:&var
+ added support for @o:&var and @:var, @:&var inside WITH OBJECT
statement
* changed PCODE generated of ++,--,+=,-=,...
Now left side expression is evaluated _ONLY_ once and when object
messages are used it's guarantied that exactly the same object
variable will be used. It also fixes some problems which exists
in Clipper. This optimization is enabled by -kh flag (by default)
and can be disabled with -kc.
% optimize ald macros in ++,--,+=,-=,... operations
* add automatically "_" prefix when macro message is used in assignment
context, f.e.:
s:="osCode"
o:=errorNew()
? o:&s
o:&s := 100
? ++o:&s
? o:&s *= 5
* harbour/include/hblang.ch
- removed #xtranslate - this file is included by C code and some C
compiler do not like unknown directives
* harbour/utils/hbtest/rt_math.prg
+ added test code for <op>assign and (pre/post)(inc/dec)rementation,
macro messages and WITH OBJECT
* harbour/source/compiler/harbour.c
* harbour/source/rdd/dbf1.c
* harbour/source/rtl/errorapi.c
* harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/gtdos/gtdos.c
* harbour/source/rtl/gtos2/gtos2.c
* harbour/source/rtl/gtpca/gtpca.c
* harbour/source/rtl/gtsln/gtsln.c
* harbour/source/rtl/gtstd/gtstd.c
* harbour/source/rtl/gtwin/gtwin.c
* casting and warning cleanup
* harbour/utils/Makefile
+ added $(HB_UTILS)
- harbour/utils/hbpp/hbpp.h
+ harbour/utils/hbpp/hbppdef.h
* harbour/utils/hbpp/hbpp.c
* harbour/utils/hbpp/hbppcomp.c
* harbour/utils/hbpp/hbppcore.c
* harbour/utils/hbpp/hbpplib.c
* harbour/utils/hbpp/hbpptbl.c
* harbour/utils/hbpp/pragma.c
* renamed hbpp.h to hbppdef.h to avoid possible conflict with hbpp.h
in include directory
* casting and warning cleanup
|
||
|
|
bdb38dde43 |
2006-12-15 16:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hbdefs.h
* harbour/include/hberrors.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbexprc.c
* harbour/include/hbpcode.h
* harbour/include/hbxvm.h
* harbour/source/common/expropt1.c
* harbour/source/common/expropt2.c
* harbour/source/common/hbstr.c
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/gencobj.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hbgenerr.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbstripl.c
* harbour/source/macro/macro.y
* harbour/source/macro/macro.yyc
* harbour/source/rtl/console.c
* harbour/source/rtl/isprint.c
* harbour/source/rtl/left.c
* harbour/source/rtl/right.c
* harbour/source/rtl/strtran.c
* harbour/source/vm/codebloc.c
* harbour/source/vm/hvm.c
* harbour/source/vm/macro.c
* general PCODE cleanup and address most of TODO/TOFIX notes in
source code:
! fixed GPF traps when too long string or codeblock is generatd
+ added support for 16MB codeblocks and strings
! removed macrocompiler limitation for jumps range
! fixed GPF when more then 255 local variables is used and added
support for 2^15 locals
! removed all strtok() functions
% added optimization for all +=, -=, *=, %=, ^=, **= operations
when left side of expression is variable or array item
% added optimization for all +=, -=, *=, %=, ^=, **= operations
when left side of expression is object method and updated ++, --
for new code. It's still disabled until we will not add support
for late evaluated reference items to HVM
! fixed a[++i]++ and similar operations (a[++i]*=2, ...). Now ++i is
executed only once. It's not Clipper compatible but it was in
TODO note in source code. It can be disabled by -kc option
* finished support to xHarbour like #pragma TEXTHIDDEN(1)
! fixed local add int optimization when PARAMETERS used after
optimization changed local variable number over 255
! fixed GPF trap when in HB_P_<op>EQ PCODEs when executed for
direct values
* others
! fixed problems reported by Chen
* optimized strtran(), left(), right() to not create new string copy
when the same value is returned
|
||
|
|
33ccad6661 |
2006-11-27 02:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/tests/codebl.prg
* harbour/tests/langmsg.prg
* harbour/utils/hbpptest/pp_test.prg
* harbour/utils/hbpptest/pretest.prg
* harbour/samples/pe/license.txt
* removed carriage return (\r) characters
* harbour/include/hbcomp.h
* harbour/include/hbapi.h
* harbour/include/hbcompdf.h
* harbour/include/hbexprb.c
* harbour/include/hbexprop.h
* harbour/source/vm/macro.c
* harbour/source/compiler/hbcomp.c
* harbour/source/compiler/complex.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.l
* harbour/source/compiler/harbour.y
* harbour/source/compiler/genjava.c
* harbour/source/compiler/hbcomp.c
* harbour/source/compiler/hbident.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/ppcomp.c
* separated HB_COMP and HB_MACRO definitions and added HB_COMMON
structure used when HB_COMMON_SUPPORT macro is set
* hide HB_MACRO internal definitions in hbapi.h when HB_MACRO_SUPPORT
is not set
These modifications should help in future compiler and macro compiler
integration into single binary.
+ added clipper compatible error message in unclosed structures
In general we should cleanup rules to make error reporting more
user friendly and Clipper compatible
% eliminated unnecessary allocations
+ added int mode member to common part of HB_COMP and HB_MACRO
structure. It's initialized to HB_MODE_MACRO or HB_MODE_COMPILER
+ add TOFIX note about memory leaks in cParamTypes and pParamClasses
members of COMDECLARED structure. It's a part of unfinished strong
typing code. I do not know what Ryszard plan to do with it so I'm
leaving it as is. The part of strong typing which were operating
on emulated HVM stack has been removed.
* removed static variables from genjava.c. Also gencli.c and genobj32.c
should be fixed but this will not make this code working so I haven't
touched it.
* changed 3-rd parameter of hb_compIdentifierNew() from BOOL to int.
Now it can have the following values: HB_IDENT_STATIC, HB_IDENT_FREE,
HB_IDENT_COPY. This modification will allow in the future using common
for static and dynamic symbol hash table without additional source code
changes. I also plan to use identifier hash table in PP the reduce
number of memory allocations and speed-up preprocessing by using
second level hashing for hash keys.
* harbour/source/common/expropt1.c
* harbour/source/common/expropt2.c
* changed HB_MACRO_SUPPORT to HB_COMMON_SUPPORT to automatically detect
possible conflicts between compiler and macro compiler
! removed first detected conflict which existed for long time
+ added hb_compExprMacroAsAlias() function to convert HB_ET_VARIABLE
expression to HB_ET_ALIAS.
* harbour/source/macro/macro.y
! fixed using prefix¯o-> and ¯o.sufix-> when macro cannot be
substituted by compiler, f.e.:
M->v := NIL
x := "&v.1->fld"
M->v := "v"
M->v1:= "data"
? &x
! fixed memory leak in macro substituted expression compilation
* harbour/source/vm/macro.c
! fixed initialization of some HB_MACRO members
! fixed value returned for type("&V->F") when alias does not exist
- removed not longer used hb_comp_bShortCuts global variable
|
||
|
|
9cd2098d6d |
2006-11-23 20:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
* harbour/include/hbcomp.h
+ harbour/include/hbcompdf.h
* harbour/include/hberrors.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbexprc.c
* harbour/include/hbexprop.h
* harbour/include/hbmacro.h
* harbour/include/hbpp.h
* harbour/include/hbvm.h
* harbour/source/common/expropt1.c
* harbour/source/common/expropt2.c
* harbour/source/compiler/Makefile
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/complex.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/gencli.c
* harbour/source/compiler/gencobj.c
* harbour/source/compiler/genhrb.c
* harbour/source/compiler/genjava.c
* harbour/source/compiler/genobj32.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.l
* harbour/source/compiler/harbour.y
* harbour/source/compiler/hbcomp.c
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hbfunchk.c
* harbour/source/compiler/hbgenerr.c
* harbour/source/compiler/hbident.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/ppcomp.c
* harbour/source/macro/macro.y
* harbour/source/pp/ppcore.c
* harbour/source/pp/ppgen.c
* harbour/source/pp/pplib.c
* harbour/source/vm/cmdarg.c
* harbour/source/vm/estack.c
* harbour/source/vm/fm.c
* harbour/source/vm/macro.c
* harbour/utils/hbpp/hbpp.c
* harbour/utils/hbpp/hbpp.h
* harbour/utils/hbpp/hbppcomp.c
* harbour/utils/hbpp/hbppcore.c
* harbour/utils/hbpp/hbpplib.c
* harbour/utils/hbpp/pragma.c
* changed the internal compiler API to be MT safe.
All global and static non constant variables replaced by
HB_COMP structure which have all compiler context settings.
It's possible to allocate simultaneously many compiler contexts
and compile code. Only constant/read only variables are shared.
In macro compiler HB_COMP is replaced by HB_MACRO.
In source code I everywhere used to macros: HB_COMP_DECL and
HB_COMP_PARAM which are equivalents of old HB_MACRO_DECL and
HB_MACRO_PARAM definitions.
We will only have to change compiler FATAL errors support to
not execute exit() for non batch systems.
* make macro compiler fully MT safe
* removed not longer used definitions and variables
! add direct accessing to PP line number information - it fixes missing
line numbers reported recently
! added generating .ppo files when tokens are teken directly by compiler
- it fixes empty .ppo file problem
! clear hb_stack internall variables after removing hb_stack to avoid
possible GPF if application still works and try to access unexsiting
hb_stack
! do not allocate new memory block when final FM statistic report is
generated - it fixes problem with GPF when application compiled with
FM statistic exits and CLIPPER envvar is set.
! fixed memory leak hb_cmdargCheck()
! added to harbour.y symbol destructors - it should fixes memory leaks
in syntax errors but it uses quite new bison feature which is not
fully supported yet. Unfortunately it's also not MT safe and the
destructors implementation in 1.875c does not respect %parse-param.
Bison documentation says that it should so I hope it will be fixed
soon (or maybe even already is in the newest bison versions) before
I'll add multi context compilation support. If not then I will have
to add some workaround. I can pass compiler context pointer inside
YYSTYPE using hack in a lexer but it will force really huge number
modifications in existing bison rules so probably it will be much
easier to fix bison or write a small tool to update generated parser.
* other modifications - the total size of patch is nearly 1MB and
detail description will have to take me few days.
|
||
|
|
4aeac1e509 |
2006-09-20 14:15 UTC+0100 Ryszard Glab <rglab//imid.med.pl>
* include/hbpcode.h
+ added new pcode HB_P_VFRAME
* include/hbapi.h
+ added USHORT paramdeclcnt to asSymbol structure
* include/hbstack.h
* source/vm/estack.c
+ added hb_stackLocalVariable() to acces local variables
* source/compiler/genc.c
* source/compiler/gencc.c
* source/compiler/harbour.c
* source/compiler/harbour.l
* source/compiler/harbour.y
* source/compiler/hbdead.c
* source/compiler/hbfix.c
* source/compiler/hblbl.c
* source/compiler/hbpcode.c
* source/compiler/hbstripl.c
* source/vm/hvm.c
+ added support for variable number of parameters in
functions/procedures
+ tests/varparam.prg
* example usage of new syntax for variable number of
parameters
* source/vm/arrayshb.c
* changed HB_APARAMS() to use current stack frame if no
arguments are passed ( HB_APARAMS() == HB_APARAMS(0) )
SYNTAX for variable number of parameters
1) [FUNCTION|PROCEDURE] name( ... )
or
2) [FUNCTION|PROCEDURE] name( var1, var2, varN, ... )
To access passed parameters use the following:
PCOUNT() - returns number of passed parameters
HB_PVALUE( iParamNum ) - returns <iParamNum> parameter
HB_APARAMS() - returns array with all passed parameters
or usual name of parameter variable in case of syntax 2)
|
||
|
|
18f74581d1 |
2006-09-19 11:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
* harbour/include/hbapicls.h
* harbour/include/hbpcode.h
* harbour/include/hbxvm.h
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbstripl.c
* harbour/source/vm/arrays.c
* harbour/source/vm/classes.c
* harbour/source/vm/codebloc.c
* harbour/source/vm/hvm.c
* harbour/source/vm/itemapi.c
+ added three new PCODEs:
HB_P_MACROSEND - to use for: s:=1,2,3"; o:=send(&s)
HB_P_PUSHOVARREF - to create references to object variables: @o:var
HB_P_ARRAYPUSHREF - to create references to array items, it can be used
in some optimization, f.e.: a[ <exp1> ] += <exp2>
or directly by: func( @a[ <exp> ] )
if we add passing array elements by reference
Implemented in HVM and PCODE generation, the compiler has to be
modified yet to use them.
* changed last parameter in hb_codeblockGetRef() - I'd like to have
all variables in hb_struRefer structure in one place: hb_itemUnRefOnce()
for easier modifications in the future.
* replaced in hb_struRefer 'itemsbase' with 'array'.
+ added hb_arrayGetItemRef() to create references to array elements.
Such reference updates array reference counters.
* changed STATICs passed by reference to use new array item references.
! block destructor execution after classy releasing on HVM exit
|
||
|
|
cb87fbf546 |
2006-07-26 22:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
* harbour/include/hbexpra.c
* harbour/include/hbexprb.c
* harbour/include/hbexprop.h
* harbour/include/hbpcode.h
* harbour/include/hbxvm.h
* harbour/source/common/expropt1.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* harbour/source/compiler/gencli.c
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbstripl.c
* harbour/source/vm/hvm.c
* harbour/source/vm/macro.c
* changed support for XBASE++ extended syntax in expressions like:
v:="1,2,3"
x := a[ &v ]
a := { &v }
f( &v )
Now all data is stored on HV * stack without any external registers
which have to be saved/restored or updated in chosen operation.
This modification was necessary to make HV * reentrant safe and it
also eliminated some small overhead caused by old code.
I hope I haven't break anything in compiler - Ryszard please fix me
if I made sth wrong.
* harbour/source/vm/hvm.c
* harbour/source/compiler/harbour.y
* revert FOR/NEXT stop condition to be Clipper compatible
PCODE table has been updated and all .prg code which used modified PCODEs
has to be recompiled
|
||
|
|
912b301c85 |
2006-07-14 16:00 UTC+0100 Ryszard Glab <rglab//imid.med.pl>
* include/hbcomp.h
* include/hberrors.h
* include/hbexpra.c
* include/hbexprb.c
* include/hbexprc.c
* include/hbmacro.h
* include/hbpcode.h
* include/hbpp.h
* include/hbxvm.h
* source/common/expropt1.c
* source/compiler/cmdcheck.c
* source/compiler/expropta.c
* source/compiler/exproptb.c
* source/compiler/exproptc.c
* source/compiler/genc.c
* source/compiler/gencc.c
* source/compiler/gencli.c
* source/compiler/genhrb.c
* source/compiler/genjava.c
* source/compiler/genobj32.c
* source/compiler/harbour.c
* source/compiler/harbour.l
* source/compiler/harbour.y
* source/compiler/hbdead.c
* source/compiler/hbfix.c
* source/compiler/hbfunchk.c
* source/compiler/hbgenerr.c
* source/compiler/hblbl.c
* source/compiler/hbpcode.c
* source/compiler/hbstripl.c
* source/macro/macroa.c
* source/macro/macrob.c
* source/macro/macroc.c
* source/vm/hvm.c
* source/vm/macro.c
* fixed compilation of code that uses '@' pass by
reference. The following syntax is no longer supported:
var := IIF( .T., @var, var )
however you can still use the following:
funcall( IIF( bPassbyRef, @someVar, someVar ) )
+added support for the following statement:
WITH OBJECT <objexpression>
...
END
inside this statement you can use simplified form of sending
messages to the object specified by <objexpression>
:message( ) instead objexpression:message()
:property instead objexpression:property
The runtime error will be generated at the time of message
sending (or property access/assign) if <objexpression>
is not a value of type object.
You can use the reserved property:
:__withobject
to access/assign the controlling object.
*fixed support for command line response file (@file.clp)
to be compatible with Clipper (Clipper genertes a single
obj file)
*fixed memory leaks when there is a fatal error in autoopened
module (using DO ... statement)
*implicit startup functions are removed from the list of
functions before generation of output code
* source/pp/ppcomp.c
* source/pp/pplib.c
* source/pp/ppcore.c
* redefinition of #define no longer causes a memory leak
* fixed repeatable optional clauses
#xcommand SET <var1> [, <varN>] WITH <val> =>
<var1>:=<val>[; <varN>:=<val>]
* fixed compilation of optional clauses (when used in different
order then declared) -this fixes the following long
waiting bug:
#command MYCOMMAND [<mylist,...>] [MYCLAUSE <myval>] => ;
MyFunction( {<mylist>} [, <myval>] )
MYCOMMAND MYCLAUSE 321 "HELLO"
* fixed restricted macro match marker <x:&>
* tests/Makefile
- tests/pretest.prg
+ utils/hbpptest
+ utils/hbpptest/Makefile
+ utils/hbpptest/pretest.prg
* moved file 'pretest.prg' from tests to separate directory
to make easier validation of the preprocessor
* TODO
* added note to fix hb_objGetMethod() so it will not generate
error if there is no method
* doc/en/clipper.txt
* added documentation for WITH OBJECT usage
|
||
|
|
fbd8b70d4b |
2006-03-28 13:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
+ added hb_compPCodeSize() and hb_compStrongType() declarations
* harbour/include/hbpp.h
* formatting
* harbour/source/compiler/Makefile
+ harbour/source/compiler/hbstrong.c
* harbour/source/compiler/hbpcode.c
* moved strong typing code to separate file
* harbour/source/compiler/hbpcode.c
+ added hb_compPCodeSize() function
+ added support for automatic size checking of variable size PCODEs
in hb_compPCodeEval()
* harbour/source/compiler/gencc.c
* added escaping of '?' character in generated strings to
avoid possible conflicts with trigraph sequences which
are part of ANSI C standard
* force .0 at the end of double numbers to avoid possible range
conflicts in generated .c files
* removed unnecessary HB_SYMBOL_UNUSED()
* harbour/source/compiler/harbour.l
* harbour/source/compiler/harbour.y
* harbour/source/macro/macro.l
* harbour/source/macro/macro.y
* added #define realloc hb_xrealloc
* harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbstripl.c
* use hb_compPCodeSize() function
* removed not longer necessary functions for checking the real size
of variable size PCODEs
* harbour/source/vm/hvm.c
* fixed RT error number in hb_vmAddInt() for negative values to be
Clipper compatible
|
||
|
|
29f11ab65c |
2006-03-25 03:30 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
* added pEnd to hb_stack structure to speed up hb_stackPush()
which is one of the most often used operation in HVM.
* harbour/include/hbapi.h
* small trick with HB_IS_* macros to give a compiler a chance to make
them faster on some machines
* harbour/source/compiler/genc.c
! fixed stripping non identifier characters from symbol table name
* harbour/source/compiler/hbpcode.c
* cleaned comment
* harbour/source/rdd/dbf1.c
* set Operation in error object to field name in field{put,get} methods.
+ added DBI_LOCKOFFSET
* harbour/source/vm/classes.c
* formatting
* harbour/source/vm/hvm.c
* harbour/source/vm/itemapi.c
* some minor speed optimizations
|
||
|
|
4ee1406dd5 |
2006-03-21 02:25 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/make_gnu.bat
* harbour/make_gnu.cmd
* harbour/make_gnu.sh
* added information about GTWVT to GT description for Windows
* harbour/contrib/rdd_ads/ads1.c
* harbour/contrib/rdd_ads/adsfunc.c
* harbour/source/rdd/dbf1.c
* synced with xHarbour
* harbour/source/rtl/console.c
! fixed PROW() updating to be Clipper compatible when row number
exceed 16bit integer value
* harbour/source/rtl/filesys.c
! fixed possible GPF when hb_fsCurDirBuff()
* harbour/source/rtl/str.c
* harbour/source/rtl/strzero.c
* minor optimizations
* harbour/source/rtl/strpeek.c
! fixed accessing the last character in STRPEEK() and STRPOKE()
* harbour/include/hbgtinfo.ch
* harbour/source/rtl/gtwin/gtwin.c
+ synced with recent xHarbour modifications
* harbour/source/rtl/gtwvt/gtwvt.c
* cleaned BCC warning
* harbour/include/hbapi.h
* harbour/source/vm/codebloc.c
* declare BYTE * passed to hb_codeblockNew() as const
* harbour/include/hbpcode.h
! fixed the PCODE numbers in PCODE description, 122 was repeated for
two different PCODEs: HB_P_ONE and HB_P_MACROLIST
* harbour/source/compiler/genc.c
! fixed hb_p_functionshort pcode size returned by genc function
! fixed double value presented in verbose genc mode for HB_P_PUSHDOUBLE
! fixed number of cases presented in verbose genc mode for HB_P_SWITCH
* harbour/source/compiler/hbdead.c
+ added support for dead code elimination in functions which uses
SWITCH ...; CASE ...; ...; END syntax
* harbour/source/compiler/harbour.c
* harbour/source/compiler/hbfix.c
! fixed optimization for HB_P_PUSHLOCALNEAR and HB_P_POPLOCALNEAR.
It was a long existing bug not reported so far because 0, 1 and 2
PCODEs uses only one BYTE and bad PCODE tracing in hbfix.c didn't
caused bad side effects as long as number of locals in function
was smaller then 768. Now for functions HB_P_PUSHLOCAL and
HB_P_POPLOCAL is used and later changed to NEAR version in hbfix.c
if possible.
* harbour/source/compiler/hbfix.c
* join sequential jumps to optimize constructions like:
while ...
...
if ...
exit
endif
enddo
* harbour/source/compiler/hbdead.c
* remove HB_P_END PCODE also at the and of function if is repeated
just before, f.e. in code like (source/rtl/color53.prg):
Function RADGRDEFCO( cColor )
if isdefcolor()
Return applydefau( cColor, "W/N", "W/N", "W+/N")
Else
Return applydefau( cColor, 3, 1, 4)
endif
Return nil
Now such redundant constructions like above are fully stripped by
compiler anyhow if someone has time and think is important then can
clean also this .prg code.
* harbour/include/Makefile
* harbour/include/hbcomp.h
+ harbour/include/hbxvm.h
* harbour/source/compiler/Makefile
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/genc.c
+ harbour/source/compiler/gencc.c
+ harbour/source/compiler/hblbl.c
* harbour/source/compiler/hbpcode.c
* harbour/source/vm/hvm.c
+ added support for generating real C code not PCODE in .c files.
Now with -gc3 Harbour will generate .c files with real .c code
which is later compiled to real machine code.
I left PCODE only for code block definitions though it's also
possible to have even code block compiled to machine code but
we will have to add a flag to codeblock structure which will
be checked at runtime and proper method of execution in EVAL
will be chosen. If you think it's worth of afford then I can
add it too in some spare time.
The final binaries are noticable longer then the one which has
only PCODE but they are faster. The speed improvement depends
on type of operations. The pure Clipper code which does not
execute any external time consuming C functions compiled with
-gc3 is from 10% to 50% faster.
The side effect of generating pure machine code is also harder
recompilation but it does not mean that is impossible. If sth
can be executed by some machines (virtual or hardware) then it
can always be decompiled by definition.
This modification opens door for farther optimization, f.e. when
we will have fully working strong type support then we can add
using native .c types.
In fact this module is PCODE to .c translater not part of compiler
and can be used as separate module to translate generated PCODE,
f.e. .hrb files.
Maybe in the future we will change the compiler to generate meta
code not directly PCODE and it will be possible to make optimizations
on this meta code which will depend on selected output type:
VHM PCODE, C code, .NET code, etc. but at this moment adding support
for .c compilation directly into compiler will make the compiler code
too much complicated for me - IMHO it's better to invest time into
clear separation to FRONT_END->REAL_COMPILER->BACK_END
Please make test with your code. I rebuild whole Harbour code with
-gc3 set in HB_FLAGS in harbour/config/rules.cf and all seems to
work correctly. hbtest returns exactly the same results.
I also made tests with my programs and they work correctly but
I had to define actions for all PCODEs and it's possible that made
some typos in some of them which are very seldom used so your tests
will be very important.
|
||
|
|
1311b9d4ea |
2006-02-14 18:15 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/harbour.c
* enabled FM statistic by default when compiled without:
-DHB_FM_STATISTICS_OFF
after last Ryszard modification there is no memory leak in valid
.prg code so this may help us to find some unknown problems.
* harbour/include/hbcomp.h
* harbour/source/compiler/hbpcode.c
* formatting
* harbour/source/rdd/dbcmd.c
* fixed GPF in DBF2TEXT when work are is not in use.
* harbour/source/rdd/dbfntx/dbfntx1.c
* disabled validation of unused index pages - Clipper left them
dirty so xHarbour reported that index is corrupted
* harbour/source/rtl/dbdelim.prg
* generate 2001 RT error when work area is not in used() state
before export file is created.
* harbour/source/rtl/errorapi.c
* set DOSERROR() to oError:OSCODE when RT error is generated
It's documented Clipper behavior.
* harbour/source/vm/hvm.c
* some fixes in new operators and removed unnecessary
long->double->long conventions
|
||
|
|
6f0e36f665 |
2006-02-14 11:40 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
* include/hbapiitm.h
* include/hbcomp.h
* include/hbexpra.c
* include/hbexprb.c
* include/hbexprc.c
* include/hbexprop.h
* include/hbpcode.h
* source/common/expropt1.c
* source/common/hbfsapi.c
* source/compiler/expropta.c
* source/compiler/exproptb.c
* source/compiler/exproptc.c
* source/compiler/genc.c
* source/compiler/harbour.c
* source/compiler/harbour.l
* source/compiler/harbour.y
* source/compiler/hbdead.c
* source/compiler/hbfix.c
* source/compiler/hbpcode.c
* source/compiler/hbstripl.c
* source/macro/macro.y
* source/macro/macroa.c
* source/macro/macrob.c
* source/macro/macroc.c
* source/pp/ppcore.c
* source/vm/hvm.c
* source/vm/itemapi.c
* fixed many more memory leaks in the compiler
(the Harbour code compiles itself with no memory leaks).
However there are still leaks when the compiler aborts
compilation due to errors.
+ added optimalization of '+=' '-=' '*=' '/=' operators
+ added hb_itemGetNDDec(),
hb_itemPutHBLong(),
hb_itemPutNumType()
borrowed from xHarbour
NOTE: new pcodes:
HB_[PLUS|MINUS|MULT|DIV]EQ
HB_[PLUS|MINUS|MULT|DIV]EQPOP
recompile all sources.
|
||
|
|
a290c984e7 |
2006-02-04 17:05 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/harbour.spec
* harbour/make_bsd.sh
* harbour/make_drw.sh
* harbour/make_gnu.sh
* harbour/make_rpm.sh
* harbour/make_tgz.sh
* harbour/bin/hb-func.sh
* harbour/bin/pack_src.sh
* harbour/config/c.cf
* harbour/config/global.cf
* harbour/config/rules.cf
* harbour/config/darwin/gcc.cf
* harbour/config/darwin/global.cf
* harbour/config/dos/djgpp.cf
* harbour/config/dos/global.cf
* harbour/config/dos/install.cf
* harbour/config/dos/owatcom.cf
* harbour/config/hpux/gcc.cf
* harbour/config/hpux/global.cf
* harbour/config/linux/gcc.cf
* harbour/config/linux/global.cf
* harbour/config/linux/owatcom.cf
* harbour/config/sunos/gcc.cf
* harbour/config/w32/watcom.cf
* include ADSRDD by default in RPMs
* updated for new RPM which does not accept some old tags
* set -fPIC on 64bit platforms
+ added /etc/harbour/hb-charmap.def
* updated for new GT system and drivers
* harbour/contrib/dot/pp.prg
* harbour/contrib/dot/pp_harb.ch
* use _APMAIN as startup function
* cleaned direct access to item internals
* harbour/contrib/libct/Makefile
+ harbour/contrib/libct/ctwfunc.c
+ harbour/contrib/libct/ctwin.c
+ harbour/contrib/libct/ctwin.h
* added CT3 like Window System - it's a GT driver which inherits
from the existing one and adds CTW functionality
* harbour/contrib/libct/screen1.c
* updated for GTAPI modifications
* harbour/contrib/libnf/Makefile
* harbour/contrib/libnf/chdir.c
* harbour/contrib/libnf/mkdir.c
* harbour/contrib/libnf/rmdir.c
* use hb_fs*() API functions instead of calling DOS interrupts
Now NF dir functions works on all platforms - it will be nice
to update other functions too.
* harbour/contrib/libnf/dispc.c
* harbour/contrib/libnf/ftattr.c
* updated for GT API modifications, some of this code still depends
on EGA/VGA video buffer so will work only if user will force in GT
using it - it will be nice to rewrite them
* harbour/contrib/odbc/odbc.c
* harbour/contrib/ole/ole2.c
* casting and cleaning direct access to item internals
* harbour/contrib/rdd_ads/ads1.c
* harbour/contrib/rdd_ads/adsfunc.c
* harbour/contrib/rdd_ads/adsmgmnt.c
* synced with xHarbour
* harbour/include/Makefile
* added new header files
+ harbour/include/hbgtinfo.ch
+ added GTI_* defintions for hb_gtInfo() function.
This function works in similar way to dbInfo() in RDD.
The GTI_* definitions are taken from xHarbour "as is" and
they should be cleaned - not all functionality are supported
in Harbour and some others should be implemented in differ
way then in xHarbour.
+ harbour/include/hbgtcore.h
* harbour/include/hbapigt.h
* new GTAPI
hbgtcore.h file should not be included by user code
it's only for internal use in GT drivers
* HB_inkey_enum changed to int - this is bit field not enumerated type.
Many of C/C++ compilers forbid bit operations on enum types and
forcing it by casting which finally exceeds the enum range is defined
as bug because it may badly interacts with some compiler optimizations
* harbour/include/hbapi.h
* harbour/include/hbapicdp.h
* harbour/include/hbapierr.h
* harbour/include/hbapifs.h
* harbour/include/hbapiitm.h
* harbour/include/hbapilng.h
* harbour/include/hbapirdd.h
* harbour/include/hbdate.h
* harbour/include/hbdefs.h
* harbour/include/hbinit.h
* harbour/include/hbpcode.h
* harbour/include/hbrdddbf.h
* harbour/include/hbset.h
* harbour/include/hbstack.h
* harbour/include/hbvm.h
* harbour/include/hbvmopt.h
* harbour/include/hbvmpub.h
* separated internal and external API. Now the definitions for
internal HVM structures and functions are excluded by default
they could be enabled if user include hbvmopt.h before other
header files. Such operation should be done _ONLY_ by core
code - if 3-rd party developers make sth like that then it's
for their own risk and such code may stop to work with next
Harbour versions. Without hbvmopt.h the internal structures
like HB_ITEM, HB_DYNS, ... are mapped to 'void' so there is
no way to access their members so we can modify them in the
future without afford for 3-rd party code.
There is one small exception 'type' should be the first member
for HB_ITEM structure because I used a small ugly hack in
HB_IS_*() macros with castin PHB_ITEM to HB_TYPE* - it works
without speed overhead but if you think that it will be
better/cleaner to not use such tricks then it's enough to
change HB_ITEM_TYPE() definitions in hbvmpub.h - see note.
* cleared the usage of HB_EXPORT - to avoid problems with some C/C++
compilers we agreed that the only one common way of using HB_EXPORT
is adding it ad begining of declaration - please keep this convention
in the future.
+ added new functions:
hb_extIsObject(), hb_codeblockId(), hb_idleSleep(),
hb_fsGetOsHandle(),
hb_dynsymFindSymbol(), hb_dynsymGetSymbol(),
hb_dynsymSymbol(), hb_dynsymName(),
hb_dynsymMemvarHandle(), hb_dynsymAreaHandle(), hb_dynsymSetAreaHandle()
* changed hb_arrayClone() declaration to:
PHB_ITEM hb_arrayClone( PHB_ITEM pArray )
* changed hb_arrayFromParams() declaration to:
PHB_ITEM hb_arrayFromParams( int iLevel )
The previous version needed a pointer to stack relocatable area
so any stack resizing could cause GPF.
* harbour/include/inkey.ch
* added definitions for extended mouse keys/events and some key
combinations
* harbour/source/codepage/uc1250.c
* harbour/source/codepage/uc1251.c
* harbour/source/codepage/uc1253.c
* harbour/source/codepage/uc1257.c
* harbour/source/codepage/uc737.c
* harbour/source/codepage/uc850.c
* harbour/source/codepage/uc852.c
* harbour/source/codepage/uc866.c
* harbour/source/codepage/uc88591b.c
* harbour/source/codepage/uc8859_1.c
* harbour/source/codepage/uc8859_2.c
* harbour/source/codepage/uc8859_5.c
* harbour/source/codepage/uckoi8.c
* harbour/source/codepage/uckoi8u.c
* harbour/source/codepage/ucmaz.c
* updated unicode values for characters in rabge 1-31 to keep
DOS compatibility
* harbour/source/common/expropt1.c
* harbour/source/common/hbarch.c
* harbour/source/common/hbdate.c
* harbour/source/common/hbstr.c
* harbour/source/common/hbver.c
* keep HB_EXPORT at the beginning of function declaration
* harbour/include/hbpcode.h
* harbour/include/hbcomp.h
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.y
* harbour/source/compiler/hbfix.c
+ harbour/source/compiler/hbdead.c
* harbour/source/compiler/hbpcode.c
+ harbour/source/compiler/hbstripl.c
% rewritten jump optimization
! fixed some minor problems
* do not optimize jumps and local variable access by shorter
PCODE version and HB_P_NOOP when jump optimization is
disabled, this is a note I left in source code in few places:
/*
* optimizing jumps here by shorting them and setting HB_P_NOOPs
* only slow down the compilation process for three reasons:
* 1. When it's dummy jump to next instruction we need two passes
* in hb_compOptimizeJumps() to fully remove it
* 2. hb_compOptimizeJumps() also make jump shortcutting in each pass
* 3. When Jump Optimization is disabled (-kJ) then it cause slowness
* at runtime because we will have more HVM loops: first for the
* shorter jump and next for the HB_P_NOOP PCODE(s)
* [druzuz]
*/
+ added support for multi passes in jump/dead code elimination
(hb_compOptimizeJumps())
By default is set upto three passes.
Now hb_compOptimizeJumps() keeps all compiler internal data clean
on exist and can be called any times and does not change other
compiler's functions behaviors
+ added dummy jumps elimination
+ added optimization for:
IF .T.
IF .F.
WHILE .T.
WHILE .F.
etc.
* restored empty BEGIN/RECOVER sequence block elimination
if Jump Optimization is enabled then it marks the block
with HB_P_NOOPS else it cut the generated PCODE
+ added dead code eliminator (new functions hb_compCodeTraceMarkDead()/
hb_compPCodeTrace() - it works only when Jump Optimization is
not disabled)
As a result of the above we have smaller and faster PCODE.
I do not think that we will have meta code support in the reasonable
time and because I need some valid compiler data/structures like
updated table of all jumps for real C code (not PCODE in .c files)
generation then I decide to make some modifications and the above
is in practice a side effect of this work.
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/rddord.prg
* harbour/source/rdd/workarea.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/rdd/nulsys/nulsys.c
* synced with my modifications in xHarbour
* updated for API modifications
* harbour/source/rtl/Makefile
+ added gtsys.c, gtfunc.c, hbgtcore.c
* harbour/source/rtl/accept.c
* harbour/source/rtl/alert.prg
* harbour/source/rtl/cdpapi.c
* harbour/source/rtl/console.c
* harbour/source/rtl/dates.c
* harbour/source/rtl/do.c
* harbour/source/rtl/errorapi.c
* harbour/source/rtl/errorsys.prg
* harbour/source/rtl/file.c
* harbour/source/rtl/fserror.c
* harbour/source/rtl/fstemp.c
* harbour/source/rtl/hbffind.c
* harbour/source/rtl/idle.c
* harbour/source/rtl/math.c
* harbour/source/rtl/oldclear.c
* harbour/source/rtl/strmatch.c
* harbour/source/rtl/strpeek.c
* harbour/source/rtl/valtype.c
* harbour/source/rtl/xsavescr.c
* updated for API modifications
* cleaned some compiler warnings
* harbour/source/rtl/filesys.c
+ added hb_fsGetOsHandle()
* updated for API modifications
* harbour/source/rtl/gt.c
* harbour/source/rtl/gtapi.c
* harbour/source/rtl/gtapiu.c
+ harbour/source/rtl/gtfunc.c
+ harbour/source/rtl/gtsys.c
+ harbour/source/rtl/hbgtcore.c
* harbour/source/rtl/inkey.c
* harbour/source/rtl/maxrow.c
* harbour/source/rtl/mouseapi.c
* harbour/source/rtl/setcolor.c
* harbour/source/rtl/setposbs.c
* harbour/source/rtl/shadow.c
* new GT API code
* harbour/source/rtl/saverest.c
* changed default behavior in SEVESCREEN/RESTSCREEN with parameters
out of screen range to be Clipper compatible. Added last logical
parameter to keep previous behavior for programs which begins to
use it.
* harbour/source/rtl/seconds.c
* include missing header file to fix C++ compilation
* make hb_secondsCPU global function
* harbour/source/rtl/set.c
* make HB_SET_TYPEAHEAD Clipper compatible
* harbour/source/rtl/gtcgi/Makefile
* harbour/source/rtl/gtcgi/gtcgi.c
- harbour/source/rtl/gtcgi/mousecgi.c
* rewritten for new GT API
some detail behaviors has been changed but I think the current
implementation is better for CGI programs output - please check
and fix me if necessary
* harbour/source/rtl/gtcrs/Makefile
- harbour/source/rtl/gtcrs/charmap.prg
+ harbour/source/rtl/gtcrs/chrmap.c
- harbour/source/rtl/gtcrs/debug.map
- harbour/source/rtl/gtcrs/eterm.map
* harbour/source/rtl/gtcrs/gtcrs.c
+ harbour/source/rtl/gtcrs/gtcrs.h
+ harbour/source/rtl/gtcrs/hb-charmap.def
- harbour/source/rtl/gtcrs/kbdcrs.c
- harbour/source/rtl/gtcrs/keymap.prg
- harbour/source/rtl/gtcrs/linux.map
- harbour/source/rtl/gtcrs/mousecrs.c
* new GTCRS based on my xHarbour and Flagship curses code
Please not that at runtime it looks for a file
/etc/harbour/hb-charmap.def where user can fully tune output
for his terminal. This file is included with proper path in
binaries created by make_rpm.sh and make_tgz.sh
Ryszard I've removed some of your extensions which are no longer
necessary and some other (keyboard sequence redefinition) should
be done in a little bit differ way. I would like to talk about it
when you test current code.
Added support for extended mouse keys (middle button and wheel).
* harbour/source/rtl/gtdos/Makefile
* harbour/source/rtl/gtdos/gtdos.c
- harbour/source/rtl/gtdos/mousedos.c
* rewritten for new GT API
Fixed some small problems, finished mouse code which for DJGPP
is fully Clipper compatible with real mouse SAVE/RESTORE code.
For other compilers it should be updated depending on memory
model and used DPMI driver (if any).
* harbour/source/rtl/gtos2/Makefile
* harbour/source/rtl/gtos2/gtos2.c
- harbour/source/rtl/gtos2/mouseos2.c
* rewritten for new GT API
Fixed some problems and finished the mouse code.
Please test it - I made all modifications without OS2 and
I was not able to make any test. I'm interesting in information
if it works and the speed difference - f.e. results from
tests/vidtest.prg run with previous and current version.
* harbour/source/rtl/gtpca/Makefile
* harbour/source/rtl/gtpca/gtpca.c
- harbour/source/rtl/gtpca/kbdos2.gcc
- harbour/source/rtl/gtpca/mousepca.c
* rewritten for new GT API
and finished so now it's full functional GT driver
I'm interesting in keyboard sequences used by PC-ANSI drivers
in DOS so it will be possible to implement also support for
extended keys input.
* harbour/source/rtl/gtsln/Makefile
* harbour/source/rtl/gtsln/gtsln.c
+ harbour/source/rtl/gtsln/gtsln.h
* harbour/source/rtl/gtsln/kbsln.c
* harbour/source/rtl/gtsln/keytrans.c
* harbour/source/rtl/gtsln/mousesln.c
* rewritten for new GT API basing on current xHarbour code
added support for slang 1.4x patched for UNICODE (Debian
patches used by most of current Linux distributions) and
slang 2.x - It's unicode ready, tries to detect terminal mode
(utf-8/iso) at startup and switch the internal logic to
iso/unicode mode. When compiled with slang 1.4x or 2.x
and terminal is in UTF-8 it can display all characters like
in DOS if only used font have them or good fall-back table is
loaded (f.e. the one created by QRCZAK)
Added support for extended mouse keys (middle button and wheel).
* harbour/source/rtl/gtstd/Makefile
* harbour/source/rtl/gtstd/gtstd.c
- harbour/source/rtl/gtstd/mousestd.c
* rewritten for new GT API
Now it can work as full screen GT driver redrawing the previous
screen contents from internal GT core buffers. I run with this
GT some of my programs and they work quite well ;-) of course
without colors.
* harbour/source/rtl/gtwin/Makefile
* harbour/source/rtl/gtwin/gtwin.c
- harbour/source/rtl/gtwin/mousewin.c
* updated for new GT API
+ harbour/source/rtl/gtxwc/Makefile
+ harbour/source/rtl/gtxwc/gtxwc.c
+ harbour/source/rtl/gtxwc/gtxwc.h
* new XWindow Console GT driver based on my and Giancarlo Niccolai
code form xHarbour - this GT can work in XWindow environment only
and create its own window for console output. It delays the
initialization to the moment when user try to display anything on
the screen so even without X Window system programs which uses this
GT can work as long as use only outstd/outerr output.
* harbour/source/vm/arrays.c
* updated for API modifications
+ added hb_arrayId(),
* changed hb_arrayClone() declaration to:
HB_EXPORT PHB_ITEM hb_arrayClone( PHB_ITEM pSrcArray )
* changed hb_arrayFromParams() declaration to:
PHB_ITEM hb_arrayFromParams( int iLevel )
* harbour/source/vm/arrayshb.c
* updated for API modifications
+ added new parameter iLevel to function HB_APARAMS()
* harbour/source/vm/classes.c
* harbour/source/vm/cmdarg.c
* harbour/source/vm/dynlibhb.c
* harbour/source/vm/estack.c
* harbour/source/vm/fm.c
* harbour/source/vm/garbage.c
* harbour/source/vm/maindll.c
* harbour/source/vm/maindllh.c
* harbour/source/vm/maindllp.c
* harbour/source/vm/mainstd.c
* harbour/source/vm/mainwin.c
* harbour/source/vm/memvars.c
* harbour/source/vm/pcount.c
* harbour/source/vm/proc.c
* updated for API modifications
* harbour/source/vm/codebloc.c
* updated for API modifications
+ added hb_codeblockId()
* harbour/source/vm/dynsym.c
* updated for API modifications
+ added new functions:
hb_dynsymFindSymbol(), hb_dynsymGetSymbol(),
hb_dynsymSymbol(), hb_dynsymName(),
hb_dynsymMemvarHandle(), hb_dynsymAreaHandle(), hb_dynsymSetAreaHandle()
* harbour/source/vm/eval.c
* updated for API modifications
* call hb_vmPushState()/hb_vmPopState() in hb_itemDo()/hb_itemDoC()
functions - it's necessary to make HVM reentrant safe.
* harbour/source/vm/extend.c
* updated for API modifications
+ added hb_extIsObject() similar to existing hb_extIsArray()
* harbour/source/vm/hvm.c
* updated for API modifications
+ added new functions: hb_vmPushState(), hb_vmPopState()
which save/restore HVM state (the top stack value which can be
processed and return item and maybe sth else in the future) making
HVM ready for reentrant.
* harbour/source/vm/itemapi.c
* updated for API modifications
+ added new function:
HB_EXPORT PHB_SYMB hb_itemGetSymbol( PHB_ITEM pItem );
! fixed bug in hb_itemPutNInt()
* harbour/tests/Makefile
* harbour/utils/hbdoc/Makefile
* harbour/utils/hbextern/Makefile
* harbour/utils/hbmake/Makefile
* harbour/utils/hbrun/Makefile
* harbour/utils/hbtest/Makefile
- removed badly added: dbfntx, dbfcdx, dbffpt, hbsix libraries.
what broke GNU make compilation for some compilers
This libraries should be included automatically when RDD lib
is included by *.cf files
Summary:
The whole patch (cvs diff -uN) is ~1.5MB length and I cannot describe
everything in details - sorry but it was too much modifications in
one commit so now just some of general notes.
The header files included as is does not have any information about
internal HVM structures and some functions. In practice only HB_SYMB
is public and it has to be public for .c files generated from .prg
so I force the fixed size of this structure (alignment independent)
by redefining some members to union with void * - it's a little bit
ugly trick but it effectively eliminates the problem of linking
binaries compiled with differ alignment C compiler switches.
The structures like HB_ITEM, HB_CODEBLOCK, HB_STACK, HB_DYNS are not
longer defined and pointers to the defined as void * - like in Clipper
the ITEM structure. It caused that I had to add some new functions
to make some operation still possible to implement. If I missed sth
and any of you will have a problem with your code then please inform
me about it and after a small discussion on Harbour developers list
we can decide if other functions should be added.
The internal API is still accessible. It's enough to include "hbvmopt.h"
file before other header files to enable it. Now only files in
source/vm directory include it.
The 3-rd party code which does not include hbvmopt.h (or tries to
set some internals macros) should be safe for future HVM modifications
and will work also with new binaries so 3-rd party library developers
should remember about it. If they won't then it's only their and
their clients problem not Harbour developers.
With this modifications I also create new GT model which is similar
to the one used by RDD with multi inheritance. It can be quite easy
extended to simultaneously load more then one GT subsystem (sth like
work areas in RDD) but I left it for the future when someone may
need it. hbapigt.h file now contains only information about public
functions and does not have any code which depends on current
internal implementation - it should be backword compatible as long
as somone did not try to use internal GT functions.
The internal GT system use hbgtcore.h file which should not be
included by 3-rd party code as long as someone will not make new
GT driver. The internal GT code is new so I expect that it will
be changed yet in the nearest future (I'm waiting for other developers
feedback) and in such case any 3-rd party GTs will have to be updated.
How it works:
The base GT driver (GTNUL) is fully functional GT driver which
makes all operations on memory buffer. After each screen write
Flush() method is called which check for dispcount() and if
it's 0 then call Refresh() method to update modified area by
Redraw() method. This method is dummy in GTNUL and external
output with this GT can be reached by outstd()/outerr() which
are now redirected to GT methods. A simple GT driver may overload
only Refresh() method to give full screen output.
Application can use only this GT driver and it seems to be very
good choice for GUI and background daemon/service programs.
This GT is loaded at startup then all other GTs can be loaded
later and inherit from the previously loaded GT drivers.
The new GT driver can overload as much method as wants/needs.
Now all GT operations are implemented as GT method so GT driver
can easy change their default behavior, f.e. it may fully overload
color parsing methods and use differ or extended to Clipper color
definitions.
I rewrote all existing GTs to work with new GT model.
OS2 users - please test GTOS2 which I was not able to test and
see the note in Redraw() method. If possible please make some
speed tests.
In fact now there is much more internal operations then it was
before but because they are done on memory only then current
code is much faster in this GT drivers which so far makes all
operations on real video area. I made some tests with GTNUL
and tests/vidtest.prg and the total overhead is minimal. Now
dipbegin()/dispend() in practice does not cost anything so it
gives additional speed improvement in application which extensively
use it.
More then one GT driver can be linked with final binaries and
chose on application startup by //GT<NAME> switch and/or environment
variable HB_GT=<name>
In the RTL is new GT function GTSYS() which works in similar way
to RDDSYS() in RDD subsystem and for linking default GT driver
for given platform. When RTL is compiled the default GT driver
is set to HB_GT_DEFAULT envvar and if not exist to HB_GT_LIB
envvar and if it also does not exist to hard coded platfom GTs
(see source/rtl/gtsys.c and source/rtl/Makefile for rules)
Adding to source code:
ANNOUNCE GTSYS
disable linking the default GT driver and:
REQUEST HB_GT_<name>
for linking given (<name>) GT driver, f.e.: REQUEST HB_GT_WIN
If you are working in SH environment (Linux and other *nixes users,
DJGPP bash, MinGW shell then it's possible to use -gt<name> switch
in hblnk / hbmk scripts to force linking GT drivers (it could be
repeated with different <name>) and the first one becomes the default
one. F.e.:
xhbmk -m -n -w -es2 -gtcrs -gtsln -gtstd -gtpca vidtest.prg
Usually the GT driver are loaded at HVM startup but it's possible
to load it later. I created new GT driver CTW which gives full
CT3 like Window system. The CT3 extended driver change the behavior
of some function in Clipper extended driver, f.e WRITECON() or
SETPOS() with parameters out of screen range. So I implemented it
CTW as RT GTs which is loaded when some of CTWIN function is used
(f.e. WOPEN()/WBOARD()) and inherits from any existing GT driver.
This is full CT3 WIN implementation with all detail behaviors I
found (with some CT3 bug fixes). It does not have any CT3 limitations
and can be used for any virtual screen/window size though I hardcoded
CT3 limitation for backword compatibility. If somone will want to
remove it then it will be enough to delete few lines from ctwin.c
file. I'm not CTWIN Clipper user so maybe I missed some side effects
in this driver and was not able to well test it so if you will find
any incompatibilities then please inform me.
THe default GT buffer uses 32bit character cell internally but
in savescreen/restscreen it uses VGA compatible two bytes character
cell. Some GT drivers may want to use differ character cell.
Now GTCRS and GTSLN use 32bit character cell by default. They
need additional information about character set (box/normal) to
properly display box characters. It is possible to force in this
GT drivers using Clipper compatible character cell by calling:
hb_gtInfo( GTI_COMPATBUFFER, <lCompat> ) -> <lPreviousSeting>
but in may cause that box drawing characters will be lost in
some countries after RESTSCREEN(). It will depend on used code
page.
HB_GTINFO() is new function which works in similar way to DBINFO()
in RDD. It allows to retrieve/change some of GT driver settings.
GTI_* actions are defined in hbgtinfo.ch - it has all GTI_*
definitions used in xHarbour. Now in Harbour only few of them
are implemented.
The new three .prg functions:
HB_SETKEYCP( <cTermCP> [,<cHostCP>] )
HB_SETDISPCP( <cTermCP> [,<cHostCP>] [,<lBoxChar>] )
HB_SETTERMCP( <cTermCP> [,<cHostCP>] [,<lBoxChar>] )
have been added. They set automatic input (HB_SETKEYCP)
and output (HB_SETDISPCP) (or both: HB_SETTERMCP) character
translation. They are also important for some GTs which
informing them about used internal code page for unicode
translation (GTXWC, GTSLN) and/or chosing proper character
set (standard/alternate) for letters and other (f.e. box
drawing characters) (GTCRS, GTSLN),
<cTermCP> is encoding used on external (terminal) side
<cHostCP> is encoding used internally, if not given then
current code page set HB_SETCODEPAGE() is used.
some of GTs which uses unicode output may
ignore <cTermCP>
<lBoxChar> is optional parameter which interacts with dispbox()
output disabling switching to alternate character
set in some GTs. It effectively causes that if internal
(host) code page contains some letters on the box char
positions then they will be shown also by box drawing
functions like dispbox() instead of CP437 characters.
In some cases it could be useful. By default lBoxChar
is not set and GTs which can switch between standard
and alternate character set (GTCRS, GTSLN) will try to
use alternate character set for box drawing functions.
Victor: I removed some of your functions. They can be very easy
implemented with hb_gt_GetChar()/hb_gt_PutChar() but I do not want to
make them part of documented external API because some GT drivers may
want to use absolutely differ color definitions and they will stop to
work so I do not want to make this functions documented external API.
Ryszard: Setting alternative debug keys does not longer work.
I like such possibilities but it should be implemented in differ
way to f.e. using HB_GTINFO interface to allow low level GT driver
extensions, f.e. in *nixes using CTRL+[A-Z] and SIGINT, SIGQUIT,
SIGTSTP signals for real asynchronous setting of debug/cancel flag
without keyboard polling from main HVM loop. I would like to discus
about such more general solution.
*** Please updated non GNU make files ***
|
||
|
|
dde0793b53 |
2005-11-14 11:00 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
* include/hbcomp.h
* include/hberrors.h
* include/hbexpra.c
* include/hbexprb.c
* include/hbexprop.h
* include/hbhash.h
* include/hbmacro.h
* include/hbpcode.h
* source/common/Makefile
* source/common/expropt1.c
* source/common/expropt2.c
* source/common/hbhash.c
* source/compiler/expropta.c
* source/compiler/exproptb.c
* source/compiler/genc.c
* source/compiler/harbour.c
* source/compiler/harbour.l
* source/compiler/harbour.y
* source/compiler/hbfix.c
* source/compiler/hbgenerr.c
* source/compiler/hbident.c
* source/compiler/hbpcode.c
* source/macro/macro.l
* source/macro/macro.y
* source/macro/macroa.c
* source/macro/macrob.c
* source/rtl/dates.c
* source/vm/hvm.c
* source/vm/macro.c
+ source/common/hbdate.c
+ tests/ddate.prg
+ tests/switch.prg
+added support for DATE type constants in the following format:
0dYYYYMMDD
for example (see tests/ddate.prg for more):
IF( dDate > 0d20051112 )
+added support for SWITCH command (see tests/switch.prg)
SWITCH <expr>
CASE <integer_expression>
...
[EXIT]
CASE <string_expression>
...
[EXIT]
[OTHERWISE]
...
END
Notice:
- Integer and string expressions can be mixed in a single
SWITCH command with no runtime errors;
- CASE expression have to be resolved at compile time and
the result has to be either an integer or string constant
- if there is no EXIT statement then next CASE is executed
(or OTHERWISE for the last CASE)
For example:
CASE 1+32+2*4
CASE CHR(64)
CASE ASC('A')
CASE "A"+CHR(13)
Notice:
The above changes apply only to FLEX version!
|
||
|
|
04daca8372 |
2005-11-13 12:05 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/ole/ole2.c
* harbour/contrib/ole/oleauto.prg
! fixed casting
* harbour/contrib/rdd_ads/Makefile
* harbour/contrib/rdd_ads/ace.h
* harbour/contrib/rdd_ads/ads.ch
- harbour/contrib/rdd_ads/ads0.prg
* harbour/contrib/rdd_ads/ads1.c
* harbour/contrib/rdd_ads/adsfunc.c
* harbour/contrib/rdd_ads/adsmgmnt.c
* harbour/contrib/rdd_ads/rddads.h
* harbour/include/hbapirdd.h
* harbour/include/hbrddcdx.h
* harbour/include/hbrdddbf.h
* harbour/include/hbrdddbt.h
* harbour/include/hbrddfpt.h
* harbour/include/hbrddntx.h
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/dbsort.prg
* harbour/source/rdd/dbstrux.prg
* harbour/source/rdd/dbtotal.prg
* harbour/source/rdd/hbdbsort.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/source/rdd/dbfntx/dbfntx1.c
* synced with xHarbour
* harbour/include/hbcomp.h
* harbour/source/compiler/harbour.c
* harbour/source/compiler/hbgenerr.c
* harbour/source/compiler/hbpcode.c
* emit warning and error messages to stderr instead of stdout
Now it's enabled only for *nix platforms.
* harbour/source/vm/extend.c
* allow hb_param() to return parameters accessed by HB_IT_BYREF
|
||
|
|
d947f68c8e |
2005-11-07 14:35 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
* include/hbapi.h
* include/hbapiitm.h
* include/hbcomp.h
* include/hberrors.h
* include/hbexpra.c
* include/hbpcode.h
* include/hbsetup.h
* source/common/expropt1.c
* source/compiler/expropta.c
* source/compiler/genc.c
* source/compiler/gencli.c
* source/compiler/harbour.c
* source/compiler/harbour.l
* source/compiler/harbour.y
* source/compiler/hbfix.c
* source/compiler/hbgenerr.c
* source/compiler/hbpcode.c
* source/macro/macroa.c
* source/vm/hvm.c
* source/vm/itemapi.c
+ tests/foreach.prg
+ added support for FOR EACH loop
FOR EACH var1 [,var255] IN expr1 [,expr255] [DESCEND]
NEXT
Note:
-expr can be a string or an array
if it is a string then assigments to the control
variable does not change the string
-after the loop the controlling variable(s) store the
value which they had before entering the loop
-the controlling variable supports the following properties
:__enumindex - the loop counter for variable
:__enumbase - the value that is being traversed
:__enumvalue - the value of variable
-see tests/foreach.prg for examples
+ added warnings in cases of duplicated loop variables
eg. FOR i:=1 TO 5
FOR i:=i TO i+5
-removed strong typing in the compiler (xHarbour too)
(reactivate it by compiling with -DHB_COMP_STRONG_TYPES)
NOTE:
The new pcodes were added - rebuild everything
|
||
|
|
971da5e61e |
2005-03-18 11:45 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
* config/dos/global.cf
*restored creation of subdirectiories under plain DOS
* include/hbapi.h
* include/hbcomp.h
* include/hbdefs.h
* include/hbvm.h
* source/compiler/genc.c
* source/compiler/harbour.c
* source/compiler/hbpcode.c
* source/vm/dynsym.c
* source/vm/hvm.c
* source/vm/macro.c
*modified creation of symbols table
*symbol of function name never share a symbol of variable
*symbol for INIT/EXIT procedure has now '$' suffix - this means
that such procedures cannot be called from user code
(Clipper compatible)
See the following code:
PROCEDURE MAIN
aaa()
RETURN
INIT PROCEDURE aaa
? "In INIT procedure", PROCNAME(0)
RETURN
STATIC PROCEDURE aaa
? "In STATIC procedure", PROCNAME(0)
RETURN
It will print:
In INIT procedure aaa$
In STATIC procedure aaa
*fixed access to static functions in a macro compiler (symbols for
static functions never goes into dynamic symbols table)
* source/pp/ppcore.c
*increased numer of nested optional clauses (max 5 currently - work
in progress)
|
||
|
|
ef0883bf02 |
2004-10-11 21:40 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/Makefile
+ harbour/make_bsd.sh
+ harbour/make_drw.sh
* harbour/make_tgz.sh
+ harbour/bin/hb-func.sh
* harbour/bin/pack_src.sh
+ harbour/bin/postinst.bat
+ harbour/bin/postinst.sh
* harbour/config/dir.cf
* harbour/config/bsd/gcc.cf
* harbour/config/bsd/global.cf
+ harbour/config/darwin/dir.cf
+ harbour/config/darwin/gcc.cf
+ harbour/config/darwin/global.cf
+ harbour/config/darwin/install.cf
* harbour/config/dos/dir.cf
* harbour/config/dos/global.cf
* harbour/config/dos/install.cf
* harbour/config/dos/owatcom.cf
* harbour/config/dos/watcom.cf
* harbour/config/linux/gcc.cf
* harbour/config/linux/global.cf
* harbour/contrib/Makefile
* harbour/contrib/dot/pp_harb.ch
* harbour/contrib/libct/Makefile
* harbour/contrib/libct/bit1.c
* harbour/contrib/libct/bit2.c
* harbour/contrib/libct/bit3.c
* harbour/contrib/libct/files.c
* harbour/contrib/libct/ftoc.c
- harbour/contrib/libct/invertwin.prg
+ harbour/contrib/libct/invrtwin.prg
* harbour/contrib/libct/keyset.c
* harbour/contrib/libct/makefile.bc
* harbour/contrib/libmisc/dates2.c
* harbour/contrib/rdd_ads/ads1.c
* harbour/contrib/rdd_ads/adsfunc.c
* harbour/contrib/samples/date.c
* harbour/include/dbinfo.ch
* harbour/include/hbapi.h
* harbour/include/hbapicdp.h
* harbour/include/hbapifs.h
* harbour/include/hbapigt.h
* harbour/include/hbapiitm.h
* harbour/include/hbcomp.h
* harbour/include/hbdate.h
* harbour/include/hbdbf.h
* harbour/include/hbdbferr.h
* harbour/include/hbdefs.h
* harbour/include/hbexprb.c
* harbour/include/hbexprc.c
* harbour/include/hbexprop.h
* harbour/include/hbmacro.h
* harbour/include/hbmath.h
* harbour/include/hbpcode.h
* harbour/include/hbrddcdx.h
* harbour/include/hbrdddbf.h
* harbour/include/hbrdddbt.h
* harbour/include/hbrddfpt.h
* harbour/include/hbrddntx.h
* harbour/include/hbset.h
* harbour/include/hbsetup.h
* harbour/include/set.ch
* harbour/source/common/Makefile
* harbour/source/common/expropt1.c
* harbour/source/common/expropt2.c
- harbour/source/common/hbffind.c
* harbour/source/common/hbfsapi.c
* harbour/source/common/hbstr.c
* harbour/source/common/hbver.c
+ harbour/source/common/hbverdsp.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencli.c
* harbour/source/compiler/harbour.c
* harbour/source/compiler/harbour.l
* harbour/source/compiler/harbour.slx
* harbour/source/compiler/harbour.sly
* harbour/source/compiler/harbour.y
* harbour/source/compiler/hbfix.c
* harbour/source/compiler/hbpcode.c
* harbour/source/compiler/hbusage.c
* harbour/source/compiler/simplex.c
* harbour/source/macro/macro.l
* harbour/source/macro/macro.slx
* harbour/source/macro/macro.y
* harbour/source/pp/ppcore.c
* harbour/source/rdd/dbcmd.c
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
- harbour/source/rdd/dbfcdx/dbfcdx1.h
* harbour/source/rdd/dbffpt/dbffpt1.c
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/rtl/Makefile
* harbour/source/rtl/abs.c
* harbour/source/rtl/at.c
* harbour/source/rtl/datec.c
* harbour/source/rtl/dates.c
* harbour/source/rtl/dateshb.c
* harbour/source/rtl/datesx.c
* harbour/source/rtl/empty.c
* harbour/source/rtl/errorapi.c
* harbour/source/rtl/errorint.c
* harbour/source/rtl/filesys.c
* harbour/source/rtl/fstemp.c
+ harbour/source/rtl/hbffind.c
* harbour/source/rtl/hbrandom.c
* harbour/source/rtl/idle.c
* harbour/source/rtl/inkey.c
* harbour/source/rtl/math.c
* harbour/source/rtl/minmax.c
* harbour/source/rtl/pad.c
* harbour/source/rtl/padc.c
* harbour/source/rtl/padl.c
* harbour/source/rtl/padr.c
* harbour/source/rtl/philes.c
* harbour/source/rtl/round.c
* harbour/source/rtl/soundex.c
* harbour/source/rtl/str.c
* harbour/source/rtl/strcase.c
* harbour/source/rtl/strmatch.c
* harbour/source/rtl/strtran.c
* harbour/source/rtl/strzero.c
* harbour/source/rtl/substr.c
* harbour/source/rtl/val.c
* harbour/source/rtl/gtcrs/gtcrs.c
* harbour/source/rtl/gtcrs/kbdcrs.c
* harbour/source/rtl/gtdos/gtdos.c
* harbour/source/rtl/gtsln/gtsln.c
* harbour/source/rtl/gtsln/kbsln.c
* harbour/source/rtl/gtsln/keytrans.c
* harbour/source/vm/arrays.c
* harbour/source/vm/codebloc.c
* harbour/source/vm/estack.c
* harbour/source/vm/eval.c
* harbour/source/vm/extend.c
* harbour/source/vm/hvm.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/macro.c
* harbour/source/vm/memvars.c
* harbour/source/vm/runner.c
* harbour/tests/bldtest/bldtest.c
* harbour/utils/hbtest/hbtest.prg
* harbour/utils/hbtest/rt_misc.prg
* harbour/utils/hbtest/rt_str.prg
* Sorry but it's too much modification for full description
cvs diff gives file 785982 bytes length. So I only count the
main things:
! cleand the code (no more warning messages under Linux and GCC and
DOS OpenWatcom) - some of them were real bugs
! cleaned all endian dependend code I've found - now Harbour can be
compiled on LITLE and BIG endian machines - for some other like
PDP ENDIAN it's enough to define proper macros in hbdefs.h
+ added macros for to get/put values in chosen byte order:
HB_GET_LE_[U]INT{16,24,32,64}( pPtr )
HB_GET_BE_[U]INT{16,24,32,64}( pPtr )
HB_PUT_LE_[U]INT{16,24,32,64}( pPtr, nVal )
HB_PUT_BE_[U]INT{16,24,32,64}( pPtr, nVal )
+ added macro HB_CAST_BYTE_NUMBERS_OFF which disables casting in
HB_{GET|PUT}_{LE|BE}_* macros - it's necessary for some platforms
like ALPHA DEC.
! cleaned the code for 64bit machines
* changed all parameters in hb_date* functions (day, month, year, week)
from LONG to int - it doesn't change binary compatibility for 32bit
machines but can cause troubles with compiling the old source
+ changed HB_IT_LONG type to HB_LONG which is mapped to long long
by default for 32 bit machines.
+ change HB_IT_INTEGER to be real 'int' C type not 'short int'
+ added HB_IS_NUMINT() macro
+ added hb_parnll, hb_stornll, hb_retnll, hbretnlllen, hb_itemPutNLL,
hb_itemPutNLLLen, hb_itemGetNLL which operates on LONGLONG
+ added hb_parnint, hb_stornint, hb_retnint, hb_retnintlen,
hb_itemPutNInt, hb_itemPutNIntLen, hb_itemGetNInt which operates on
HB_LONG
+ added HB_PUSHLONGLONG pcode
+ changed compiler and optimizer to use HB_LONG numbers and reduce
conversion from to double which may damage the 64bit number.
+ common functions for string to number conversions for compiler, RTL
and RDD to reduce problems with differ FL values for the same number:
hb_compStrToNum(), hb_valStrnToNum(), hb_strToNum(), hb_strnToNum()
+ common function hb_numRoun() which uses exactly the same algorithms
as string to number conversion for the same reason - please keep
this functions together.
+ hack inside hb_numRound() similar to the one used by CL5.3
+ hb_numInt() which uses uses the same hack as hb_numRound()
+ rewritten number to string conversion
+ some new string manipulation functions hb_strncpy(), hb_strncat(), ...
They works differ the the C one - always set 0 at the end, the buffer
has to be n+1 bytes length, the n is total size of buffer not the
left free space.
! cleaned some code which operates on ASCIIZ string to avoid potential
buffer overflow
+ updated RDD code - it's the first part - in few days I plan to change
workarea structure in both projects - it will break any 3rd party RDDs
so they have to be updated. I want to add SUPERTABLE into workarea
to allow creating new RDD on-line.
! cleaned the bugs with negating integers - on most machines (like x86)
the integers are not 0 symmetric - it means that x = -x does not work
for {INT,LONG,LONGLONG}_MIN (hb_vmNegate, ABS())
+ cleaned error messages to be Clipper compatible.
+ updated build process for .DEB packages - now hb* scripts and shared
libs are created by standard make install
* added new .prg #defines: __PLATFORM__<cPlatfrom>,
__ARCH{16|32|64}BIT__, __LITTLE_ENDIAN__|__BIG_ENDIAN__|__PDP_ENDIAN__
!!! cPlatfrom can have lower letters (for xHarbour compatibility)
If you do not like it please change it.
* others ...
|
||
|
|
0fcf861638 |
2004-03-09 13:50 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
+ source/rtl/altd.prg
+new file with ALTD() procedure code
* hrbdll.bc
* hrbdll.vc
* makefile.bc
* makefile.nt
* makefile.vc
* source/rtl/Makefile
*added a reference to rtl/altd.prg
* source/common/hbffind.c
*fixed to compile correctly with HB_OS_UNIX
* include/hbcomp.h
* include/hbexpra.c
* include/hbexprb.c
* include/hbexprop.h
* include/hbpcode.h
* source/common/expropt1.c
* source/compiler/expropta.c
* source/compiler/exproptb.c
* source/compiler/genc.c
* source/compiler/harbour.c
* source/compiler/harbour.y
* source/compiler/hbfix.c
* source/compiler/hbgenerr.c
* source/compiler/hbpcode.c
* source/macro/macro.y
* source/macro/macroa.c
* source/macro/macrob.c
* source/vm/hvm.c
+added missing support for @¯o and @M->memvar
+added new pcode HB_MACROPUSHREF (all sources have to be
recompiled)
* source/debug/dbgtwin.prg
* source/debug/debugger.prg
*fixed procedures callstack when modules with/without debug info
are linked together
*fixed the debugger activation when ALTD() is used in
a module with no debug info (the debugger shows up
on the first line with debug info after the ALTD()
is called)
NOTICE:
Some compilers may require that the debug library has to
be specified as an object file in order to get the
debugger linked in.
|
||
|
|
3a020b8283 | 2003-02-18 22:05 UTC+0100 Tomaz Zupan <tomaz.zupan@orpo.si> | ||
|
|
19b7448ef1 | 2003-01-29 22:05 UTC+0300 Alexander Kresin <alex@belacy.belgorod.su> | ||
|
|
fa0ea9268b | See changelog for description | ||
|
|
1c2b5451fc | 2001-12-15 12:11 UTC+0100 Viktor Szakats <viktor.szakats@syenar.hu> | ||
|
|
7dbe2926e8 | 2001-11-04 18:34 UTC+0100 Viktor Szakats <viktor.szakats@syenar.hu> | ||
|
|
966f240041 | ChangeLog 2001-08-20 17:45 UTC+0100 | ||
|
|
559b060f97 |
2001-08-09 02:30 UTC-0800 Ron Pinkas <ron@profit-master.com>
* source/vm/macro.c
* include/hbcomp.h
* include/hbexprb.c
* include/hbexprc.c
* include/hbmacro.h
* include/hbmsetup.h
* include/set.ch
* source/compiler/cmdcheck.c
* source/compiler/genc.c
* source/compiler/harbour.c
* source/compiler/hbpcode.c
* source/rdd/dblist.prg
* source/vm/hvm.c
- Removed support for syncing of macro setting with main module.
- Removed support for -ks which is replaced with -kr.
+ Added default logic to auto symchronize all macro activations with the compile time switches of each respective module.
+ Added -kr to disable auto synching, thus allowing Run-Time setting by means of HB_SETMACRO().
|
||
|
|
fc7c28a6b3 |
2001-07-23 04:15 UTC-0800 Ron Pinkas <ron@profit-master.com>
* include/hbexprop.h
+ Added #define HB_ET_MACRO_PARE 64
* source/vm/hvm.c
* source/vm/macro.c
* source/macro/macro.y
* include/hbexprb.c
+ Added support for HB_P_MACROPUSHPARE aand HB_P_MACROPUSHINDEX
* include/hbmacro.h
+ Added #define HB_MACRO_GEN_PARE 16 /* generate parentesized list */
* source/common/expropt1.c
* source/common/expropt2.c
* include/hbpcode.h
* source/compiler/genc.c
* source/compiler/hbfix.c
* source/compiler/hbpcode.c
+ Added new opcode HB_P_MACROPUSHPARE
/* This should complete macro list support for ( &cMacro ) and aArray[ &cMacro ] syntaxes. */
|
||
|
|
e2e1eeb028 |
2001-07-22 14:30 UTC-0800 Ron Pinkas <ron@profit-master.com>
* include/hbapi.h
* Changed 2nd parameter to BYTE iContext in hb_macroGetValue( HB_ITEM_PTR pItem, BYTE iContext )
* include/hbexprop.h
+ Added #define HB_ET_MACRO_LIST 16 /* &variable used as in literal arrays or parentesised expressions. */
+ Added #define HB_ET_MACRO_INDEX 32 /* &variable used as arrays index. */
* include/hbexprb.c
+ Added macro list support logic to hb_compExprUseArray()
+ Added generation of HB_P_MACROLIST, HB_P_MACROPUSHLIST, HB_P_MACROLISTEND, and HB_P_MACROPUSHINDEX in hb_compExprUseMacro()
/* HB_P_MACROLIST and HB_P_MACROLISTEND are only generated as an enevelope if array contains a one or more macro element
which will generate an HB_P_MACROPUSHLIST. */
* include/hbpcode.h
* source/compiler/genc.c
* source/compiler/hbfix.c
* source/compiler/hbpcode.c
+ Added: new opcodes HB_P_MACROLIST, HB_P_MACROPUSHLIST, HB_P_MACROLISTEND, and HB_P_MACROPUSHINDEX.
* source/vm/hvm.c
* source/vm/macro.c
+ Added: support for new opcodes HB_P_MACROLIST, HB_P_MACROPUSHLIST, HB_P_MACROLISTEND, and HB_P_MACROPUSHINDEX.
/* HB_P_MACROPUSHINDEX not completed yet.*/
/* NOTE: This implements macro as literal array arguments list syntax <{ &cMacro }>.
( &Cmacro ) and Array[ &cMacro ] are not completed yet.
*** All prgs must be recompiled due to new opcodes !!!
*/
|
||
|
|
8abc351c51 |
2001-07-17 18:25 UTC-0800 Ron Pinkas <ron@profit-master.com>
* utils/hbpp/hbpp.c
* Commented an exit() call in hb_compGenError() to continue processing after an error just like Harbour does.
* include/hbapi.h
+ Added 2nd parameter BOOL bArg to hb_macroGetValue()
* include/hbexpra.c
+ Added global BOOL hb_exp_bArgList = FALSE;
* include/hbexprb.c
+ Added logic to generate HB_P_MACROPUSHARG rather than HB_MACROPUSH when pushed macro is a function call argument.
* include/hbpcode.h
* source/compiler/genc.c
* source/compiler/hbfix.c
* source/compiler/hbpcode.c
+ Added new HB_P_MACROPUSHARG
* source/macro/macro.y
+ Added logic to generate an error if macro expression is list, unless servicing an HB_MACROPUSHARG.
* source/vm/hvm.c
+ Added support for new HB_P_MACROPUSHARG calling hb_macroGetValue() with TRUE for bArg.
* source/vm/macro.c
+ Added 2nd parameter BOOL bArg to hb_macroGetValue() to signify servicing of HB_P_MACROPUSHARG.
* contrib/dot/pp.prg
+ Added bSplit 4th paramater to PP_PreProLine() defaulting to .T.. - Calls from PP_PreProFile() set it to .F..
|
||
|
|
dd47ba76df | See ChangeLog entry 2001-06-15 13:40 UTC-0400 David G. Holm <dholm@jsd-llc.com> | ||
|
|
88d6d4ea34 | 2001-05-10 14:40 UTC-0800 Ron Pinkas <ron@profit-master.com> |