1 /*
2  *  gretl -- Gnu Regression, Econometrics and Time-series Library
3  *  Copyright (C) 2001 Allin Cottrell and Riccardo "Jack" Lucchetti
4  *
5  *  This program is free software: you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation, either version 3 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  *
18  */
19 
20 #ifndef JOIN_PRIV_H
21 #define JOIN_PRIV_H
22 
23 /* stuff that needs to be shared between csvdata.c and gretl_join.c */
24 
25 typedef struct csvdata_ csvdata;
26 
27 struct joinspec_ {
28     int ncols;
29     const char **colnames;
30     const char *mdsbase;
31     int *colnums;
32     int *timecols;
33     csvdata *c;
34     DATASET *dset;
35     int wildcard;
36     int auto_midas;
37     int midas_pd;
38     char **wildnames;
39     char **mdsnames;
40     char **tmpnames;
41     int n_tmp;
42 };
43 
44 typedef struct joinspec_ joinspec;
45 
46 DATASET *csvdata_get_dataset (csvdata *c);
47 
48 void csvdata_free (csvdata *c);
49 
50 int real_import_csv (const char *fname,
51 		     DATASET *dset,
52 		     const char *cols,
53 		     const char *rows,
54 		     joinspec *join,
55 		     void *probe,
56 		     gretl_matrix **pm,
57 		     gretlopt opt,
58 		     PRN *prn);
59 
60 int timecol_get_format (const DATASET *dset, int v,
61 			char **pfmt, int *q);
62 
63 #endif /* JOIN_PRIV_H */
64