Source: /app/hbasic/hbasic/src/global_vars.h


Annotated List
Files
Globals
Hierarchy
Index
/* **************************************************************************
 File: global_vars.h
 Desc: Global variable definitions.
 ----------------------------------------------------------------------------
	copyright            : (C) 2001 HBasic project (Marcus Engels)
 ***************************************************************************/

/* **************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

/* ----------------------------------------------------------------------- */
/* Classlist: List of classes that will be defined in this source file.    */
/* ----------------------------------------------------------------------- */

/* ----------------------------------------------------------------------- */
/* Changelog: Description of important changes within this file.           */
/*            Please report with date, maintainer and change description.  */
/* ----------------------------------------------------------------------- */

#ifndef VARS
#define VARS

class CActionMgr;
class CDebugWidget1;
class CDebugWidget2;
class CMainWindow;
class MemoryBlock;
class FormWidget;
class QWorkspace;
class QSqlQuery;
class QSqlRecord;
class CMessageList;
class CMacroList;
class HBSheet;
class CDirectWindow;

#include "defines.h"
#include "structs.h"

/* Mainwindow of HBasic application. */
extern CMainWindow *gl_main_window;

/* General parameter for the project */
/* number of next project name to create */
extern int gb_project_number;

/* Bits for enabled function groups in editor. */
extern long ed_enabled_menu_functions;

/* Global parameter settings for the hbasic program. */
extern HBASIC_OPTIONS hbasic_glb_options;

/* Number of created form structures. */
extern short gl_next_form_number;

/* project managment */
extern GUI_HEADER *current_gui;
extern int num_projects;

/* False if hbasic should only execute one program immediatly */
extern short gl_start_with_gui;

/* control if preparse should abort on errors. */
extern int gl_abort_on_error;

/* Block description for source paste buffer. */
/* First entry in buffer is SOURCE_BLOCK_HEADER structure. */

extern char *gl_paste_buffer;

/* Pointer to current worksheet for runtime code computing worksheet values */
extern HBSheet *gl_current_worksheet;

/* -------------------------------------------------------------- */
/* globals for source editor */

extern char findstring[];
extern unsigned char bt_tempbuff[];
extern unsigned char bt_colored_line[];
extern unsigned char readbuff[];

/* -------------------------------------------------------------- */
/* Globals for undo operation stack.                              */

extern short gl_undo_pos;         /* Position of last undo operation in array. */
extern short gl_buffer_endpos;    /* End position of undo buffer. */
extern short *gl_undo_desc; // [UNDO_BUFFER_SIZE];    /* pointer to undo descriptions. */
extern short *gl_redo_desc;

extern int gl_debug_display_mode;    /* TRUE if mainwindow in debug mode */
extern CDebugWidget1 *debug_win1;
extern CDebugWidget2 *debug_win2;

/* -------------------------------------------------------------- */
/* Global library handel for Database access gui library.         */

extern void *gl_db_gui_library;

/* -------------------------------------------------------------- */
/* globals for gui_editor                                        */

/* The grid (for fixed containers) */
extern int editor_show_grid;
extern int editor_grid_horz_spacing;
extern int editor_grid_vert_spacing;
extern int editor_grid_style;

/* Snapping to the grid */
extern int editor_snap_to_grid;
extern int editor_snap_to_grid_x;
extern int editor_snap_to_grid_y;

/* -------------------------------------------------------------- */

extern int working_mode;

/* selected element for parameter list */
extern int cl_select_type;   /* type of element for which the pars are displayed */
extern char *cl_select_ptr;   /* pointer to last selected element */

//* extern GtkWidget *gl_property_list;   /* widget for property window */
extern int current_gui_function;  /* type of gui edit mode */

/* First and Next unique type id for parser typelist */
extern short pa_next_type_id;
extern short pa_first_type_id;

extern MemoryBlock *start_code;     /* start of compiled code */
extern long *start_event_table;
extern unsigned char *readptr;   /* Points to actual Position in Sourcecode */
extern unsigned char *start_source_line;   /* Points to start of current line in source */
extern int char_to_read;          /* number of character to read in current line */
extern int end_of_code_reached;   /* true if parser reached end of code */
extern unsigned char *err_line_start;     /* the start of the error line */
extern char err_text[100];         /* the error text */

/* Language helps parser to find out what's allowed */
extern short gl_source_language;

/* Cursor used to fill runtime values in report execution */
extern QSqlQuery *gl_report_cursor;
extern QSqlRecord *gl_report_record;

/* definitions for gui description and systemwide constants and functions */
extern char gui_desc[5000];
extern char sys_defs[5000];
extern long gui_desc_length;
extern long sys_defs_length;

