HDF: hdf/src/hfile_priv.h File Reference

Please, help us to better serve our user community by answering the following short survey: https://www.hdfgroup.org/website-survey/

| HDF 4.4.0 API Reference |

Loading...
Searching...
No Matches
hfile_priv.h File Reference
`#include "hdf_priv.h"`
`#include "hfile.h"`
`#include "tbbt_priv.h"`
`#include "bitvect_priv.h"`
`#include "atom_priv.h"`
`#include "dynarray_priv.h"`
`#include <stdio.h>`
`#include "hchunks_priv.h"`

## Data Structures
struct | dd_t
struct | version_t
struct | ddblock_t
struct | tag_info
struct | filerec_t
struct | accrec_t
struct | sp_info_block_t
struct | funclist_t
struct | functab_t

## Macros
#define | MAGICLEN 4
#define | HDFMAGIC "\016\003\023\001"
#define | DD_SZ 12
#define | NDDS_SZ 2
#define | OFFSET_SZ 4
#define | INVALID_OFFSET -1
#define | INVALID_LENGTH -1
#define | HI_OPEN(p, a)
#define | HI_CREATE(p)
#define | HI_READ(f, b, n)
#define | HI_WRITE(f, b, n)
#define | HI_CLOSE(f)
#define | HI_FLUSH(f)
#define | HI_SEEK(f, o)
#define | HI_SEEK_CUR(f, o)
#define | HI_SEEKEND(f)
#define | HI_TELL(f)
#define | OPENERR(f)
#define | DDLIST_DIRTY 0x01
#define | FILE_END_DIRTY 0x02
#define | FIDTYPE 1
#define | AIDTYPE 2
#define | GROUPTYPE 3
#define | SDSTYPE 4
#define | DIMTYPE 5
#define | CDFTYPE 6
#define | VGIDTYPE 8
#define | VSIDTYPE 9
#define | BITTYPE 10
#define | GRIDTYPE 11
#define | RIIDTYPE 12
#define | BADFREC(r)
#define | BASETAG(t)
#define | SPECIALTAG(t)
#define | MKSPECIALTAG(t)

## Typedefs
typedef FILE * | hdf_file_t

## Enumerations
enum | fileop_t { H4_OP_UNKNOWN = 0 , H4_OP_SEEK , H4_OP_WRITE , H4_OP_READ }

