This file is indexed.

/usr/include/gretl/objstack.h is in libgretl1-dev 2016d-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
/* 
 *  gretl -- Gnu Regression, Econometrics and Time-series Library
 *  Copyright (C) 2001 Allin Cottrell and Riccardo "Jack" Lucchetti
 * 
 *  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 3 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, see <http://www.gnu.org/licenses/>.
 * 
 */

#ifndef OBJSTACK_H
#define OBJSTACK_H

/* Note: the following enumeration may be added to, but the
   existing entries up to GRETL_OBJ_SCALARS must not be
   moved.
*/

typedef enum {
    GRETL_OBJ_NULL,
    GRETL_OBJ_EQN,
    GRETL_OBJ_SYS,
    GRETL_OBJ_VAR,
    GRETL_OBJ_DSET,
    GRETL_OBJ_INFO,
    GRETL_OBJ_STATS,
    GRETL_OBJ_CORR,
    GRETL_OBJ_SCRIPT,
    GRETL_OBJ_NOTES,
    GRETL_OBJ_MODTAB,
    GRETL_OBJ_GPAGE,
    GRETL_OBJ_GRAPH,
    GRETL_OBJ_PLOT,
    GRETL_OBJ_TEXT,
    GRETL_OBJ_MATRIX,
    GRETL_OBJ_SCALARS,
    GRETL_OBJ_BUNDLE,
    GRETL_OBJ_ANY,
    GRETL_OBJ_MAX
} GretlObjType;

typedef enum {
    IN_GUI_SESSION = 1 << 0,
    IN_NAMED_STACK = 1 << 1,
    IN_MODEL_TABLE = 1 << 2,
    IS_LAST_MODEL  = 1 << 3,
    IN_GRAPH_PAGE  = 1 << 4
} SavedObjectFlags;

enum {
    OBJ_ACTION_NONE,
    OBJ_ACTION_INVALID,
    OBJ_ACTION_NULL,
    OBJ_ACTION_SHOW,
    OBJ_ACTION_FREE
};

void set_as_last_model (void *ptr, GretlObjType type);

int gretl_model_protect (MODEL *pmod);

int gretl_model_unprotect (MODEL *pmod);

void *get_last_model (GretlObjType *type);

GretlObjType get_last_model_type (void);

void *get_genr_model (GretlObjType *type);

int get_genr_model_ID (void);

MODEL *get_model_by_name (const char *mname);

MODEL *get_model_by_ID (int ID);

GRETL_VAR *get_VAR_by_name (const char *vname);

GRETL_VAR *get_VECM_by_name (const char *vname);

equation_system *get_equation_system_by_name (const char *sname);

void *gretl_get_object_by_name (const char *name);

int gretl_get_object_and_type (const char *name, void **pp, 
			       GretlObjType *type);

GretlObjType gretl_model_get_type_and_ci (const char *name,
					  int *ci);

int object_is_on_stack (const void *ptr);

int gretl_stack_object (void *ptr, GretlObjType type);

int gretl_stack_object_as (void *ptr, GretlObjType type, const char *name);

void gretl_object_remove_from_stack (void *ptr, GretlObjType type);

void remove_model_from_stack_on_exit (MODEL *pmod);

MODEL *maybe_stack_model (MODEL *pmod, CMD *cmd, PRN *prn, int *err);

int maybe_stack_var (GRETL_VAR *var, CMD *cmd);

void gretl_object_ref (void *ptr, GretlObjType type);

void gretl_object_unref (void *ptr, GretlObjType type);

double saved_object_get_scalar (const char *oname, int idx,
				DATASET *dset, int *err);

int saved_object_print_scalar (const char *oname, const char *key, PRN *prn);

int saved_object_get_series (double *x, const char *oname, 
			     int idx, const DATASET *dset);

gretl_matrix *
saved_object_get_matrix (const char *oname, int idx, int *err);

gretl_matrix *
saved_object_build_matrix (const char *oname, int idx, 
			   const DATASET *dset, int *err);

gretl_matrix *
last_model_get_irf_matrix (int targ, int shock, double alpha, 
			   const DATASET *dset, int *err);

gretl_matrix *last_model_get_boot_ci (int cnum, const DATASET *dset,
				      int B, double alpha,
				      int method, int studentize,
				      int *err);

double last_model_get_boot_pval (int cnum,
				 const DATASET *dset,
				 int B, int method,
				 int *err);

void *last_model_get_data (const char *key, GretlType *type, 
			   int *size, int *err);

char *last_model_get_vcv_type (void);

int *saved_object_get_list (const char *oname, int idx, int *err);

char *saved_object_get_string (const char *oname, int idx, 
			       const DATASET *dset, int *err);

int gretl_object_rename (void *p, GretlObjType type, const char *oname);

int gretl_object_compose_name (void *p, GretlObjType type);

int gretl_object_compose_unique_name (void *p, GretlObjType type);

char *gretl_object_get_name (void *p, GretlObjType type);

int parse_object_command (const char *s, char *name, char **cmd);

int match_object_command (const char *s);

int last_model_test_ok (int ci, gretlopt opt, const DATASET *dset, 
			PRN *prn);

int last_model_test_uhat (DATASET *dset, gretlopt opt, PRN *prn);

void set_genr_model (void *ptr, GretlObjType type);

void unset_genr_model (void);

int highest_numbered_var_in_saved_object (const DATASET *dset);

int check_variable_deletion_list (int *list, const DATASET *dset);

int check_models_for_subsample (char *newmask, int *ndropped);

int n_stacked_models (void);

void set_gui_model_list_callback (GList *(*callback)());

void gretl_saved_objects_cleanup (void);

#endif