summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crodump.py2
-rw-r--r--dumpdbfields.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/crodump.py b/crodump.py
index 984770f..02abc80 100644
--- a/crodump.py
+++ b/crodump.py
@@ -455,7 +455,7 @@ class Database:
455 for i in range(self.nrofrecords()): 455 for i in range(self.nrofrecords()):
456 data = self.bank.readrec(i+1) 456 data = self.bank.readrec(i+1)
457 if data and data[0] == table.tableid: 457 if data and data[0] == table.tableid:
458 yield data[1:].split(b"\x1e") 458 yield i+1, data[1:].split(b"\x1e")
459 459
460 460
461 def recdump(self, args): 461 def recdump(self, args):
diff --git a/dumpdbfields.py b/dumpdbfields.py
index 131cfa3..5de925d 100644
--- a/dumpdbfields.py
+++ b/dumpdbfields.py
@@ -20,8 +20,10 @@ def main():
20 tab.dump(args) 20 tab.dump(args)
21 print("nr=%d" % db.nrofrecords()) 21 print("nr=%d" % db.nrofrecords())
22 i = 0 22 i = 0
23 for rec in db.enumerate_records(tab): 23 for sysnum, rec in db.enumerate_records(tab):
24 # beware to skip tab.fields[0], which is the 'sysnum' 24 # beware to skip tab.fields[0], which is the 'sysnum'
25 # since the rec does not include the sysnum.
26 print(">> %s -- %s" % (tab.fields[0], sysnum))
25 for field, fielddef in zip(rec, tab.fields[1:]): 27 for field, fielddef in zip(rec, tab.fields[1:]):
26 print(">> %s -- %s" % (fielddef, asasc(field))) 28 print(">> %s -- %s" % (fielddef, asasc(field)))
27 i += 1 29 i += 1