## Functions
int | hi_close_stdio (FILE **f)
accrec_t * | HIget_access_rec (void)
void | HIrelease_accrec_node (accrec_t *acc)
void * | HIgetspinfo (accrec_t *access_rec)
int | HPcompare_filerec_path (const void *obj, const void *key)
int | HPcompare_accrec_tagref (const void *rec1, const void *rec2)
int32 | HPgetdiskblock (filerec_t *file_rec, int32 block_size, int moveto)
int | HPfreediskblock (filerec_t *file_rec, int32 block_offset, int32 block_size)
int | HPisfile_in_use (const char *path)
int32 | HDcheck_empty (int32 file_id, uint16 tag, uint16 ref, int *emptySDS)
int32 | HDget_special_info (int32 access_id, sp_info_block_t *info_block)
int32 | HDset_special_info (int32 access_id, sp_info_block_t *info_block)
int | HP_read (filerec_t *file_rec, void *buf, int32 bytes)
int | HPseek (filerec_t *file_rec, int32 offset)
int | HP_write (filerec_t *file_rec, const void *buf, int32 bytes)
int32 | HPread_drec (int32 file_id, atom_t data_id, uint8 **drec_buf)
int | tagcompare (void *k1, void *k2, int cmparg)
void | tagdestroynode (void *n)
int32 | HLPstread (accrec_t *access_rec)
int32 | HLPstwrite (accrec_t *access_rec)
int32 | HLPseek (accrec_t *access_rec, int32 offset, int origin)
int32 | HLPread (accrec_t *access_rec, int32 length, void *data)
int32 | HLPwrite (accrec_t *access_rec, int32 length, const void *data)
int32 | HLPinquire (accrec_t *access_rec, int32 *pfile_id, uint16 *ptag, uint16 *pref, int32 *plength, int32 *poffset, int32 *pposn, int16 *paccess, int16 *pspecial)
int | HLPendaccess (accrec_t *access_rec)
int32 | HLPcloseAID (accrec_t *access_rec)
int32 | HLPinfo (accrec_t *access_rec, sp_info_block_t *info_block)
int32 | HXPstread (accrec_t *rec)
int32 | HXPstwrite (accrec_t *rec)
int32 | HXPseek (accrec_t *access_rec, int32 offset, int origin)
int32 | HXPread (accrec_t *access_rec, int32 length, void *data)
int32 | HXPwrite (accrec_t *access_rec, int32 length, const void *data)
int32 | HXPinquire (accrec_t *access_rec, int32 *pfile_id, uint16 *ptag, uint16 *pref, int32 *plength, int32 *poffset, int32 *pposn, int16 *paccess, int16 *pspecial)
int | HXPendaccess (accrec_t *access_rec)
int32 | HXPcloseAID (accrec_t *access_rec)
int32 | HXPinfo (accrec_t *access_rec, sp_info_block_t *info_block)
int32 | HXPreset (accrec_t *access_rec, sp_info_block_t *info_block)
int | HXPsetaccesstype (accrec_t *access_rec)
int | HXPshutdown (void)
int32 | HCPstread (accrec_t *rec)
int32 | HCPstwrite (accrec_t *rec)
int32 | HCPseek (accrec_t *access_rec, int32 offset, int origin)
int32 | HCPinquire (accrec_t *access_rec, int32 *pfile_id, uint16 *ptag, uint16 *pref, int32 *plength, int32 *poffset, int32 *pposn, int16 *paccess, int16 *pspecial)
int32 | HCPread (accrec_t *access_rec, int32 length, void *data)
int32 | HCPwrite (accrec_t *access_rec, int32 length, const void *data)
int | HCPendaccess (accrec_t *access_rec)
int32 | HCPcloseAID (accrec_t *access_rec)
int32 | HCPinfo (accrec_t *access_rec, sp_info_block_t *info_block)
int32 | get_comp_len (accrec_t *access_rec)
int32 | HBPstread (accrec_t *rec)
int32 | HBPstwrite (accrec_t *rec)
int32 | HBPseek (accrec_t *access_rec, int32 offset, int origin)
int32 | HBPinquire (accrec_t *access_rec, int32 *pfile_id, uint16 *ptag, uint16 *pref, int32 *plength, int32 *poffset, int32 *pposn, int16 *paccess, int16 *pspecial)
int32 | HBPread (accrec_t *access_rec, int32 length, void *data)
int32 | HBPwrite (accrec_t *access_rec, int32 length, const void *data)
int | HBPendaccess (accrec_t *access_rec)
int32 | HBPcloseAID (accrec_t *access_rec)
int32 | HBPinfo (accrec_t *access_rec, sp_info_block_t *info_block)
int32 | HRPstread (accrec_t *rec)
int32 | HRPstwrite (accrec_t *rec)
int32 | HRPseek (accrec_t *access_rec, int32 offset, int origin)
int32 | HRPinquire (accrec_t *access_rec, int32 *pfile_id, uint16 *ptag, uint16 *pref, int32 *plength, int32 *poffset, int32 *pposn, int16 *paccess, int16 *pspecial)
int32 | HRPread (accrec_t *access_rec, int32 length, void *data)
int32 | HRPwrite (accrec_t *access_rec, int32 length, const void *data)
int | HRPendaccess (accrec_t *access_rec)
int32 | HRPcloseAID (accrec_t *access_rec)
int32 | HRPinfo (accrec_t *access_rec, sp_info_block_t *info_block)
int | HTPstart (filerec_t *file_rec)
int | HTPinit (filerec_t *file_rec, int16 ndds)
int | HTPsync (filerec_t *file_rec)
int | HTPend (filerec_t *file_rec)
atom_t | HTPcreate (filerec_t *file_rec, uint16 tag, uint16 ref)
atom_t | HTPselect (filerec_t *file_rec, uint16 tag, uint16 ref)
int | HTPendaccess (atom_t ddid)
int | HTPdelete (atom_t ddid)
int | HTPupdate (atom_t ddid, int32 new_off, int32 new_len)
int | HTPinquire (atom_t ddid, uint16 *tag, uint16 *ref, int32 *off, int32 *len)
int | HTPis_special (atom_t ddid)
int | HTPdump_dds (int32 file_id, FILE *fout)