/* list of windows, which are currently displayed on the screen */

extern char *stdidf[];   // standard identifier for Basic language
extern char project_group_name[40];   // name of global project group

extern RT_FORM_DESC *rt_form_ptr;    // pointer to start of n form descriptors
extern int rt_form_count;         // number of forms in current project

/* ---------------------------------------------------------- */
/* globals for interpreter execution */

extern long gl_code_start_offset;   // code offset for program start

extern unsigned char tempbuff[];
extern long *gi_heap_empty_mem;    // start of list of empty heap blocks
extern long *gi_heap_empty_end;    // end of list of empty heap blocks

extern long return_address;		/* Last code address before calling JSR. */

extern char *rt_global_var;        // pointer to global variables at runtime
extern long *rt_address_top;      // pointer to current top of address stack
extern long *rt_address_mem;
extern long *rtp_current_formvar;  // pointer to variable contents of current form

/* Handle MDI window at runtime if required. */
extern short rt_use_mdi;                // TRUE if MDI windows should be created
extern RT_FORM_DESC mdi_form_desc;	// Description for mdi mainwindow
extern FormWidget *mdi_parent_window;  // Main parent MDI window if required
extern QWorkspace *mdi_container;          // QWorkspace for mdi subwindows

extern char *exec_pointer;     /* Execution point in running program */
extern char buffer[1000];
extern char heap_memory[];      /* buffer space for strings */
extern char *heap_mem_end;      /* pointer to first free pos in heap_memory */

extern int program_is_running;  /* values see RST_xxx in defines.h */
extern int rt_open_forms;      /* number of open forms at runtime. If there are */
                        /* no more open forms left, we stop the program  */
                        /* execution of the interpreter.                 */

extern MemoryBlock *gmb_runtime_memory;      /* memory used for interpreter memory allocation. */

/* Structure to manage if while for ... */

extern char *current_sub;

/* Stack for Variable description */

extern long *pa_prepare_sub_stack;  /* position where stack size for local */
/* subroutine variables should be appended cp1005 */

/* Path for start of hbasic files */
extern char kb_app_path[100];

/* ################################################################ */
/*     Global runtime variables                                     */
/* ---------------------------------------------------------------- */

extern short rt_module_number;   /* Number of module for code execution. */
extern short rt_line_number;     /* line number in current module */

/* The interpreter will stop if rt_open_windows = 0 */
extern short rt_open_windows;    /* Number of opened windows at runtime. */

/* Flag set if break-address should be written by parser. */
extern short gl_set_breakadr;

/* Pointer to document where break occured. */
extern CBasicDocument *rt_break_source;	
extern unsigned char *rt_break_address;		/* Address of last reached breakpoint. */
extern unsigned char *rt_source_break_line;	/* Address of breakpoint in source code. */

extern long *rt_breakpoint_stack;      /* Address list of breakpoints. */
extern long *rt_last_breakpoint;       /* first free place in breakpoint stack */
extern short gl_search_breakpoint;       /* True if parser should handle breakpoints. */

extern unsigned char *rt_adr_endcode;           /* Address of finalization code for interp. */
extern short rt_program_is_running;    /* TRUE while interpreter executes statements. */
extern RTGUI_HEADER *rt_form_desc_ptr;  /* Pointer to form descriptions at runtime. */
extern short gl_xml_indent_level;      /* Used for indentation when saving file. */

extern long *gl_form_function_lib;    /* Start addresses for global functions. */
extern char *gl_start_runcode;		/* Start of global initcode (DEBUG) */

extern unsigned char *rt_error_position;         /* Code position where runtime error occured. */
extern short rt_error_number;          /* Number (type) of error. */
extern short rt_error_type;            /* 0 for parser error / 1 for runtime error. */
extern long rtcomp_gui_offset;         /* Offset for current gui component in compiler. */

/* Directory path for save and load operations. */

extern QString gl_load_dir;

/* Did we use net components. / TRUE if NET init required ?? */
extern short gl_net_init_required;

/* Global process and thread used for net method calls. */
/* ILExecProcess *gl_net_process and ILThread *gl_net_thread. */
extern void *gl_net_process;
extern void *gl_net_thread;

/* Current macro description used in parser */
extern MACRO_DESC *gl_current_macro_desc;
extern MACRO_DESC *gl_last_macro_desc;

/* Global available windows */
extern CMessageList *gl_win_messages;
extern CMacroList *gl_win_macros;
extern CDirectWindow *gl_win_debug;

#endif


Generated by: root on linux on Sun Jul 13 18:06:35 2003, using kdoc 2.0a54.