20000402-15:59 GMT+1 Victor Szakats <info@szelvesz.hu>

This commit is contained in:
Viktor Szakats
2000-04-02 13:58:28 +00:00
parent 4579405c10
commit c23f585ad1
10 changed files with 131 additions and 59 deletions

View File

@@ -1,3 +1,29 @@
20000402-15:59 GMT+1 Victor Szakats <info@szelvesz.hu>
- source/macro/macro.c
* source/macro/Makefile
+ source/vm/macro.c
* source/vm/Makefile
* makefile.bc
* makefile.vc
+ Base macro support modul moved to the HVM
* source/vm/memvars.c
* include/hbapi.h
! Uses hbcomp.h instead of the repeated VS_ macro definitions.
+ hb_memvarCreateFromItem() made global.
* source/vm/memvars.c
+ source/vm/memvclip.c
* source/vm/Makefile
* makefile.bc
* makefile.vc
* CA-Cl*pper compatbility internal and undocumented functions moved
to a separate file.
* source/debug/debugger.prg
% static scope adjusted.
20000402-14:35 GMT+1 Victor Szakats <info@szelvesz.hu>
* makefile.vc

View File

@@ -421,6 +421,7 @@ extern ULONG hb_memvarGetPrivatesBase( void );
extern void hb_memvarSetPrivatesBase( ULONG );
extern void hb_memvarNewParameter( PHB_SYMB, HB_ITEM_PTR );
extern char * hb_memvarGetStrValuePtr( char *, ULONG * );
extern void hb_memvarCreateFromItem( PHB_ITEM pMemvar, BYTE bScope, PHB_ITEM pValue );
/* console I/O subsystem */
extern void hb_conInit( void );

View File

@@ -327,8 +327,7 @@ MACRO_LIB_OBJS = \
$(OBJ_DIR)\macrol.obj \
$(OBJ_DIR)\macroa.obj \
$(OBJ_DIR)\macrob.obj \
$(OBJ_DIR)\macroc.obj \
$(OBJ_DIR)\macro.obj
$(OBJ_DIR)\macroc.obj
#
# RDD.LIB rules
@@ -414,10 +413,12 @@ VM_LIB_OBJS = \
$(OBJ_DIR)\initexit.obj \
$(OBJ_DIR)\initsymb.obj \
$(OBJ_DIR)\itemapi.obj \
$(OBJ_DIR)\macro.obj \
$(OBJ_DIR)\maindll.obj \
$(OBJ_DIR)\mainstd.obj \
$(OBJ_DIR)\mainwin.obj \
$(OBJ_DIR)\memvars.obj \
$(OBJ_DIR)\memvclip.obj \
$(OBJ_DIR)\pcount.obj \
$(OBJ_DIR)\proc.obj \
$(OBJ_DIR)\pvalue.obj \
@@ -841,6 +842,10 @@ $(OBJ_DIR)\itemapi.obj : $(VM_DIR)\itemapi.c
$(CC) $(CLIBFLAGS) -o$@ $**
tlib $(VM_LIB) -+$@,,
$(OBJ_DIR)\macro.obj : $(VM_DIR)\macro.c
$(CC) $(CLIBFLAGS) -o$@ $**
tlib $(VM_LIB) -+$@,,
$(OBJ_DIR)\maindll.obj : $(VM_DIR)\maindll.c
$(CC) $(CLIBFLAGS) -o$@ $**
tlib $(VM_LIB) -+$@,,
@@ -857,6 +862,10 @@ $(OBJ_DIR)\memvars.obj : $(VM_DIR)\memvars.c
$(CC) $(CLIBFLAGS) -o$@ $**
tlib $(VM_LIB) -+$@,,
$(OBJ_DIR)\memvclip.obj : $(VM_DIR)\memvclip.c
$(CC) $(CLIBFLAGS) -o$@ $**
tlib $(VM_LIB) -+$@,,
$(OBJ_DIR)\pcount.obj : $(VM_DIR)\pcount.c
$(CC) $(CLIBFLAGS) -o$@ $**
tlib $(VM_LIB) -+$@,,
@@ -1665,10 +1674,6 @@ $(OBJ_DIR)\macrol.obj : $(OBJ_DIR)\macrol.c
$(CC) $(CLIBFLAGS) -I$(OBJ_DIR) -o$@ $**
tlib $(MACRO_LIB) -+$@,,
$(OBJ_DIR)\macro.obj : $(MACRO_DIR)\macro.c
$(CC) $(CLIBFLAGS) -o$@ $**
tlib $(MACRO_LIB) -+$@,,
$(OBJ_DIR)\macroa.obj : $(MACRO_DIR)\macroa.c
$(CC) $(CLIBFLAGS) -o$@ $**
tlib $(MACRO_LIB) -+$@,,

