1 #ifndef REFH 2 #define REFH 3 /* 4 * $Id: ref.h,v 1.6 2000/08/10 21:02:51 danny Exp $ 5 * Copyright � 1992, 1993 Free Software Foundation, Inc. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2, or (at your option) 10 * any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this software; see the file COPYING. If not, write to 19 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 20 */ 21 #include "global.h" 22 #include "cell.h" 23 24 /* Operations that add or remove cells to the sparse array 25 * may cause the (memory) addresses of other cells to change. 26 * Some cell pointers are privileged enough to be relocated. 27 * This is one. The others are part of a stack of iteration 28 * states created by nested calls to find_range etc. 29 * 30 * When this pointer is not NULL, the variables cur_row and cur_col 31 * MUST contain the (spreadsheet) address of my_cell. 32 */ 33 extern struct cell * my_cell; 34 35 extern void set_cell (CELLREF row, CELLREF col, char *string); 36 extern char * new_value (CELLREF row, CELLREF col, char *string); 37 extern char * quote_new_value (CELLREF row, CELLREF col, char *string); 38 extern char * set_new_value (CELLREF row, CELLREF col, int type, union vals *value); 39 extern char * read_new_value (CELLREF row, CELLREF col, char *form, char *val); 40 extern void move_cell (CELLREF rf, CELLREF cf, CELLREF rt, CELLREF ct); 41 extern void copy_cell (CELLREF rf, CELLREF cf, CELLREF rt, CELLREF ct); 42 extern void flush_old_value (void); 43 extern void add_ref (CELLREF row, CELLREF col); 44 extern void add_range_ref (struct rng *rng); 45 extern void flush_refs (void); 46 extern void add_ref_to (int whereto); 47 extern void add_ref_to (int whereto); 48 extern void shift_outside (struct rng *fm, int dn, int ov); 49 extern void shift_formula (int r, int c, int dn, int ov); 50 extern void cell_alarm (void); 51 extern void flush_all_timers (void); 52 extern void add_timer_ref (int whereto); 53 extern void init_refs (void); 54 extern void push_refs (struct ref_fm *ref); 55 extern void push_cell (CELLREF row, CELLREF col); 56 extern int eval_next_cell (void); 57 extern char * old_new_var_value (char *v_name, int v_namelen, char *v_newval); 58 extern char * new_var_value (char *v_name, int v_namelen, struct rng *tmp_rng); 59 extern void for_all_vars (void (*func) (char *, struct var *)); 60 extern struct var * find_or_make_var (char *string, int len); 61 extern struct var * find_var (char *string, int len); 62 extern void add_var_ref (void * vvar); 63 extern void flush_variables (void); 64 65 #endif 66