summaryrefslogtreecommitdiff
path: root/contrib/marc
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/marc')
-rw-r--r--contrib/marc/README1
-rw-r--r--contrib/marc/marc.c8
-rw-r--r--contrib/marc/marc.db (renamed from contrib/marc/marcdb)bin1806749 -> 1840750 bytes
-rwxr-xr-xcontrib/marc/pull.sh1
4 files changed, 10 insertions, 0 deletions
diff --git a/contrib/marc/README b/contrib/marc/README
new file mode 100644
index 0000000..e77f12b
--- /dev/null
+++ b/contrib/marc/README
@@ -0,0 +1 @@
+make marc
diff --git a/contrib/marc/marc.c b/contrib/marc/marc.c
index a83eb9b..d46b576 100644
--- a/contrib/marc/marc.c
+++ b/contrib/marc/marc.c
@@ -60,8 +60,14 @@ int marc_decode(unsigned char *data,int from_index,int length) {
printf("list:\n");
indent++;
while(from_index < length) {
+
+// old code. testing 16 bit lengths.
cur_len=data[from_index+3]+(data[from_index+2]<<1)+(data[from_index+1]<<2)+(data[from_index+0]<<3);
from_index+=4;
+
+// cur_len=data[from_index+1]+(data[from_index+0]<<1);
+// from_index+=2;
+
marc_decode(data,from_index,cur_len);
from_index+=cur_len;
}
@@ -153,6 +159,8 @@ void update_message_decode(unsigned char *data,int from_index,int length) {
for(i=0;i<num_extensions;i++) {
ext_type=data[from_index];
from_index++;
+// is this right?
+// ext_data_len=(data[from_index+1]) + (data[from_index+0]<<8);
ext_data_len=(data[from_index]<<8) + (data[from_index+1]);
from_index+=2;
from_index+=ext_data_len;//skip this for now... fuck it.
diff --git a/contrib/marc/marcdb b/contrib/marc/marc.db
index 2a2c63a..890d0a4 100644
--- a/contrib/marc/marcdb
+++ b/contrib/marc/marc.db
Binary files differ
diff --git a/contrib/marc/pull.sh b/contrib/marc/pull.sh
new file mode 100755
index 0000000..4193e21
--- /dev/null
+++ b/contrib/marc/pull.sh
@@ -0,0 +1 @@
+wget 'http://marc.ucis.ano/?get=0&version=3' -O marc.db