/usr/include/ncarg/ncl/NclFileInterfaces.h is in libncarg-dev 6.3.0-13.
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 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 | #ifndef NclFileInterfaces_h
#define NclFileInterfaces_h
#include "NclList.h"
typedef struct _NclFormatFunctionRecord *NclFormatFunctionRecPtr;
typedef struct _NclFormatFunctionRecord NclFormatFunctionRec;
typedef struct _NclFAttRec NclFAttRec;
typedef struct _NclFGrpRec NclFGrpRec;
typedef struct _NclFVarRec NclFVarRec;
typedef struct _NclFDimRec NclFDimRec;
struct _NclFAttRec {
NclQuark att_name_quark;
NclBasicDataTypes data_type;
ng_size_t num_elements;
};
struct _NclFGrpRec {
NclQuark grp_name_quark;
NclQuark grp_real_name_quark;
NclQuark grp_full_name_quark;
NclBasicDataTypes data_type;
int num_dimensions;
int file_dim_num[NCL_MAX_DIMENSIONS];
};
struct _NclFVarRec {
NclQuark var_name_quark;
NclQuark var_real_name_quark;
NclQuark var_full_name_quark;
NclBasicDataTypes data_type;
int num_dimensions;
/*
ng_size_t dim_sizes[NCL_MAX_DIMENSIONS];
*/
int file_dim_num[NCL_MAX_DIMENSIONS];
int num_compounds;
NclQuark component_name[NCL_MAX_COMPOUND_COMPONETS];
NclBasicDataTypes component_type[NCL_MAX_COMPOUND_COMPONETS];
};
struct _NclFDimRec {
NclQuark dim_name_quark;
ng_size_t dim_size;
int is_unlimited;
};
typedef NclFormatFunctionRecPtr (*NclAddFileFormat) (
#if NhlNeedProto
void
#endif
);
typedef void (*NclFreeFileRecFunc)(
#if NhlNeedProto
void *
#endif
);
/*
* Returns pointer a pointer to a special record used by
* the file format to store private information about the
* file, as well as an enumerated variable indicating the
* supported file type class used to process the file.
*/
typedef enum _NclFileFormat {
_NclCCM = 1,
_NclNETCDF,
_NclHDF,
_NclHDF5,
_NclHDFEOS,
_NclHDFEOS5,
_NclGRIB,
_NclGRIB2,
_NclOGR,
_NclAdvancedOGR,
_NclNewHE5,
_NclNETCDF4,
_NclNewHDF5,
_NclNumberOfFileFormats
} NclFileFormat;
typedef void * (*NclInitializeFileRecFunc)(
#if NhlNeedProto
NclFileFormat *format
#endif
);
/* for historical reasons these also return the private record,
* but they no longer create it
*/
typedef void * (*NclCreateFileFunc)(
#if NhlNeedProto
void *, /* Private record used to identify which file is being accessed */
NclQuark /* Path name of file to be opened */
#endif
);
typedef void * (*NclOpenFileFunc)(
#if NhlNeedProto
void *, /* Private record used to identify which file is being accessed */
NclQuark , /* Path name of file to be opened */
int /* 0 for read/write, 1 for read only */
#endif
);
/*
* Returns a list of variable names for the opened file and the number of
* variables in the file.
*/
typedef NclQuark* (*NclGetVarNamesFunc)(
#if NhlNeedProto
void *, /* Private record used to identify which file is being accessed */
int * /* Returns the number of variables in file */
#endif
);
/*
* Returns a structure containg type, dimension names and dimension sizes
*/
typedef NclFVarRec* (*NclGetVarInfoFunc)(
#if NhlNeedProto
void *, /* Private record used to identify which file is being accessed */
NclQuark /* variable name */
#endif
);
/*
* Returns an array of dimension names
*/
typedef NclQuark* (*NclGetDimNamesFunc)(
#if NhlNeedProto
void *, /* Private record used to identify which file is being accessed */
int * /* Returns the number of dimensions in file */
#endif
);
/*
* Returns information on individual dimension
*/
typedef NclFDimRec *(*NclGetDimInfoFunc)(
#if NhlNeedProto
void *, /* Private record used to identify which file is being accessed */
NclQuark /* name of dimension */
#endif
);
/*
* Returns all atribute names belonging to the file not individual variables
* though
*/
typedef NclQuark* (*NclGetAttNamesFunc)(
#if NhlNeedProto
void *, /* Private record used to identify which file is being accessed */
int * /* number of attributes in return list */
#endif
);
/*
* Returns a record containing the type of the attribute and the number of
* elements
*/
typedef NclFAttRec *(*NclGetAttInfoFunc)(
#if NhlNeedProto
void *,
NclQuark /* name of attribute requested */
#endif
);
/*
* Returns all atribute names belonging to the variable
*/
typedef NclQuark* (*NclGetVarAttNamesFunc)(
#if NhlNeedProto
void *, /* Private record used to identify which file is being accessed */
NclQuark, /* the variable */
int * /* number of attributes in return list */
#endif
);
/*
* Returns information about type and size of attribute
*/
typedef NclFAttRec *(*NclGetVarAttInfoFunc)(
#if NhlNeedProto
void *,
NclQuark, /* Variable name */
NclQuark /* Atribute name */
#endif
);
/*
* Returns information about type and size of coordinate variable
*/
typedef NclFVarRec *(*NclGetCoordInfoFunc)(
#if NhlNeedProto
void *,
NclQuark /* dimension name */
#endif
);
/*
* Reads the data out of a coordinate variable
*/
typedef void *(*NclReadCoordFunc)(
#if NhlNeedProto
void *,
NclQuark, /* Var record of coordinate */
long *, /* Beginning index */
long *, /* dimension sizes of slice (i.e count in each direction) */
long *, /* stride*/
void *
#endif
);
typedef void *(*NclReadNoStrideCoordFunc)(
#if NhlNeedProto
void *,
NclQuark, /* Var record of coordinate */
long *, /* Beginning index */
long *, /* dimension sizes of slice (i.e count in each direction) */
void *
#endif
);
/*
* Reads the data out of a variable
*/
typedef void *(*NclReadVarFunc)(
#if NhlNeedProto
void *,
NclQuark, /* Var record of coordinate */
long*, /* Beginning index */
long*, /* dimension sizes of slice (i.e count in each direction) */
long*,
void *
#endif
);
typedef void *(*NclReadNoStrideVarFunc)(
#if NhlNeedProto
void *,
NclQuark, /* Var record of coordinate */
long*, /* Beginning index */
long*, /* dimension sizes of slice (i.e count in each direction) */
void *
#endif
);
/*
* Read data out of an attribute
*/
typedef void *(*NclReadAttFunc)(
#if NhlNeedProto
void *,
NclQuark, /* Attribute record */
void *
#endif
);
/*
* Read data out of a file attribute
*/
typedef void *(*NclReadVarAttFunc)(
#if NhlNeedProto
void *,
NclQuark, /* var record */
NclQuark, /* Attribute record */
void *
#endif
);
typedef NhlErrorTypes (*NclWriteCoordFunc)(
#if NhlNeedProto
void *,
NclQuark,
void *, /* Pointer to block of data */
long *, /* Beginning index */
long *, /* ending index */
long *
#endif
);
typedef NhlErrorTypes (*NclWriteNoStrideCoordFunc)(
#if NhlNeedProto
void *,
NclQuark,
void *, /* Pointer to block of data */
long *, /* Beginning index */
long * /* ending index */
#endif
);
typedef NhlErrorTypes (*NclWriteVarFunc)(
#if NhlNeedProto
void *,
NclQuark, /* Variable to write to */
void *, /* Pointer to block of data */
long *, /* Beginning index */
long *, /* ending index */
long *
#endif
);
typedef NhlErrorTypes (*NclWriteNoStrideVarFunc)(
#if NhlNeedProto
void *,
NclQuark, /* Variable to write to */
void *, /* Pointer to block of data */
long *, /* Beginning index */
long * /* ending index */
#endif
);
typedef NhlErrorTypes (*NclWriteAttFunc)(
#if NhlNeedProto
void *,
NclQuark, /* the attribute */
void * /* Block of data */
#endif
);
typedef NhlErrorTypes (*NclWriteVarAttFunc)(
#if NhlNeedProto
void *,
NclQuark, /* the att quark */
NclQuark, /* the var quark */
void * /* Block of data */
#endif
);
typedef NhlErrorTypes (*NclRenameDimFunc) (
#if NhlNeedProto
void *,
NclQuark /* from */,
NclQuark /* to */
#endif
);
typedef NhlErrorTypes (*NclAddDimFunc) (
#if NhlNeedProto
void *,
NclQuark,
ng_size_t,
int
#endif
);
typedef NhlErrorTypes (*NclAddChunkDimFunc) (
#if NhlNeedProto
void *,
NclQuark,
ng_size_t,
int
#endif
);
typedef NhlErrorTypes (*NclAddGrpFunc)(void *record, NclQuark grpname);
typedef NhlErrorTypes (*NclAddVlenFunc)(void *record, NclQuark vlen_name, NclQuark var_name,
NclQuark type, NclQuark *dim_names, ng_size_t n_dims);
typedef NhlErrorTypes (*NclAddEnumFunc)(void *record, NclQuark enum_name, NclQuark var_name,
NclQuark dim_name, NclQuark *mem_name, void *mem_value,
ng_size_t n_mems, NclBasicDataTypes val_type);
typedef NhlErrorTypes (*NclAddOpaqueFunc)(void *record, NclQuark opaque_name, NclQuark var_name,
int var_size, NclQuark dim_name);
typedef NhlErrorTypes (*NclAddCompoundFunc)(void *record, NclQuark compound_name, NclQuark var_name,
ng_size_t n_dims, NclQuark *dim_name, ng_size_t n_mems,
NclQuark *mem_name, NclQuark *mem_type, int *mem_size);
typedef NhlErrorTypes (*NclWriteCompoundFunc)(void *record, NclQuark compound_name, NclQuark var_name,
ng_size_t n_mems, NclQuark *mem_name, NclList thelist);
typedef NhlErrorTypes (*NclAddVarCoordFunc) (
#if NhlNeedProto
void*, /* record */
NclQuark, /*var_name */
NclBasicDataTypes /*data_type*/
#endif
);
typedef NhlErrorTypes (*NclAddVarFunc) (
#if NhlNeedProto
void*, /* record */
NclQuark, /*var_name */
NclBasicDataTypes, /* data_type */
int, /* n_dims */
NclQuark *, /* dim_names */
ng_size_t * /* dim_sizes */
#endif
);
typedef NhlErrorTypes (*NclAddVarChunkFunc) (
#if NhlNeedProto
void*, /* record */
NclQuark, /*var_name */
int, /* n_dims */
ng_size_t * /* dims */
#endif
);
typedef NhlErrorTypes (*NclAddVarChunkCacheFunc) (
#if NhlNeedProto
void *, /* record */
NclQuark, /* var_name */
ng_size_t, /* cache_size */
ng_size_t, /* cache_nelems */
float /* cache_preemption */
#endif
);
typedef NhlErrorTypes (*NclSetVarCompressLevelFunc) (
#if NhlNeedProto
void*, /* record */
NclQuark, /*var_name */
int /* compress-level */
#endif
);
typedef NhlErrorTypes (*NclDelVarAttFunc) (
#if NhlNeedProto
void * /*therec*/,
NclQuark /*thevar*/,
NclQuark /*theatt*/
#endif
);
typedef NhlErrorTypes (*NclAddVarAttFunc) (
#if NhlNeedProto
void * /*therec*/,
NclQuark /*thevar*/,
NclQuark /*theatt*/,
NclBasicDataTypes /*data_type*/,
int /*n_items*/,
void * /*values*/
#endif
);
typedef NhlErrorTypes (*NclDelAttFunc) (
#if NhlNeedProto
void * /*therec*/,
NclQuark /*theatt*/
#endif
);
typedef NhlErrorTypes (*NclAddAttFunc) (
#if NhlNeedProto
void * /*therec*/,
NclQuark /*theatt*/,
NclBasicDataTypes /*data_type*/,
int /*n_items*/,
void * /*values*/
#endif
);
typedef NclBasicDataTypes (*NclMapFormatTypeToNcl)(
#if NhlNeedProto
void *
#endif
);
typedef void* (*NclMapNclTypeToFormat)(
#if NhlNeedProto
NclBasicDataTypes
#endif
);
typedef NhlErrorTypes (*NclSetOptionFunc) (
#if NhlNeedProto
void * /*therec*/,
NclQuark /*option*/,
NclBasicDataTypes /*data_type*/,
int /*n_items*/,
void * /*values*/
#endif
);
/*
* Returns an array of string containg the group names.
*/
typedef NclQuark* (*NclGetGrpNamesFunc)(
#if NhlNeedProto
void *, /* Private record used to identify which file is being accessed */
int * /* number of total groups. */
#endif
);
/*
* Returns a structure containg type, dimension names and dimension sizes
*/
typedef NclFGrpRec* (*NclGetGrpInfoFunc)(
#if NhlNeedProto
void *, /* Private record used to identify which file is being accessed */
NclQuark /* group name */
#endif
);
/*
* Returns all atribute names belonging to the group.
*/
typedef NclQuark* (*NclGetGrpAttNamesFunc)(
#if NhlNeedProto
void *, /* Private record used to identify which file is being accessed */
NclQuark, /* the group */
int * /* number of attributes in return list */
#endif
);
/*
* Returns a record containing the type of the attribute and the number of
* elements
*/
typedef NclFAttRec *(*NclGetGrpAttInfoFunc)(
#if NhlNeedProto
void *,
NclQuark, /* Group name */
NclQuark /* Atribute name */
#endif
);
struct _NclFormatFunctionRecord {
NclInitializeFileRecFunc initialize_file_rec;
NclCreateFileFunc create_file;
NclOpenFileFunc open_file;
NclFreeFileRecFunc free_file_rec;
NclGetVarNamesFunc get_var_names;
NclGetVarInfoFunc get_var_info;
NclGetDimNamesFunc get_dim_names;
NclGetDimInfoFunc get_dim_info;
NclGetAttNamesFunc get_att_names;
NclGetAttInfoFunc get_att_info;
NclGetVarAttNamesFunc get_var_att_names;
NclGetVarAttInfoFunc get_var_att_info;
NclGetCoordInfoFunc get_coord_info;
NclReadCoordFunc read_coord;
NclReadNoStrideCoordFunc read_coord_ns;
NclReadVarFunc read_var;
NclReadNoStrideVarFunc read_var_ns;
NclReadAttFunc read_att;
NclReadVarAttFunc read_var_att;
NclWriteCoordFunc write_coord;
NclWriteNoStrideCoordFunc write_coord_ns;
NclWriteVarFunc write_var;
NclWriteNoStrideVarFunc write_var_ns;
NclWriteAttFunc write_att;
NclWriteVarAttFunc write_var_att;
NclAddDimFunc add_dim;
NclAddChunkDimFunc add_chunk_dim;
NclRenameDimFunc rename_dim;
NclAddVarFunc add_var;
NclAddVarChunkFunc add_var_chunk;
NclAddVarChunkCacheFunc add_var_chunk_cache;
NclSetVarCompressLevelFunc set_var_compress_level;
NclAddVarCoordFunc add_coord_var;
NclAddAttFunc add_att;
NclAddVarAttFunc add_var_att;
NclMapFormatTypeToNcl map_format_type_to_ncl;
NclMapNclTypeToFormat map_ncl_type_to_format;
NclDelAttFunc del_att;
NclDelVarAttFunc del_var_att;
NclGetGrpNamesFunc get_grp_names;
NclGetGrpInfoFunc get_grp_info;
NclGetGrpAttNamesFunc get_grp_att_names;
NclGetGrpAttInfoFunc get_grp_att_info;
NclAddGrpFunc add_grp;
NclAddVlenFunc add_vlen;
NclAddEnumFunc add_enum;
NclAddOpaqueFunc add_opaque;
NclAddCompoundFunc add_compound;
NclWriteCompoundFunc write_compound;
NclSetOptionFunc set_option;
};
extern void _NclRegisterFormat(
#if NhlNeedProto
NclAddFileFormat /* add_format */,
char* /* file_extension */
#endif
);
extern NclFormatFunctionRecPtr _NclGetFormatFuncs(
#if NhlNeedProto
NclQuark /* file_extension */
#endif
);
logical _NclFormatEqual(
#if NhlNeedProto
NclQuark file_ext1,
NclQuark file_ext2
#endif
);
int _NclGribVersion(
#if NhlNeedProto
NclQuark path
#endif
);
extern NclFormatFunctionRecPtr _NclGetFormatFuncsWithAdvancedFileStructure
(NclQuark file_extension);
#endif
|