View File

@@ -376,8 +376,7 @@ MACRO_LIB_OBJS = \
$(OBJ_DIR)\macroy.obj \
$(OBJ_DIR)\macroa.obj \
$(OBJ_DIR)\macrob.obj \
$(OBJ_DIR)\macroc.obj \
$(OBJ_DIR)\macro.obj
$(OBJ_DIR)\macroc.obj
#
# RDD.LIB rules
@@ -528,10 +527,12 @@ VM_LIB_OBJS = \
$(OBJ_DIR)\initexit.obj \
$(OBJ_DIR)\initsymb.obj \
$(OBJ_DIR)\itemapi.obj \
$(OBJ_DIR)\macro.obj \
$(OBJ_DIR)\maindll.obj \
$(OBJ_DIR)\mainstd.obj \
$(OBJ_DIR)\mainwin.obj \
$(OBJ_DIR)\memvars.obj \
$(OBJ_DIR)\memvclip.obj \
$(OBJ_DIR)\pcount.obj \
$(OBJ_DIR)\proc.obj \
$(OBJ_DIR)\pvalue.obj \

View File

@@ -49,9 +49,9 @@
static s_oDebugger
static s_lExit := .F.
static s_lEnabled := .t.
function AltD( nAction )
static s_lEnabled := .t.
do case
case nAction == nil

View File

@@ -33,7 +33,7 @@ LEX_HEADERS=\
hbdefs.h \
hbmacro.h \
C_SOURCES=macro.c \
C_SOURCES=\
macroa.c \
macrob.c \
macroc.c \

View File

@@ -19,8 +19,10 @@ C_SOURCES=\
initexit.c \
initsymb.c \
itemapi.c \
macro.c \
main.c \
memvars.c \
memvclip.c \
pcount.c \
proc.c \
pvalue.c \

View File

