#ifndef h_PROGRAM #define h_PROGRAM /****************************************************************************** * * Definition of a UniVerse/BASIC program load block * * Module %M% Version %I% Date %H% * * (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved * This is unpublished proprietary source code of Ardent Software Inc. * The copyright notice above does not evidence any actual or intented * publication of such source code. * ******************************************************************************* * * Maintenence log - insert most recent change descriptions at top * * Date.... GTAR# WHO Description......................................... * 10/14/98 23801 SAP Change copyrights. * 11/15/89 6183 JWT longer BASIC variable name support * 06/27/89 6106 DTW change LDATUM * 07/25/88 - - Maintenence log purged at 5.2.1, see release 5.1.10. * *****************************************************************************/ #include "bashead.h" #include "DATUM.h" struct comseg { char name[ SYMsiz ]; int size; }; struct ncomseg { char *name; int size; }; enum prog_type { PROG_NORMAL, PROG_SHARED, PROG_GCI, PROG_OBJLOAD }; #define PROGTYP enum prog_type #define LDATUM struct ldatum struct ldatum { LDATUM *link; /* link to next LDATUM */ ushort var_index; /* vartab entry for this pointer */ DATUM data; /* point to called subroutine prog struct */ }; struct program { PROGRAM *flink, /* Forward link */ *blink, /* Backward link */ *owner; /* True owner of code */ ushort *code; /* Object code */ BASHEAD bh; /* Header from object file */ DATUM **pretab, /* Pre-allocated variable table */ *kontab; /* Konstant table */ int refs, /* Number of references */ level, /* EXElevel program was created */ LRU, /* For LRU unloading */ size; /* Program size for LRU also */ NREFTAB *symbol; /* Symbol table */ short *lines; /* Line number table */ long seek; /* Seek position */ char name[64], /* Subroutine name */ file[128], /* Object file name */ base[128]; /* Base path name to Type 1 file*/ uchar *constnt; /* Constant String Pointer */ DATUM *subr; /* Link list to Tsubr datum */ long timing; /* Seconds spend in this prog. */ int invocs; /* Number of invocations */ struct ncomseg *comtb; /* COMMON table */ ushort *shmaddr; /* address, if in shared memory */ DATUM *registers; /* for shared mem. reg. vars. */ LDATUM *shmsubr; PROGTYP type; }; EXTERN PROGRAM *loaditype(); EXTERN int loadsub(); EXTERN PROGRAM *Programs; #endif /* end of PROGRAM.h */