This file is indexed.

/usr/include/ncarg/ncl/NclAdvancedFileStructure.h is in libncarg-dev 6.2.0-3+b1.

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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
#ifndef NclNewFileStructure_h
#define NclNewFileStructure_h

#undef MAX_BLANK_SPACE_LENGTH
#define MAX_BLANK_SPACE_LENGTH  1024

#define NCL_MINIMUM_ATTS    2
#define NCL_MINIMUM_DIMS    2
#define NCL_MINIMUM_COORDS    2
#define NCL_MINIMUM_VARS    4
#define NCL_MINIMUM_GRPS    2

#include <netcdf.h>
#include "NclList.h"
#include "NclOptions.h"

typedef struct _NclFileUserDefinedTypeNode
{
    ng_size_t         id;
    size_t            size;
    int               ncl_class;
    int               max_fields;
    int               n_fields;
    NclQuark          name;
    ng_size_t         type;
    NclQuark          *mem_name;
    NclBasicDataTypes *mem_type;
} NclFileUDTNode;

typedef struct _NclFileUserDefinedTypeRecord
{
    ng_size_t       gid;
    ng_size_t       uid;
    int             max_udts;
    int             n_udts;
    NclFileUDTNode *udt_node;
} NclFileUDTRecord;

typedef struct _NclFileDimNode
{
    ng_size_t id;
    NclQuark  name;
    NclQuark  description;
    NclQuark  dataset_name;
    ng_size_t size;
    int       is_unlimited;
    int       is_dataset;
} NclFileDimNode;

typedef struct _NclFileDimRecord
{
    ng_size_t       gid;
    int             max_dims;
    int             n_dims;
    NclFileDimNode *dim_node;
} NclFileDimRecord;

typedef struct _NclFileAttNode
{
    NclQuark          name;
    NclBasicDataTypes type;
    ng_size_t         id;
    int               n_elem;
    void             *value;
    nc_type           the_nc_type;
    int               is_virtual;
    int               is_compound;
    int               is_vlen;
    int               is_opaque;
    int               is_enum;
} NclFileAttNode;

typedef struct _NclFileAttRecord
{
    ng_size_t       gid;
    ng_size_t       aid;
    ng_size_t       id;
    int             max_atts;
    int             n_atts;
    NclFileAttNode *att_node;

    _NhlCB                   cb;
    struct _FileCallBackRec *udata;
} NclFileAttRecord;

typedef struct _NclFileCompoundNode
{
    NclQuark             name;
    NclBasicDataTypes    type;
    nc_type              the_nc_type;
    size_t               offset;
    int                  rank;
    int                  nvals;
    int                 *sides;

    void                *value;
} NclFileCompoundNode;

typedef struct _NclFileCompoundRecord
{
    size_t            max_comps;
    size_t            n_comps;   /* aka nfields */
    size_t            type;
    size_t            size;
    NclQuark          name;
    nc_type           xtype;
    nc_type           base_nc_type;
    void             *value;

    NclFileCompoundNode    *compnode;

} NclFileCompoundRecord;

typedef struct _NclFileEnumNode
{
    NclQuark          name;
    long long         value;
} NclFileEnumNode;

typedef struct _NclFileEnumRecord
{
    size_t            max_enums;
    size_t            n_enums;   /* aka num_members */
    NclQuark          name;
    size_t            type;
    size_t            size;
    nc_type           xtype;
    nc_type           base_nc_type;

    void             *values;
    NclFileEnumNode  *enum_node;
} NclFileEnumRecord;

typedef struct _NclFileOpaqueRecord
{
    NclQuark name;
    size_t   max_opaques;
    size_t   n_opaques; 
    size_t   type;
    size_t   size;
    nc_type  xtype;
    nc_type  base_nc_type;

    void    *values;
} NclFileOpaqueRecord;

typedef struct _NclFileVlenRecord
{
    NclQuark name;
    size_t   max_vlens;
    size_t   n_vlens; 
    size_t   type;
    size_t   size;
    nc_type  xtype;
    nc_type  base_nc_type;
    int      ncl_class;
    int     *vs;
    int     *ve;

    void    *values;
} NclFileVlenRecord;

typedef struct _NclFileVarNode
{
    ng_size_t         id;
    ng_size_t         gid;
    NclQuark          name;
    NclQuark          real_name;
    NclQuark          short_name;
    NclQuark          full_name;
    NclQuark          index_dim;
    NclQuark          class_name;
    NclBasicDataTypes type;
    nc_type           the_nc_type;

    NclFileDimRecord *dim_rec;

    int               is_chunked;

    NclFileDimRecord *chunk_dim_rec;

    int                    is_compound;
    NclFileCompoundRecord *comprec;

    NclFileAttRecord *att_rec;

    int               shuffle;
    int               compress_level;
    int               use_cache;
    ng_size_t         cache_size;
    ng_size_t         cache_nelems;
    float             cache_preemption;

    void             *udt;

    void             *value;
} NclFileVarNode;

typedef struct _NclFileVarRecord
{
    ng_size_t       gid;
    int             max_vars;
    int             n_vars;
    NclFileVarNode *var_node;
} NclFileVarRecord;

typedef struct _NclFileCoordVarRecord
{
    int            max_vars;
    int            n_vars;
    NclFileVarNode        **var_node;
} NclFileCoordVarRecord;

typedef struct _NclFileGrpRecord    NclFileGrpRecord;
typedef struct _NclFileGrpNode      NclFileGrpNode;

struct _NclFileGrpNode
{
    ng_size_t            fid;
    ng_size_t            gid;
    ng_size_t            pid;
    
