]> git.sur5r.net Git - cc65/blobdiff - src/ca65/fragment.h
Finished implemenation of commands to delete macros. Added the new commands to
[cc65] / src / ca65 / fragment.h
index e160462b419de0b990ba1e23ba96a904372fdf36..2db86f48ae779c69d7dfdec867d014b5e4218b2a 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2000 Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
-/* EMail:        uz@musoftware.de                                            */
+/* (C) 1998-2011, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
 
 /* common */
 #include "exprdefs.h"
-#include "filepos.h"
+#include "coll.h"
+
+/* ca65 */
+#include "lineinfo.h"
 
 
 
 /*****************************************************************************/
-/*                             struct Fragment                              */
+/*                             struct Fragment                              */
 /*****************************************************************************/
 
 
 
-typedef struct Fragment_ Fragment;
-struct Fragment_ {
-    Fragment*          List;           /* List of all fragments */
-    Fragment*                  Next;           /* Fragment list in one segment */
-    Fragment*          LineList;       /* List of fragments for one src line */
-    FilePos                    Pos;            /* File position for this fragment */
-    unsigned short     Len;            /* Length for this fragment */
-    unsigned char      Type;           /* Fragment type */
+typedef struct Fragment Fragment;
+struct Fragment {
+    Fragment*                  Next;       /* Pointer to next fragment in segment */
+    Fragment*          LineList;   /* List of fragments for one src line */
+    Collection          LI;         /* Line info for this fragment */
+    unsigned short     Len;        /* Length for this fragment */
+    unsigned char      Type;       /* Fragment type */
     union {
-               unsigned char   Data [4];       /* Literal values */
-               ExprNode*       Expr;           /* Expression */
+               unsigned char   Data[4];    /* Literal values */
+               ExprNode*       Expr;       /* Expression */
     } V;
 };
 
 
 
-/* List of all fragments */
-extern Fragment* FragList;
-extern Fragment* FragLast;
+/*****************************************************************************/
+/*                                   Code                                    */
+/*****************************************************************************/
+
+
+
+Fragment* NewFragment (unsigned char Type, unsigned short Len);
+/* Create, initialize and return a new fragment. The fragment will be inserted
+ * into the current segment.
+ */
 
 
 
@@ -77,4 +86,4 @@ extern Fragment* FragLast;
 
 
 
-         
+