## Macro Definition Documentation

## ◆ AIDTYPE

#define AIDTYPE 2

## ◆ BADFREC

#define BADFREC | ( |  | r | ) |

Value:
((r) == NULL || (r)->refcount == 0)

## ◆ BASETAG

#define BASETAG | ( |  | t | ) |

Value:
(uint16)((~(t) & 0x8000) ? ((t) & ~0x4000) : (t))
uint16
uint16_t uint16
Definition hdf.h:55

## ◆ BITTYPE

#define BITTYPE 10

## ◆ CDFTYPE

#define CDFTYPE 6

## ◆ DD_SZ

#define DD_SZ 12

## ◆ DDLIST_DIRTY

#define DDLIST_DIRTY 0x01

## ◆ DIMTYPE

#define DIMTYPE 5

## ◆ FIDTYPE

#define FIDTYPE 1

## ◆ FILE_END_DIRTY

#define FILE_END_DIRTY 0x02

## ◆ GRIDTYPE

#define GRIDTYPE 11

## ◆ GROUPTYPE

#define GROUPTYPE 3

## ◆ HDFMAGIC

#define HDFMAGIC "\016\003\023\001"

## ◆ HI_CLOSE

#define HI_CLOSE | ( |  | f | ) |

Value:
hi_close_stdio(&f)
hi_close_stdio
int hi_close_stdio(FILE **f)
f
HDFFCLIBAPI intf _fcd _fcd _fcd f
Definition mfsdf.h:98

## ◆ HI_CREATE

#define HI_CREATE | ( |  | p | ) |

Value:
(fopen((p), "wb+"))

## ◆ HI_FLUSH

#define HI_FLUSH | ( |  | f | ) |

Value:
(fflush(f) == 0 ? SUCCEED : FAIL)
SUCCEED
#define SUCCEED
Definition hdf.h:140
FAIL
#define FAIL
Definition hdf.h:141

## ◆ HI_OPEN

#define HI_OPEN | ( |  | p,
|  |  | a )

Value:
(((a) & DFACC_WRITE) ? fopen((p), "rb+") : fopen((p), "rb"))
DFACC_WRITE
#define DFACC_WRITE
Definition hdf.h:92

## ◆ HI_READ

#define HI_READ | ( |  | f,
|  |  | b,
|  |  | n )

Value:
(((size_t)(n) == (size_t)fread((b), 1, (size_t)(n), (f))) ? SUCCEED : FAIL)
n
intf _fcd _fcd intf * n
Definition hproto_fortran.h:1056

## ◆ HI_SEEK

#define HI_SEEK | ( |  | f,
|  |  | o )

Value:
(fseek((f), (long)(o), SEEK_SET) == 0 ? SUCCEED : FAIL)

## ◆ HI_SEEK_CUR

#define HI_SEEK_CUR | ( |  | f,
|  |  | o )

Value:
(fseek((f), (long)(o), SEEK_CUR) == 0 ? SUCCEED : FAIL)

## ◆ HI_SEEKEND

#define HI_SEEKEND | ( |  | f | ) |

Value:
(fseek((f), (long)0, SEEK_END) == 0 ? SUCCEED : FAIL)

## ◆ HI_TELL

#define HI_TELL | ( |  | f | ) |

Value:
(ftell(f))

## ◆ HI_WRITE

#define HI_WRITE | ( |  | f,
|  |  | b,
|  |  | n )

Value:
(((size_t)(n) == (size_t)fwrite((b), 1, (size_t)(n), (f))) ? SUCCEED : FAIL)

## ◆ INVALID_LENGTH

#define INVALID_LENGTH -1

## ◆ INVALID_OFFSET

#define INVALID_OFFSET -1

## ◆ MAGICLEN

#define MAGICLEN 4

## ◆ MKSPECIALTAG

#define MKSPECIALTAG | ( |  | t | ) |

Value:
(uint16)((~(t) & 0x8000) ? ((t) | 0x4000) : DFTAG_NULL)
DFTAG_NULL
#define DFTAG_NULL
Definition htags.h:30

## ◆ NDDS_SZ

#define NDDS_SZ 2

## ◆ OFFSET_SZ

