int dirent (buffer, offset, doffset, bytcount, numsamps, sampsiz)
ADB *buffer ;
unsigned short offset, *doffset, *bytcount, *numelts, *eltsiz ;
Locates the directory entry located offset bytes from the beginning of the ADB and returns the directory entry information.
buffer
ADB
offset
offset to directory entry
doffset
offset to data_set
bytcount
number of bytes stored in data_set
numsamps
max no. of samples which may be stored
sampsiz
size of one data sample
All the information in the directory is returned:
doffset
the offset to the data_set
bytcount
the number of bytes currently stored in the data_set
numsamps
the maximum number of samples which may be stored in the data_set
sampsiz
the size of one sample
BOOL dirent (buffer, offset, doffset, bytcount, numelts, eltsiz) get the directory entry - dir_ent = buffer[offset/2] doffset = data_offset field of dir_ent bytcount = byte_count field of dir_ent numelts = num_of_elements field of dir_ent eltsiz = element_size field of dir_ent
/* FILE: DIRENT.C */ #include #include "air.h" BOOLE dirent (buffer, offset, doffset, bytcount, numelts, eltsiz) ADB *buffer ; unsigned short offset ; /* offset to directory entry */ unsigned short *doffset ; /* offset to data set */ unsigned short *bytcount ; /* number of bytes stored in data set */ unsigned short *numelts ; /* max no. of elements which may be stored */ unsigned short *eltsiz ; /* size of one data element */ { DIR_ENTRY *entry ; entry = (DIR_ENTRY *)&buffer[offset/2] ; *doffset = entry->data_offset ; *bytcount = entry->byte_count ; *numelts = entry->num_of_elements ; *eltsiz = entry->element_size ; }