/* expC - Expressions analyzator and viewer Copyright (C) 2004 Samuel Kupka 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. 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. */ #ifndef _expC_HEADER #define _expC_HEADER #include "datafile.h" BITMAP *bmp2,*actual,*exp_bmp; DATAFILE *data; typedef struct{ char str[16]; }EXPR_ATOM; typedef struct{ unsigned char node; unsigned short prev,next[2]; unsigned short x,y; }EXPR_NODE; #define MAX_ATOM 128 #define OPER_AND 200 #define OPER_OR 201 #define OPER_NOT 250 /* main.c */ void main_koniec(char *text); /* basics.c */ void basic_box(BITMAP *bmp,short x,short y,short w,short h,char mode); void basic_button(BITMAP *bmp,short x,short y,short w,short h,char *text,char mode); void basic_draw_buttons(BITMAP *bmp); void basic_unset_buttons(BITMAP *bmp); void basic_set_button(BITMAP *bmp,int c); int basic_check_buttons(int mx,int my); void basic_add_button(short x,short y,short w,short h,char *text,int retval); void basic_clear_buttons(void); /* gui.c */ void gui_init_right_menu(void); //int gui_get_scrollbar(BITMAP *bmp,int pos,int max,int w1,int w2,int dx); //void gui_scrollbar(BITMAP *bmp,int pos,int max,int w1,int w2,int x,int y,int l,char vert); void gui_start(void); /* dialog.c */ int vdialog_show(void); /* expr.c */ void expr_init(void); void expr_exit(void); int expr_show_node(BITMAP *bmp,int node,int orig,int x,int y); void expr_show_text(BITMAP *bmp,int x,int y); int expr_draw_atom(BITMAP *bmp,int x,int y,int num,int c1,int c2,char draw); int expr_draw_string(BITMAP *bmp,int x,int y,char *str,int c1,int c2,char draw); int expr_draw_node(BITMAP *bmp,int x,int y,int node,int c1,int c2,char draw); int expr_which_oper(unsigned char c); int expr_find_oper(char *expr,int s,int e,int *vysl_hl); int expr_find_atom(char *str); int expr_str_to_atom(char *expr,int s,int e,int tp); int expr_str_to_tree(char *expr,int s,int e,int tp); int expr_calc_xy_positions(int p,int h); int expr_to_tree(char *expr); /* expr2bmp.c */ int expr2bmp(void); #endif // kvoli kompatibilite s Linuxovskym GCC #ifndef stricmp #define stricmp strcasecmp #endif