1 /* 2 * Grace - GRaphing, Advanced Computation and Exploration of data 3 * 4 * Home page: http://plasma-gate.weizmann.ac.il/Grace/ 5 * 6 * Copyright (c) 1991-95 Paul J Turner, Portland, OR 7 * Copyright (c) 1996-99 Grace Development Team 8 * 9 * Maintained by Evgeny Stambulchik 10 * 11 * 12 * All Rights Reserved 13 * 14 * This program is free software; you can redistribute it and/or modify 15 * it under the terms of the GNU General Public License as published by 16 * the Free Software Foundation; either version 2 of the License, or 17 * (at your option) any later version. 18 * 19 * This program is distributed in the hope that it will be useful, 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 * GNU General Public License for more details. 23 * 24 * You should have received a copy of the GNU General Public License 25 * along with this program; if not, write to the Free Software 26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 27 */ 28 29 /* 30 * 31 * SS data 32 * 33 */ 34 35 #ifndef __SSDATA_H_ 36 #define __SSDATA_H_ 37 38 #define FFORMAT_NUMBER 0 39 #define FFORMAT_STRING 1 40 #define FFORMAT_DATE 2 41 42 typedef struct _ss_data 43 { 44 int ncols; 45 int nrows; 46 int *formats; 47 void **data; 48 } ss_data; 49 50 double *copy_data_column(double *src, int nrows); 51 double *allocate_index_data(int nrows); 52 double *allocate_mesh(double start, double stop, int len); 53 54 void set_blockdata(ss_data *ssd); 55 56 int get_blockncols(void); 57 int get_blocknrows(void); 58 int *get_blockformats(void); 59 60 int realloc_ss_data(ss_data *ssd, int nrows); 61 void free_ss_data(ss_data *ssd); 62 int init_ss_data(ss_data *ssd, int ncols, int *formats); 63 64 int parse_ss_row(const char *s, int *nncols, int *nscols, int **formats); 65 int insert_data_row(ss_data *ssd, int row, char *s); 66 int store_data(ss_data *ssd, int load_type, char *label); 67 68 int create_set_fromblock(int gno, int setno, 69 int type, int nc, int *coli, int scol, int autoscale); 70 char *cols_to_field_string(int nc, int *cols, int scol); 71 int field_string_to_cols(const char *fs, int *nc, int **cols, int *scol); 72 73 #endif /* __SSDATA_H_ */ 74