0, /* 32: Offset to string pool */
0, /* 32: Size of string pool */
0, /* 32: Offset to assertion table */
- 0 /* 32: Size of assertion table */
+ 0, /* 32: Size of assertion table */
+ 0, /* 32: Offset into scope table */
+ 0, /* 32: Size of scope table */
};
ObjWrite32 (Header.StrPoolSize);
ObjWrite32 (Header.AssertOffs);
ObjWrite32 (Header.AssertSize);
+ ObjWrite32 (Header.ScopeOffs);
+ ObjWrite32 (Header.ScopeSize);
}
+void ObjWriteBuf (const StrBuf* S)
+/* Write a string to the object file */
+{
+ /* Write the string with the length preceeded (this is easier for
+ * the reading routine than the C format since the length is known in
+ * advance).
+ */
+ ObjWriteVar (SB_GetLen (S));
+ ObjWriteData (SB_GetConstBuf (S), SB_GetLen (S));
+}
+
+
+
void ObjWriteData (const void* Data, unsigned Size)
/* Write literal data to the file */
{
+void ObjStartScopes (void)
+/* Mark the start of the scope table */
+{
+ Header.ScopeOffs = ftell (F);
+}
+
+
+
+void ObjEndScopes (void)
+/* Mark the end of the scope table */
+{
+ Header.ScopeSize = ftell (F) - Header.ScopeOffs;
+}
+
+
+