#define OFFSET_SZ 4

## ◆ OPENERR

#define OPENERR | ( |  | f | ) |

Value:
((f) == (FILE *)NULL)

## ◆ RIIDTYPE

#define RIIDTYPE 12

## ◆ SDSTYPE

#define SDSTYPE 4

## ◆ SPECIALTAG

#define SPECIALTAG | ( |  | t | ) |

Value:
(uint16)((~(t) & 0x8000) && ((t) & 0x4000))

## ◆ VGIDTYPE

#define VGIDTYPE 8

## ◆ VSIDTYPE

#define VSIDTYPE 9

## Typedef Documentation

## ◆ hdf_file_t

typedef FILE* hdf_file_t

## Enumeration Type Documentation

## ◆ fileop_t

enum fileop_t

Enumerator
H4_OP_UNKNOWN |
H4_OP_SEEK |
H4_OP_WRITE |
H4_OP_READ |

## Function Documentation

## ◆ get_comp_len()

int32 get_comp_len | ( | accrec_t * | access_rec | ) |
| extern

## ◆ HBPcloseAID()

int32 HBPcloseAID | ( | accrec_t * | access_rec | ) |
| extern

## ◆ HBPendaccess()

int HBPendaccess | ( | accrec_t * | access_rec | ) |
| extern

## ◆ HBPinfo()

int32 HBPinfo | ( | accrec_t * | access_rec,
|  | sp_info_block_t * | info_block )
| extern

## ◆ HBPinquire()

int32 HBPinquire | ( | accrec_t * | access_rec,
|  | int32 * | pfile_id,
|  | uint16 * | ptag,
|  | uint16 * | pref,
|  | int32 * | plength,
|  | int32 * | poffset,
|  | int32 * | pposn,
|  | int16 * | paccess,
|  | int16 * | pspecial )
| extern

## ◆ HBPread()

int32 HBPread | ( | accrec_t * | access_rec,
|  | int32 | length,
|  | void * | data )
| extern

## ◆ HBPseek()

int32 HBPseek | ( | accrec_t * | access_rec,
|  | int32 | offset,
|  | int | origin )
| extern

## ◆ HBPstread()

int32 HBPstread | ( | accrec_t * | rec | ) |
| extern

## ◆ HBPstwrite()

int32 HBPstwrite | ( | accrec_t * | rec | ) |
| extern

## ◆ HBPwrite()

int32 HBPwrite | ( | accrec_t * | access_rec,
|  | int32 | length,
|  | const void * | data )
| extern

## ◆ HCPcloseAID()

int32 HCPcloseAID | ( | accrec_t * | access_rec | ) |
| extern

## ◆ HCPendaccess()

int HCPendaccess | ( | accrec_t * | access_rec | ) |
| extern

## ◆ HCPinfo()

int32 HCPinfo | ( | accrec_t * | access_rec,
|  | sp_info_block_t * | info_block )
| extern

## ◆ HCPinquire()

int32 HCPinquire | ( | accrec_t * | access_rec,
|  | int32 * | pfile_id,
|  | uint16 * | ptag,
|  | uint16 * | pref,
|  | int32 * | plength,
|  | int32 * | poffset,
|  | int32 * | pposn,
|  | int16 * | paccess,
|  | int16 * | pspecial )
| extern

## ◆ HCPread()

int32 HCPread | ( | accrec_t * | access_rec,
|  | int32 | length,
|  | void * | data )
| extern

## ◆ HCPseek()

int32 HCPseek | ( | accrec_t * | access_rec,
|  | int32 | offset,
|  | int | origin )
| extern

## ◆ HCPstread()

int32 HCPstread | ( | accrec_t * | rec | ) |
| extern

## ◆ HCPstwrite()

int32 HCPstwrite | ( | accrec_t * | rec | ) |
| extern

## ◆ HCPwrite()

int32 HCPwrite | ( | accrec_t * | access_rec,
|  | int32 | length,
|  | const void * | data )
| extern

## ◆ HDcheck_empty()

int32 HDcheck_empty | ( | int32 | file_id,
|  | uint16 | tag,
|  | uint16 | ref,
|  | int * | emptySDS )
| extern

## ◆ HDget_special_info()

int32 HDget_special_info | ( | int32 | access_id,
|  | sp_info_block_t * | info_block )
| extern

