aboutsummaryrefslogtreecommitdiff
path: root/noao/twodspec/multispec/dbio/dbio.h
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /noao/twodspec/multispec/dbio/dbio.h
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'noao/twodspec/multispec/dbio/dbio.h')
-rw-r--r--noao/twodspec/multispec/dbio/dbio.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/noao/twodspec/multispec/dbio/dbio.h b/noao/twodspec/multispec/dbio/dbio.h
new file mode 100644
index 00000000..dd9f65f1
--- /dev/null
+++ b/noao/twodspec/multispec/dbio/dbio.h
@@ -0,0 +1,24 @@
+
+# Definitions for subset DBIO
+
+define SZ_DB_KEY 79 # Size of database reference keys
+define MAX_DB_DES 10 # Maximum number of DBIO descriptors
+define DB_ERRCODE 1000 # Start of DBIO error codes
+
+# DBIO descriptor
+
+define LEN_DB_DES 3
+
+define DB_FD Memi[$1] # The database FIO descriptor
+define DB_DIC Memi[$1+1] # Pointer to the dictionary memory
+define DB_UPDATE Memi[$1+2] # Has dictionary been change [y/n]
+
+# DBIO dictionary entry. Each entry is referenced with the pointer to the
+# dictionary memory ($1) and the entry number ($2).
+
+define LEN_DB_ENTRY 43
+
+define DB_KEY Memi[$1+($2-1)*LEN_DB_ENTRY] # Key
+define DB_OFFSET Meml[$1+($2-1)*LEN_DB_ENTRY+40] # File Offset
+define DB_SZ_ELEM Memi[$1+($2-1)*LEN_DB_ENTRY+41] # Element size
+define DB_DIM Memi[$1+($2-1)*LEN_DB_ENTRY+42] # Number of elements