-void FreeDataSeg (DataSeg* S)
-/* Free a data segment including all line entries */
-{
- unsigned I, Count;
-
- /* Free the name */
- xfree (S->Name);
-
- /* Free the lines */
- Count = CollCount (&S->Lines);
- for (I = 0; I < Count; ++I) {
- xfree (CollAt (&S->Lines, I));
- }
-
- /* Free the collection */
- DoneCollection (&S->Lines);
-
- /* Free the struct */
- xfree (S);
-}
-
-
-
-void PushDataSeg (DataSeg* S)
-/* Push the given data segment onto the stack */
-{
- /* Push */
- S->Next = DS;
- DS = S;
-}
-
-
-
-DataSeg* PopDataSeg (void)
-/* Remove the current data segment from the stack and return it */
-{
- /* Remember the current data segment */
- DataSeg* S = DS;
-
- /* Cannot pop on empty stack */
- PRECONDITION (S != 0);
-
- /* Pop */
- DS = S->Next;
-
- /* Return the popped data segment */
- return S;
-}
-
-
-
-void AppendDataSeg (DataSeg* Target, const DataSeg* Source)