/* */
/* */
/* */
-/* (C) 2001 Ullrich von Bassewitz */
-/* Wacholderweg 14 */
-/* D-70597 Stuttgart */
-/* EMail: uz@musoftware.de */
+/* (C) 2001-2009, Ullrich von Bassewitz */
+/* Roemerstrasse 52 */
+/* D-70794 Filderstadt */
+/* EMail: uz@cc65.org */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
#include "xsprintf.h"
/* cc65 */
-#include "error.h"
#include "dataseg.h"
+#include "error.h"
+#include "output.h"
-void FreeDataSeg (DataSeg* S)
-/* Free a data segment including all line entries */
-{
- Internal ("Not implemented");
-}
-
-
-
-void AppendDataSeg (DataSeg* Target, const DataSeg* Source)
+void DS_Append (DataSeg* Target, const DataSeg* Source)
/* Append the data from Source to Target */
{
unsigned I;
-void AddDataEntry (DataSeg* S, const char* Format, va_list ap)
+void DS_AddVLine (DataSeg* S, const char* Format, va_list ap)
/* Add a line to the given data segment */
{
/* Format the line */
-void OutputDataSeg (const DataSeg* S, FILE* F)
-/* Output the data segment data to a file */
+void DS_AddLine (DataSeg* S, const char* Format, ...)
+/* Add a line to the given data segment */
+{
+ va_list ap;
+ va_start (ap, Format);
+ DS_AddVLine (S, Format, ap);
+ va_end (ap);
+}
+
+
+
+void DS_Output (const DataSeg* S)
+/* Output the data segment data to the output file */
{
unsigned I;
}
/* Output the segment directive */
- fprintf (F, ".segment\t\"%s\"\n\n", S->SegName);
+ WriteOutput (".segment\t\"%s\"\n\n", S->SegName);
/* Output all entries */
for (I = 0; I < Count; ++I) {
- fprintf (F, "%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 */
- fprintf (F, "\n");
+ WriteOutput ("\n");
}
+