19991002-22:45 GMT+1

This commit is contained in:
Viktor Szakats
1999-10-02 21:00:58 +00:00
parent 24798ccdbe
commit 09e12204ff
7 changed files with 1941 additions and 1859 deletions

View File

@@ -1,3 +1,19 @@
19991002-22:45 GMT+1 Victor Szel <info@szelvesz.hu>
* include/extend.h
source/rtl/strings.c
source/rtl/itemapi.c
source/rtl/hvm.c
% xmem*() function redefinition for Watcom has been moved in one central
place to extend.h.
* tests/working/extend2.c
! Now includes caundoc.api explicitly.
* source/vm/hvm.c
include/ctoharb.h
+ local functions made static, prototypes moved to HVM.C
+ grouped opcodes and opcode functions by category.
! Indentation completely fixed.
! Prototype of one non-existing function removed.
19991002-18:10 GMT+3 Alexander Kresin
* source/hbpp/hbpp.c
* Fixed some bugs, reported by Victor Szel, Ryszard Glab, Jose Lalin and
@@ -133,7 +149,7 @@ NOTE: You have to recompile all PRG sources!
* source/rtl/filesys.c
! BIN2I(), BIN2L() made Clipper compatible, for strings shorter than
the expected length. One test call still fails, probably because of
the expected length. One test call still fails, probably because of
different int size on 32 bit platforms.
* include/hbdefs.h
! MKINT() casted to long instead of int.
@@ -171,15 +187,15 @@ NOTE: You have to recompile all PRG sources!
( Please add these files to the non-GNU make files )
+ source/rtl/fieldbl.prg
+ FIELDBLOCK() and FIELDWBLOCK() functions added. They are not 100%
compatible in error situations, since the method used is different than
+ FIELDBLOCK() and FIELDWBLOCK() functions added. They are not 100%
compatible in error situations, since the method used is different than
in Clipper. They are also slower.
+ source/rtl/setfunc.prg
+ __SetFunction() added
+ source/rtl/text.prg
+ __TextSave(), __TextRestore() added. Note that the TEXT feature is not
+ __TextSave(), __TextRestore() added. Note that the TEXT feature is not
yet working, since the PP should make some special processing not yet
implemented.
@@ -187,12 +203,12 @@ NOTE: You have to recompile all PRG sources!
* include/external.ch
+ Added HB_OSNEWLINE
* source/compiler/genc.c
+ It's now possible to request the code generator not to put
+ It's now possible to request the code generator not to put
comments in the C code. This and some other small format changes
can result in about 30% smaller generated source code size.
This feature is currently permanently turned off, I will add switch for
This feature is currently permanently turned off, I will add switch for
it soon.
+ If an incorrect pcode is encountered it's now put in the
+ If an incorrect pcode is encountered it's now put in the
generated C file, with a proper comment which says that it's a
invalid opcode. BTW, ideally it should exit on such errors.
+ The Harbour Compiler version is now included in the generated pcode as
@@ -247,10 +263,10 @@ NOTE: You have to recompile all PRG sources!
! hb_gtSetMode() now returns an error code if the low-level API call fails.
! hb_gt_SetMode() now signals error in Windows, TODO added for DOS.
* source/rtl/memvarbl.prg
+ MEMVARBLOCK() - Added a STRICT_COMPATBILITY code branch, where the
+ MEMVARBLOCK() - Added a STRICT_COMPATBILITY code branch, where the
returned codeblock will behave exactly like Clipper, so that it will
not assign the passed value to the memvar if it's a NIL.
The NG doesn't suggest this behaviour but that's how it works anyway.
not assign the passed value to the memvar if it's a NIL.
The NG doesn't suggest this behaviour but that's how it works anyway.
Same goes for the FIELD*BLOCK() functions.
* harbour.b31
! Some fixes reported by Jose Lalin.

View File

