]> git.sur5r.net Git - cc65/blobdiff - src/ca65/fragment.h
New module strstack
[cc65] / src / ca65 / fragment.h
index c9ea5742b9df5221a95f5c0617564e78a416a912..863b4740c1966d76f9ee37aaa2f4f57c368bff3b 100644 (file)
@@ -6,9 +6,9 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2001 Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
+/* (C) 1998-2003 Ullrich von Bassewitz                                       */
+/*               Römerstrasse 52                                             */
+/*               D-70794 Filderstadt                                         */
 /* EMail:        uz@cc65.org                                                 */
 /*                                                                           */
 /*                                                                           */
 
 
 
-/*****************************************************************************/
-/*                                Forwards                                  */
-/*****************************************************************************/
-
-
-
-struct LineInfo;
-
-
-
 /*****************************************************************************/
 /*                             struct Fragment                              */
 /*****************************************************************************/
@@ -62,24 +52,30 @@ struct LineInfo;
 
 typedef struct Fragment Fragment;
 struct Fragment {
-    Fragment*          List;           /* List of all fragments */
-    Fragment*                  Next;           /* Fragment list in one segment */
+    Fragment*                  Next;           /* Pointer to next fragment in segment */
     Fragment*          LineList;       /* List of fragments for one src line */
     FilePos                    Pos;            /* File position for this fragment */
     struct LineInfo*    LI;             /* Extra line info */
     unsigned short     Len;            /* Length for this fragment */
     unsigned char      Type;           /* Fragment type */
     union {
-               unsigned char   Data [4];       /* Literal values */
+               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.
+ */