Add assertions for beginning of file.
authorBen Pfaff <blp@cs.stanford.edu>
Mon, 3 Nov 2014 01:12:08 +0000 (17:12 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 3 Nov 2014 01:12:08 +0000 (17:12 -0800)
dump.c
notes

diff --git a/dump.c b/dump.c
index 9c539338979508fc2595a1f2efe42f5d28869054..4b274808558d52d2a8435f86051de6e6c4980e87 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -1727,7 +1727,21 @@ main(int argc, char *argv[])
         }
       else if (!strcmp(argv[1], "dimensions") || !strcmp(argv[1], "all"))
         {
-          pos = 0x27;
+          pos = 0;
+          match_byte_assert(1);
+          match_byte_assert(0);
+          match_u32_assert(3);
+          match_byte_assert(1);
+          if (!match_byte(0))
+            match_byte_assert(1);
+          match_byte_assert(0);
+          match_byte_assert(0);
+          if (!match_byte(0))
+            match_byte_assert(1);
+          pos++;
+          match_byte_assert(0);
+          match_byte_assert(0);
+          match_byte_assert(0);
           dump_title ();
           dump_fonts();
           dump_dims ();
@@ -1735,7 +1749,7 @@ main(int argc, char *argv[])
           dump_data ();
           if (pos == n - 1)
             match_byte_assert (1);
-          if (pos > n)
+          if (pos != n)
             {
               fprintf (stderr, "%x / %x\n", pos, n);
               exit(1);
diff --git a/notes b/notes
index 3699abdbc8f7118c173abeaddabbcc6c97b57ede..e6288401dd720ad1fd8d17af6c1204c04fa8548e 100644 (file)
--- a/notes
+++ b/notes
@@ -73,6 +73,9 @@ germano has a similar pattern across the three separate output files:
 
 Sorting on bytes 33-35 then on 31-32 we get a sorted list of tables:
 
+Byte 33 is always x0, for any digit x, across the corpus.
+
+
 blp@sigabrt:~/pspp/spv(0)$ for d in `find -name \*.bin |grep -v chart`; do { hd -s 0x1f -n 6 $d | head -1; printf "%-60s" "$d"; } | sed 'N; s/\n//;' ; echo; done|sort -k 4,4 -k 5,5 -k 2,2|cut -b 1-128
 0000001f  01 00 20 73 bf 46                                 |.. s.F|./smekens/default/00000000011_lightNotesData.bin            
 0000001f  01 00 20 73 bf 46                                 |.. s.F|./smekens/modified/00000000011_lightNotesData.bin