@@ -85,61 +85,14 @@ extern void hb_vmQuit( void ); /* Immediately quits the virtual ma
#define HB_QUIT_REQUESTED 1 /* immediately quit the application */
#define HB_BREAK_REQUESTED 2 /* break to nearest RECOVER/END sequence */
/* PCode functions */
/* Operators ( mathematical / character / misc ) */
extern void hb_vmMult( void ); /* multiplies the latest two values on the stack, removes them and leaves the result */
extern void hb_vmDivide( void ); /* divides the latest two values on the stack, removes them and leaves the result */
extern void hb_vmPlus( void ); /* sums the latest two values on the stack, removes them and leaves the result */
extern void hb_vmMinus( void ); /* substracts the latest two values on the stack, removes them and leaves the result */
extern void hb_vmPower( void ); /* power the latest two values on the stack, removes them and leaves the result */
extern void hb_vmModulus( void ); /* calculates the modulus of latest two values on the stack, removes them and leaves the result */
extern void hb_vmInc( void ); /* increment the latest numeric value on the stack */
extern void hb_vmDec( void ); /* decrements the latest numeric value on the stack */
extern void hb_vmNegate( void ); /* negates (-) the latest value on the stack */
extern void hb_vmFuncPtr( void ); /* pushes a function address pointer. Removes the symbol from the satck */
/* Operators (relational) */
extern void hb_vmEqual( BOOL bExact ); /* checks if the two latest values on the stack are equal, removes both and leaves result */
extern void hb_vmNotEqual( void ); /* checks if the two latest values on the stack are not equal, removes both and leaves result */
extern void hb_vmGreater( void ); /* checks if the latest - 1 value is greater than the latest, removes both and leaves result */
extern void hb_vmGreaterEqual( void ); /* checks if the latest - 1 value is greater than or equal the latest, removes both and leaves result */
extern void hb_vmLess( void ); /* checks if the latest - 1 value is less than the latest, removes both and leaves result */
extern void hb_vmLessEqual( void ); /* checks if the latest - 1 value is less than or equal the latest, removes both and leaves result */
extern void hb_vmInstring( void ); /* check whether string 1 is contained in string 2 */
/* Operators (logical) */
extern void hb_vmAnd( void ); /* performs the logical AND on the latest two values, removes them and leaves result on the stack */
extern void hb_vmOr( void ); /* performs the logical OR on the latest two values, removes them and leaves result on the stack */
extern void hb_vmNot( void ); /* changes the latest logical value on the stack */
/* Array */
extern void hb_vmArrayAt( void ); /* pushes an array element to the stack, removing the array and the index from the stack */
extern void hb_vmArrayPut( void ); /* sets an array value and pushes the value on to the stack */
extern void hb_vmDimArray( USHORT uiDimensions ); /* generates an uiDimensions Array and initialize those dimensions from the stack values */
extern void hb_vmGenArray( ULONG ulElements ); /* generates an ulElements Array and fills it from the stack values */
/* Public PCode functions */
/* Object */
extern void hb_vmMessage( PHB_SYMB pSymMsg ); /* sends a message to an object */
extern void hb_vmOperatorCall( PHB_ITEM, PHB_ITEM, char * ); /* call an overloaded operator */
extern void hb_vmOperatorCallUnary( PHB_ITEM, char * ); /* call an overloaded unary operator */
/* Execution */
extern void hb_vmFrame( BYTE bLocals, BYTE bParams ); /* increases the stack pointer for the amount of locals and params suplied */
extern void hb_vmLocalName( USHORT uiLocal, char * szLocalName ); /* locals and parameters index and name information for the debugger */
extern void hb_vmModuleName( char * szModuleName ); /* PRG and function name information for the debugger */
extern void hb_vmSFrame( PHB_SYMB pSym ); /* sets the statics frame for a function */
extern void hb_vmStatics( PHB_SYMB pSym ); /* increases the the global statics array to hold a PRG statics */
extern void hb_vmRetValue( void ); /* pops the latest stack value into stack.Return */
extern void hb_vmEndBlock( void ); /* copies the last codeblock pushed value into the return value */
/* Misc */
extern void hb_vmDo( USHORT uiParams ); /* invoke the virtual machine */
extern HARBOUR hb_vmDoBlock( void ); /* executes a codeblock */
extern void hb_vmFunction( USHORT uiParams ); /* executes a function saving its result */
extern void hb_vmDuplicate( void ); /* duplicates the latest value on the stack */
extern void hb_vmDuplTwo( void ); /* duplicates the latest two value on the stack */
extern void hb_vmForTest( void ); /* test for end condition of for */
/* Push */
extern void hb_vmPush( PHB_ITEM pItem ); /* pushes a generic item onto the stack */
@@ -151,32 +104,9 @@ extern void hb_vmPushDouble( double lNumber, int iDec ); /* pushes a double n
extern void hb_vmPushLogical( BOOL bValue ); /* pushes a logical value onto the stack */
extern void hb_vmPushString( char * szText, ULONG length ); /* pushes a string on to the stack */
extern void hb_vmPushDate( LONG lDate ); /* pushes a long date onto the stack */
extern void hb_vmPushBlock( BYTE * pCode, PHB_SYMB pSymbols ); /* creates a codeblock */
extern void hb_vmPushSymbol( PHB_SYMB pSym ); /* pushes a function pointer onto the stack */
extern void hb_vmPushLocal( SHORT iLocal ); /* pushes the containts of a local onto the stack */
extern void hb_vmPushLocalByRef( SHORT iLocal ); /* pushes a local by refrence onto the stack */
extern void hb_vmPushStatic( USHORT uiStatic ); /* pushes the containts of a static onto the stack */
extern void hb_vmPushStaticByRef( USHORT uiLocal ); /* pushes a static by refrence onto the stack */
/* Pop */
extern long hb_vmPopDate( void ); /* pops the stack latest value and returns its date value as a LONG */
extern double hb_vmPopNumber( void ); /* pops the stack latest value and returns its numeric value */
extern double hb_vmPopDouble( int * ); /* pops the stack latest value and returns its double numeric format value */
extern BOOL hb_vmPopLogical( void ); /* pops the stack latest value and returns its logical value */
extern void hb_vmPopLocal( SHORT iLocal ); /* pops the stack latest value onto a local */
extern void hb_vmPopStatic( USHORT uiStatic ); /* pops the stack latest value onto a static */
extern void hb_vmPopDefStat( USHORT uiStatic ); /* pops the stack latest value onto a static as default init */
/* stack management functions */
extern void hb_stackDec( void ); /* pops an item from the stack without clearing it's contents */
extern void hb_stackPop( void ); /* pops an item from the stack */
extern void hb_stackFree( void ); /* releases all memory used by the stack */
extern void hb_stackPush( void ); /* pushes an item on to the stack */
extern void hb_stackInit( void ); /* initializes the stack */
extern void hb_stackDispLocal( void ); /* show the types of the items on the stack for debugging purposes */
extern void hb_stackDispCall( void ); /* show the procedure names of the call stack for internal errors use */
#define STACK_INITHB_ITEMS 100
#define STACK_EXPANDHB_ITEMS 20
extern void hb_stackDispCall( void );
#endif /* HB_CTOHARB_H_ */