## ◆ HDset_special_info()

int32 HDset_special_info | ( | int32 | access_id,
|  | sp_info_block_t * | info_block )
| extern

## ◆ hi_close_stdio()

int hi_close_stdio | ( | FILE ** | f | ) |
| extern

## ◆ HIget_access_rec()

accrec_t * HIget_access_rec | ( | void |  | ) |
| extern

## ◆ HIgetspinfo()

void * HIgetspinfo | ( | accrec_t * | access_rec | ) |
| extern

## ◆ HIrelease_accrec_node()

void HIrelease_accrec_node | ( | accrec_t * | acc | ) |
| extern

## ◆ HLPcloseAID()

int32 HLPcloseAID | ( | accrec_t * | access_rec | ) |
| extern

## ◆ HLPendaccess()

int HLPendaccess | ( | accrec_t * | access_rec | ) |
| extern

## ◆ HLPinfo()

int32 HLPinfo | ( | accrec_t * | access_rec,
|  | sp_info_block_t * | info_block )
| extern

## ◆ HLPinquire()

int32 HLPinquire | ( | accrec_t * | access_rec,
|  | int32 * | pfile_id,
|  | uint16 * | ptag,
|  | uint16 * | pref,
|  | int32 * | plength,
|  | int32 * | poffset,
|  | int32 * | pposn,
|  | int16 * | paccess,
|  | int16 * | pspecial )
| extern

## ◆ HLPread()

int32 HLPread | ( | accrec_t * | access_rec,
|  | int32 | length,
|  | void * | data )
| extern

## ◆ HLPseek()

int32 HLPseek | ( | accrec_t * | access_rec,
|  | int32 | offset,
|  | int | origin )
| extern

## ◆ HLPstread()

int32 HLPstread | ( | accrec_t * | access_rec | ) |
| extern

## ◆ HLPstwrite()

int32 HLPstwrite | ( | accrec_t * | access_rec | ) |
| extern

## ◆ HLPwrite()

int32 HLPwrite | ( | accrec_t * | access_rec,
|  | int32 | length,
|  | const void * | data )
| extern

## ◆ HP_read()

int HP_read | ( | filerec_t * | file_rec,
|  | void * | buf,
|  | int32 | bytes )
| extern

## ◆ HP_write()

int HP_write | ( | filerec_t * | file_rec,
|  | const void * | buf,
|  | int32 | bytes )
| extern

## ◆ HPcompare_accrec_tagref()

int HPcompare_accrec_tagref | ( | const void * | rec1,
|  | const void * | rec2 )
| extern

## ◆ HPcompare_filerec_path()

int HPcompare_filerec_path | ( | const void * | obj,
|  | const void * | key )
| extern

## ◆ HPfreediskblock()

int HPfreediskblock | ( | filerec_t * | file_rec,
|  | int32 | block_offset,
|  | int32 | block_size )
| extern

## ◆ HPgetdiskblock()

int32 HPgetdiskblock | ( | filerec_t * | file_rec,
|  | int32 | block_size,
|  | int | moveto )
| extern

## ◆ HPisfile_in_use()

int HPisfile_in_use | ( | const char * | path | ) |
| extern

## ◆ HPread_drec()

int32 HPread_drec | ( | int32 | file_id,
|  | atom_t | data_id,
|  | uint8 ** | drec_buf )
| extern

## ◆ HPseek()

int HPseek | ( | filerec_t * | file_rec,
|  | int32 | offset )
| extern

## ◆ HRPcloseAID()

int32 HRPcloseAID | ( | accrec_t * | access_rec | ) |
| extern

## ◆ HRPendaccess()

int HRPendaccess | ( | accrec_t * | access_rec | ) |
| extern

## ◆ HRPinfo()

int32 HRPinfo | ( | accrec_t * | access_rec,
|  | sp_info_block_t * | info_block )
| extern

## ◆ HRPinquire()

int32 HRPinquire | ( | accrec_t * | access_rec,
|  | int32 * | pfile_id,
|  | uint16 * | ptag,
|  | uint16 * | pref,
|  | int32 * | plength,
|  | int32 * | poffset,
|  | int32 * | pposn,
|  | int16 * | paccess,
|  | int16 * | pspecial )
| extern

