diff contrib/marc/marc.c @ 1186:98707534e274 draft

added a chan domain. changed some marc stuff. anocheck script for watching for ASN downages.
author epoch <epoch@hacking.allowed.ano>
date Wed, 01 Jun 2016 22:24:29 +0000
parents 97ed67f3a20d
children
line wrap: on
line diff
--- a/contrib/marc/marc.c	Tue Feb 09 03:03:12 2016 +0000
+++ b/contrib/marc/marc.c	Wed Jun 01 22:24:29 2016 +0000
@@ -60,8 +60,14 @@
    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 @@
   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.