projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Extract tableid.
[pspp]
/
dump.c
diff --git
a/dump.c
b/dump.c
index c737c01d1dd4f8252967d8e8b66785f992cf9a70..1b7a8ed8e78c5ddd68affbf69ccc3ede8b55e8fa 100644
(file)
--- a/
dump.c
+++ b/
dump.c
@@
-63,6
+63,15
@@
get_u32(void)
return x;
}
return x;
}
+static unsigned long long int
+get_u64(void)
+{
+ uint64_t x;
+ memcpy(&x, &data[pos], 8);
+ pos += 8;
+ return x;
+}
+
static unsigned int
get_be32(void)
{
static unsigned int
get_be32(void)
{
@@
-1290,14
+1299,8
@@
main(int argc, char *argv[])
pos++;
pos++;
pos++;
pos++;
- /* Offset 31.
-
- This is the tableId, e.g. -4154297861994971133 would be 0xdca00003.
- We don't have enough context to validate it. */
- pos += 4;
-
- /* Offset 35. */
- pos += 4;
+ /* Offset 31. */
+ printf("<tableid>%lld</tableid>", get_u64());
dump_title ();
dump_fonts();
dump_title ();
dump_fonts();