/*****************************************************************************/
/* */
-/* dataseg.c */
+/* dataseg.c */
/* */
-/* Data segment structure */
+/* Data segment structure */
/* */
/* */
/* */
/*****************************************************************************/
-/* Code */
+/* Code */
/*****************************************************************************/
/* Create a new data segment, initialize and return it */
{
/* Allocate memory */
- DataSeg* S = xmalloc (sizeof (DataSeg));
+ DataSeg* S = xmalloc (sizeof (DataSeg));
/* Initialize the fields */
- S->SegName = xstrdup (Name);
- S->Func = Func;
+ S->SegName = xstrdup (Name);
+ S->Func = Func;
InitCollection (&S->Lines);
/* Return the new struct */
/* Append all lines from Source to Target */
unsigned Count = CollCount (&Source->Lines);
for (I = 0; I < Count; ++I) {
- CollAppend (&Target->Lines, xstrdup (CollConstAt (&Source->Lines, I)));
+ CollAppend (&Target->Lines, xstrdup (CollConstAt (&Source->Lines, I)));
}
}
/* If the segment is actually empty, bail out */
if (Count == 0) {
- return;
+ return;
}
/* Output the segment directive */
/* Output all entries */
for (I = 0; I < Count; ++I) {
- WriteOutput ("%s\n", (const char*) CollConstAt (&S->Lines, I));
+ WriteOutput ("%s\n", (const char*) CollConstAt (&S->Lines, I));
}
/* Add an additional newline after the segment output */