    NclQuark             name;
    NclQuark             pname;
    NclQuark             real_name;

    NclQuark             path;
    NclQuark             extension;
    NclQuark             kind;

    NclFileFormat        file_format;
    int                  status;
    int                  open;
    int                  format;
    int                  define_mode;
    int                  has_scalar_dim;
    int                  header_reserve_space;

    void                *other_src;

    int                  shuffle;
    int                  compress_level;
    int                  use_cache;
    ng_size_t            cache_size;
    ng_size_t            cache_nelems;
    float                cache_preemption;

    int                  n_options;
    NCLOptions          *options;

    int                  is_chunked;

    NclFileDimRecord    *chunk_dim_rec;
    NclFileDimRecord    *dim_rec;
    NclFileDimRecord    *unlimit_dim_rec;
    NclFileAttRecord    *att_rec;
    NclFileVarRecord    *var_rec;
    NclFileCoordVarRecord    *coord_var_rec;
    NclFileGrpRecord    *grp_rec;
    NclFileUDTRecord    *udt_rec;

    NclFileGrpNode      *parent;
};

struct _NclFileGrpRecord
{
    int        max_grps;
    int        n_grps;
    NclFileGrpNode  **grp_node;
};

NclFileCompoundRecord *_NclFileCompoundAlloc(int n_comps);
NclFileCoordVarRecord *_NclFileCoordVarAlloc(int n_vars);

NclFileGrpRecord *_NclFileGrpAlloc(int n_grps);
NclFileVarRecord *_NclFileVarAlloc(int n_vars);
NclFileAttRecord *_NclFileAttAlloc(int n_atts);
NclFileDimRecord *_NclFileDimAlloc(int n_dims);
NclFileUDTRecord *_NclFileUDTAlloc(int n_udts);

void _NclFileGrpRealloc(NclFileGrpRecord *grp_rec);
void _NclFileVarRealloc(NclFileVarRecord *var_rec);
void _NclFileAttRealloc(NclFileAttRecord **att_rec);
void _NclFileDimRealloc(NclFileDimRecord *dim_rec);
void _NclFileUDTRealloc(NclFileUDTRecord *udt_rec);

NclFileGrpNode *_getGrpNodeFromNclFileGrpNode(NclFileGrpNode *grp_rec,
                        NclQuark grp_name);
NclFileVarNode *_getVarNodeFromNclFileVarRecord(NclFileVarRecord *var_rec,
                        NclQuark var_name);
NclFileVarNode *_getVarNodeFromNclFileGrpNode(NclFileGrpNode *grpnode,
                        NclQuark var_name);
NclFileAttNode *_getAttNodeFromNclFileGrpRecord(NclFileGrpRecord *grp_rec,
                        NclQuark att_name);
NclFileAttNode *_getAttNodeFromNclFileGrpNode(NclFileGrpNode *grpnode,
                        NclQuark att_name);
NclFileAttNode *_getAttNodeFromNclFileVarNode(NclFileVarNode *varnode,
                        NclQuark att_name);
NclFileDimNode *_getDimNodeFromNclFileGrpNode(NclFileGrpNode *grpnode,
                        NclQuark dim_name);
NclFileDimNode *_getDimNodeFromNclFileGrpNodeWithID(NclFileGrpNode *grpnode,
                        int dimid);
NclFileDimNode *_getChunkDimNodeFromNclFileGrpNode(NclFileGrpNode *grpnode,
                        NclQuark dim_name);
NclFileVarNode *_getCoordVarNodeFromNclFileGrpNode(NclFileGrpNode *grpnode,
                        NclQuark var_name);

NhlErrorTypes _addNclAttNode(NclFileAttRecord **attrec,
                 NclQuark name, NclBasicDataTypes type,
                 int n_elem, void *value);
NhlErrorTypes _addNclDimNode(NclFileDimRecord **dimrec,
                 NclQuark name, int dimid, ng_size_t size,
                 int is_unlimited);
NhlErrorTypes _addNclVarNodeToGrpNode(NclFileGrpNode *grpnode,
                 NclQuark name, int varid, NclBasicDataTypes type,
                 int n_dims, NclQuark *dimnames, ng_size_t *dimsizes);
NhlErrorTypes _addNclCoordVarNode(NclFileCoordVarRecord **var_rec,
                 NclFileVarNode *var_node);
NhlErrorTypes _addNclGrpNodeToGrpNode(NclFileGrpNode *grpnode, NclQuark grpname);

void FileDestroyGrpNode(NclFileGrpNode *grpnode);

NhlErrorTypes _delNclAttNode(NclFileAttRecord **attrec, NclQuark name);

NclFileCoordVarRecord *_NclFileCoordVarRealloc(NclFileCoordVarRecord *coord_var_rec);

NclFileCompoundRecord *get_nc4_compoundrec(int ncid, nc_type xtype);

NclMultiDValData get_nc4_vlenlist(int ncid, int varid, nc_type xtype);

void _printNclTypeVal(FILE *fp, NclBasicDataTypes type, void *val, int newline);
void _justPrintTypeVal(FILE *fp, NclBasicDataTypes type, void *val, int newline);
void _justPrintTypeValAtPoint(FILE *fp, NclBasicDataTypes type, void *val,
                              size_t np, int newline);

NclFileEnumRecord *_NclFileEnumAlloc(int n_enums);
void _NclFileEnumRealloc(NclFileEnumRecord **enumrec);
NhlErrorTypes _addNclEnumNode(NclFileEnumRecord **enumrec,
                 NclQuark name, long long value);

#endif