X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fca65%2Ffragment.h;h=6cd9a8fbbc9dba364848b0cbda7bb3e51efdbbc1;hb=1917591b940bd1223ee0b3de3a82cf6665c67689;hp=c9ea5742b9df5221a95f5c0617564e78a416a912;hpb=ea2cf602b0961d149b140ccb963500b3ed81c2f5;p=cc65 diff --git a/src/ca65/fragment.h b/src/ca65/fragment.h index c9ea5742b..6cd9a8fbb 100644 --- a/src/ca65/fragment.h +++ b/src/ca65/fragment.h @@ -6,10 +6,10 @@ /* */ /* */ /* */ -/* (C) 1998-2001 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ -/* EMail: uz@cc65.org */ +/* (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 */ @@ -40,46 +40,44 @@ /* common */ #include "exprdefs.h" -#include "filepos.h" +#include "coll.h" - - -/*****************************************************************************/ -/* Forwards */ -/*****************************************************************************/ - - - -struct LineInfo; +/* 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 */ - struct LineInfo* LI; /* Extra line info */ - unsigned short Len; /* Length for this fragment */ - unsigned char Type; /* Fragment type */ + 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[sizeof (ExprNode*)]; /* 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. + */