]> git.sur5r.net Git - cc65/blobdiff - src/cc65/dataseg.h
Squashed one more bug in the switch statement
[cc65] / src / cc65 / dataseg.h
index 328962f829b0d3e210fa2718d72d523313b09583..ac1cb4fcc31048dae65010c036f0112ef47a9eb8 100644 (file)
@@ -1,15 +1,15 @@
 /*****************************************************************************/
 /*                                                                           */
-/*                                dataseg.h                                 */
+/*                                dataseg.h                                 */
 /*                                                                           */
-/*                         Data segment structure                           */
+/*                         Data segment structure                           */
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2001     Ullrich von Bassewitz                                        */
-/*              Wacholderweg 14                                              */
-/*              D-70597 Stuttgart                                            */
-/* EMail:       uz@musoftware.de                                             */
+/* (C) 2001      Ullrich von Bassewitz                                       */
+/*               Wacholderweg 14                                             */
+/*               D-70597 Stuttgart                                           */
+/* EMail:        uz@cc65.org                                                 */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
 
 
 
+#include <stdarg.h>
 #include <stdio.h>
 
 /* common */
 #include "attrib.h"
 #include "coll.h"
 
+/* cc65 */
+#include "symentry.h"
+
 
 
 /*****************************************************************************/
-/*                                  Data                                    */
+/*                                  Data                                    */
 /*****************************************************************************/
 
 
 
 typedef struct DataSeg DataSeg;
 struct DataSeg {
+    char*                      SegName;        /* Segment name */
+    SymEntry*                  Func;           /* Owner function */
     Collection                 Lines;          /* List of code lines */
 };
 
@@ -65,19 +71,16 @@ struct DataSeg {
 
 
 
-DataSeg* NewDataSeg (void);
+DataSeg* NewDataSeg (const char* SegName, SymEntry* Func);
 /* Create a new data segment, initialize and return it */
 
-void FreeDataSeg (DataSeg* S);
-/* Free a data segment including all line entries */
-
-void AppendDataSeg (DataSeg* Target, const DataSeg* Source);
+void DS_Append (DataSeg* Target, const DataSeg* Source);
 /* Append the data from Source to Target. */
 
-void AddDataSegLine (DataSeg* S, const char* Format, ...) attribute ((format(printf,2,3)));
+void DS_AddLine (DataSeg* S, const char* Format, va_list ap) attribute ((format(printf,2,0)));
 /* Add a line to the given data segment */
 
-void OutputDataSeg (FILE* F, const DataSeg* S);
+void DS_Output (const DataSeg* S, FILE* F);
 /* Output the data segment data to a file */