## ◆ HRPread()

int32 HRPread | ( | accrec_t * | access_rec,
|  | int32 | length,
|  | void * | data )
| extern

## ◆ HRPseek()

int32 HRPseek | ( | accrec_t * | access_rec,
|  | int32 | offset,
|  | int | origin )
| extern

## ◆ HRPstread()

int32 HRPstread | ( | accrec_t * | rec | ) |
| extern

## ◆ HRPstwrite()

int32 HRPstwrite | ( | accrec_t * | rec | ) |
| extern

## ◆ HRPwrite()

int32 HRPwrite | ( | accrec_t * | access_rec,
|  | int32 | length,
|  | const void * | data )
| extern

## ◆ HTPcreate()

atom_t HTPcreate | ( | filerec_t * | file_rec,
|  | uint16 | tag,
|  | uint16 | ref )

## ◆ HTPdelete()

int HTPdelete | ( | atom_t | ddid | ) |

## ◆ HTPdump_dds()

int HTPdump_dds | ( | int32 | file_id,
|  | FILE * | fout )

## ◆ HTPend()

int HTPend | ( | filerec_t * | file_rec | ) |

## ◆ HTPendaccess()

int HTPendaccess | ( | atom_t | ddid | ) |

## ◆ HTPinit()

int HTPinit | ( | filerec_t * | file_rec,
|  | int16 | ndds )

## ◆ HTPinquire()

int HTPinquire | ( | atom_t | ddid,
|  | uint16 * | tag,
|  | uint16 * | ref,
|  | int32 * | off,
|  | int32 * | len )

## ◆ HTPis_special()

int HTPis_special | ( | atom_t | ddid | ) |

## ◆ HTPselect()

atom_t HTPselect | ( | filerec_t * | file_rec,
|  | uint16 | tag,
|  | uint16 | ref )

## ◆ HTPstart()

int HTPstart | ( | filerec_t * | file_rec | ) |

## ◆ HTPsync()

int HTPsync | ( | filerec_t * | file_rec | ) |

## ◆ HTPupdate()

int HTPupdate | ( | atom_t | ddid,
|  | int32 | new_off,
|  | int32 | new_len )

## ◆ HXPcloseAID()

int32 HXPcloseAID | ( | accrec_t * | access_rec | ) |
| extern

## ◆ HXPendaccess()

int HXPendaccess | ( | accrec_t * | access_rec | ) |
| extern

## ◆ HXPinfo()

int32 HXPinfo | ( | accrec_t * | access_rec,
|  | sp_info_block_t * | info_block )
| extern

## ◆ HXPinquire()

int32 HXPinquire | ( | accrec_t * | access_rec,
|  | int32 * | pfile_id,
|  | uint16 * | ptag,
|  | uint16 * | pref,
|  | int32 * | plength,
|  | int32 * | poffset,
|  | int32 * | pposn,
|  | int16 * | paccess,
|  | int16 * | pspecial )
| extern

## ◆ HXPread()

int32 HXPread | ( | accrec_t * | access_rec,
|  | int32 | length,
|  | void * | data )
| extern

## ◆ HXPreset()

int32 HXPreset | ( | accrec_t * | access_rec,
|  | sp_info_block_t * | info_block )
| extern

## ◆ HXPseek()

int32 HXPseek | ( | accrec_t * | access_rec,
|  | int32 | offset,
|  | int | origin )
| extern

## ◆ HXPsetaccesstype()

int HXPsetaccesstype | ( | accrec_t * | access_rec | ) |
| extern

## ◆ HXPshutdown()

int HXPshutdown | ( | void |  | ) |
| extern

## ◆ HXPstread()

int32 HXPstread | ( | accrec_t * | rec | ) |
| extern

## ◆ HXPstwrite()

int32 HXPstwrite | ( | accrec_t * | rec | ) |
| extern

## ◆ HXPwrite()

int32 HXPwrite | ( | accrec_t * | access_rec,
|  | int32 | length,
|  | const void * | data )
| extern

## ◆ tagcompare()

int tagcompare | ( | void * | k1,
|  | void * | k2,
|  | int | cmparg )
| extern

## ◆ tagdestroynode()

void tagdestroynode | ( | void * | n | ) |
| extern