View File

@@ -286,6 +286,12 @@ extern ULONG hb_xsize( void * pMem ); /* returns the size of
extern void * hb_xmemcpy( void * pDestArg, void * pSourceArg, ULONG ulLen ); /* copy more than memcpy() can */
extern void * hb_xmemset( void * pDestArg, int iFill, ULONG ulLen ); /* set more than memset() can */
#if defined( __WATCOMC__ ) && defined( __386__ )
/* NOTE: memcpy/memset can work with data block larger then 64kB */
#define hb_xmemcpy memcpy
#define hb_xmemset memset
#endif
/* array management */
extern BOOL hb_arrayError( PHB_ITEM pArray, ULONG ulIndex, BOOL bAssign ); /* Checks if the passed parameters are valid, launches runtim error if needed */
extern BOOL hb_arrayNew( PHB_ITEM pItem, ULONG ulLen ); /* creates a new array */

View File

@@ -68,12 +68,6 @@
#include "dates.h"
#include "set.h"
#if defined( __WATCOMC__ ) && defined( __386__ )
/* NOTE: memcpy/memset can work with data block larger then 64kB */
#define hb_xmemcpy memcpy
#define hb_xmemset memset
#endif
BOOL hb_evalNew( PEVALINFO pEvalInfo, PHB_ITEM pItem )
{
BOOL bResult;

View File

@@ -59,12 +59,6 @@
#include "errorapi.h"
#include "set.h"
#if defined( __WATCOMC__ ) && defined( __386__ )
/* NOTE: memcpy/memset can work with data block larger then 64kB */
#define hb_xmemcpy memcpy
#define hb_xmemset memset
#endif
#define HB_ISSPACE( c ) ( ( c ) == HB_CHAR_HT || \
( c ) == HB_CHAR_LF || \
( c ) == HB_CHAR_CR || \

File diff suppressed because it is too large Load Diff

View File

@@ -11,6 +11,10 @@
#include <string.h>
#include "extend.api"
#ifdef __HARBOUR__
#include "caundoc.api"
#endif
CLIPPER HB_STRINGS1()
{
_retc( _parc( 1 ) );