home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / harbb30g.zip / INCLUDE / hb_vmpub.h < prev    next >
C/C++ Source or Header  |  1999-09-15  |  3KB  |  77 lines

  1. /*
  2.  * $Id: hb_vmpub.h,v 1.9 1999/09/15 14:03:37 vszel Exp $
  3.  */
  4.  
  5. /*
  6.  * Harbour Project source code:
  7.  * Header file for the generated C language source code
  8.  *
  9.  * Copyright 1999 Victor Szel <info@szelvesz.hu>
  10.  * www - http://www.harbour-project.org
  11.  *
  12.  * This program is free software; you can redistribute it and/or modify
  13.  * it under the terms of the GNU General Public License as published by
  14.  * the Free Software Foundation; either version 2 of the License, or
  15.  * (at your option) any later version, with one exception:
  16.  *
  17.  * The exception is that if you link the Harbour Runtime Library (HRL)
  18.  * and/or the Harbour Virtual Machine (HVM) with other files to produce
  19.  * an executable, this does not by itself cause the resulting executable
  20.  * to be covered by the GNU General Public License. Your use of that
  21.  * executable is in no way restricted on account of linking the HRL
  22.  * and/or HVM code into it.
  23.  *
  24.  * This program is distributed in the hope that it will be useful,
  25.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  26.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  27.  * GNU General Public License for more details.
  28.  *
  29.  * You should have received a copy of the GNU General Public License
  30.  * along with this program; if not, write to the Free Software
  31.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
  32.  * their web site at http://www.gnu.org/).
  33.  *
  34.  */
  35.  
  36. #ifndef HB_VMPUB_H_
  37. #define HB_VMPUB_H_
  38.  
  39. #include "hbdefs.h"
  40. #include "pcode.h"
  41.  
  42. struct _HB_DYNS;
  43.  
  44. /* symbol support structure */
  45. typedef struct
  46. {
  47.    char *      szName;  /* the name of the symbol */
  48.    SYMBOLSCOPE cScope;  /* the scope of the symbol */
  49.    PHB_FUNC    pFunPtr; /* function address for function symbol table entries */
  50.    struct _HB_DYNS    *pDynSym; /* pointer to its dynamic symbol if defined */
  51. } HB_SYMB, * PHB_SYMB;
  52.  
  53. /* dynamic symbol structure */
  54. typedef struct _HB_DYNS
  55. {
  56.    HB_HANDLE hArea;       /* Workarea number */
  57.    HB_HANDLE hMemvar;     /* Index number into memvars ( publics & privates ) array */
  58.    PHB_SYMB  pSymbol;     /* pointer to its relative local symbol */
  59.    PHB_FUNC  pFunPtr;     /* Pointer to the function address */
  60. } HB_DYNS, * PHB_DYNS, * HB_DYNS_PTR;
  61.  
  62. #define HB_DYNS_FUNC( hbfunc )   BOOL hbfunc( PHB_DYNS pDynSymbol, void * Cargo )
  63. typedef HB_DYNS_FUNC( PHB_DYNS_FUNC );
  64.  
  65. /* Harbour Functions scope ( SYMBOLSCOPE ) */
  66. #define FS_PUBLIC       ( ( SYMBOLSCOPE ) 0x00 )
  67. #define FS_STATIC       ( ( SYMBOLSCOPE ) 0x02 )
  68. #define FS_INIT         ( ( SYMBOLSCOPE ) 0x08 )
  69. #define FS_EXIT         ( ( SYMBOLSCOPE ) 0x10 )
  70. #define FS_INITEXIT     ( FS_INIT | FS_EXIT )
  71. #define FS_MESSAGE      ( ( SYMBOLSCOPE ) 0x20 )
  72. #define FS_MEMVAR       ( ( SYMBOLSCOPE ) 0x80 )
  73.  
  74. extern void hb_vmExecute( BYTE * pCode, PHB_SYMB pSymbols );  /* invokes the virtual machine */
  75.  
  76. #endif /* HB_VMPUB_H_ */
  77.