@@ -40,10 +40,7 @@
* Copyright 1999 Victor Szakats <info@szelvesz.hu>
* __MVSAVE()
* __MVRESTORE() (Thanks to Dave Pearson and Jo French for the original
* Clipper function (FReadMem()) to read .MEM files)
* __MSAVE()
* __MRESTORE()
* __QQPUB()
* Clipper function (FReadMem()) to read .mem files)
*
* See doc/license.txt for licensing terms.
*
@@ -56,12 +53,10 @@
#include "hbapierr.h"
#include "hbapifs.h" /* for __MVSAVE()/__MVRESTORE() */
#include "hbdate.h" /* for __MVSAVE()/__MVRESTORE() */
#include "hbcomp.h" /* for VS_* macros */
#include "error.ch"
#include "hbmemvar.ch"
#define VS_PRIVATE 64
#define VS_PUBLIC 128
static PHB_DYNS * s_privateStack = NULL;
static ULONG s_privateStackSize = 0;
static ULONG s_privateStackCnt = 0;
@@ -83,11 +78,10 @@ struct mv_PUBLIC_var_info
HB_DYNS_PTR pDynSym;
};
static void hb_memvarCreateFromItem( PHB_ITEM, BYTE, PHB_ITEM );
static void hb_memvarCreateFromDynSymbol( PHB_DYNS, BYTE, PHB_ITEM );
static void hb_memvarAddPrivate( PHB_DYNS );
static HB_DYNS_PTR hb_memvarFindSymbol( HB_ITEM_PTR );
void hb_memvarsInit( void )
{
HB_TRACE(HB_TR_DEBUG, ("hb_memvarsInit()"));
@@ -102,7 +96,6 @@ void hb_memvarsInit( void )
s_privateStackCnt = s_privateStackBase = 0;
}
void hb_memvarsRelease( void )
{
ULONG ulCnt = s_globalLastFree;
@@ -136,7 +129,6 @@ HB_VALUE_PTR *hb_memvarValueBaseAddress( void )
return &s_globalTable;
}
/*
* This function creates new global value.
*
@@ -572,7 +564,7 @@ char * hb_memvarGetStrValuePtr( char * szVarName, ULONG *pulLen )
* or NULL
*
*/
static void hb_memvarCreateFromItem( PHB_ITEM pMemvar, BYTE bScope, PHB_ITEM pValue )
void hb_memvarCreateFromItem( PHB_ITEM pMemvar, BYTE bScope, PHB_ITEM pValue )
{
PHB_DYNS pDynVar = NULL;
@@ -941,16 +933,6 @@ HB_FUNC( __MVPUBLIC )
}
}
/* NOTE: Undocumented Clipper internal function */
HB_FUNC( __QQPUB )
{
PHB_ITEM pItem = hb_param( 1, HB_IT_STRING );
if( pItem )
hb_memvarCreateFromItem( pItem, VS_PUBLIC, NULL );
}
HB_FUNC( __MVPRIVATE )
{
int iCount = hb_pcount();
@@ -1506,30 +1488,3 @@ HB_FUNC( __MVRESTORE )
hb_errRT_BASE( EG_ARG, 2007, NULL, "__MRESTORE" );
}
/* CA-Clipper 5.2e compatibility functions. */
HB_FUNC( __MCLEAR )
{
HB_FUNCNAME( __MVCLEAR )();
}
HB_FUNC( __MRELEASE )
{
HB_FUNCNAME( __MVRELEASE )();
}
HB_FUNC( __MXRELEASE )
{
HB_FUNCNAME( __MVXRELEASE )();
}
HB_FUNC( __MSAVE )
{
HB_FUNCNAME( __MVSAVE )();
}
HB_FUNC( __MRESTORE )
{
HB_FUNCNAME( __MVRESTORE )();
}

View File

@@ -0,0 +1,82 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* CA-Cl*pper compatibility memvar support
*
* Copyright 1999 Victor Szakats <info@szelvesz.hu>
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version, with one exception:
*
* The exception is that if you link the Harbour Runtime Library (HRL)
* and/or the Harbour Virtual Machine (HVM) with other files to produce
* an executable, this does not by itself cause the resulting executable
* to be covered by the GNU General Public License. Your use of that
* executable is in no way restricted on account of linking the HRL
* and/or HVM code into it.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
* their web site at http://www.gnu.org/).
*
*/
#include "hbapi.h"
#include "hbapiitm.h"
#include "hbcomp.h" /* for VS_* macros */
extern HB_FUNC( __MVCLEAR );
extern HB_FUNC( __MVRELEASE );
extern HB_FUNC( __MVXRELEASE );
extern HB_FUNC( __MVSAVE );
extern HB_FUNC( __MVRESTORE );
/* NOTE: Undocumented Clipper internal function */
HB_FUNC( __QQPUB )
{
PHB_ITEM pItem = hb_param( 1, HB_IT_STRING );
if( pItem )
hb_memvarCreateFromItem( pItem, VS_PUBLIC, NULL );
}
/* CA-Clipper 5.2e compatibility functions. */
HB_FUNC( __MCLEAR )
{
HB_FUNCNAME( __MVCLEAR )();
}
HB_FUNC( __MRELEASE )
{
HB_FUNCNAME( __MVRELEASE )();
}
HB_FUNC( __MXRELEASE )
{
HB_FUNCNAME( __MVXRELEASE )();
}
HB_FUNC( __MSAVE )
{
HB_FUNCNAME( __MVSAVE )();
}
HB_FUNC( __MRESTORE )
{
HB_FUNCNAME( __MVRESTORE )();
}