- O->SectionCount = ReadVar (F);
- O->Sections = xmalloc (O->SectionCount * sizeof (Section*));
- for (I = 0; I < O->SectionCount; ++I) {
- O->Sections [I] = ReadSection (F, O);
+ /* Read the data */
+ AssertionCount = ReadVar (F);
+ CollGrow (&O->Assertions, AssertionCount);
+ for (I = 0; I < AssertionCount; ++I) {
+ CollAppend (&O->Assertions, ReadAssertion (F, O));
+ }
+}
+
+
+
+void ObjReadScopes (FILE* F, unsigned long Pos, ObjData* O)
+/* Read the scope table from a file at the given offset */
+{
+ unsigned I;
+ unsigned ScopeCount;
+
+ /* Seek to the correct position */
+ FileSetPos (F, Pos);
+
+ /* Read the data */
+ ScopeCount = ReadVar (F);
+ CollGrow (&O->Scopes, ScopeCount);
+ for (I = 0; I < ScopeCount; ++I) {
+ CollAppend (&O->Scopes, ReadScope (F, O, I));
+ }
+}
+
+
+
+void ObjReadSpans (FILE* F, unsigned long Pos, ObjData* O)
+/* Read the span table from a file at the given offset */
+{
+ unsigned I;
+ unsigned SpanCount;
+
+ /* Seek to the correct position */
+ FileSetPos (F, Pos);
+
+ /* Read the data */
+ SpanCount = ReadVar (F);
+ CollGrow (&O->Spans, SpanCount);
+ for (I = 0; I < SpanCount; ++I) {
+ CollAppend (&O->Spans, ReadSpan (F, O, I));