Move the segment handling stuff from objcode to a separate module

git-svn-id: svn://svn.cc65.org/cc65/trunk@2555 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-10-21 20:34:56 +00:00
parent c25385afa2
commit cb57a213eb
13 changed files with 751 additions and 643 deletions

View File

@@ -6,9 +6,9 @@
/* */
/* */
/* */
/* (C) 1998-2001 Ullrich von Bassewitz */
/* Wacholderweg 14 */
/* D-70597 Stuttgart */
/* (C) 1998-2003 Ullrich von Bassewitz */
/* R<EFBFBD>merstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
/* */
@@ -33,19 +33,42 @@
/* common */
#include "xmalloc.h"
/* ca65 */
#include "fragment.h"
#include "lineinfo.h"
#include "scanner.h"
/*****************************************************************************/
/* struct Fragment */
/* Code */
/*****************************************************************************/
/* List of all fragments */
Fragment* FragList = 0;
Fragment* FragLast = 0;
Fragment* NewFragment (unsigned char Type, unsigned short Len)
/* Create, initialize and return a new fragment. The fragment will be inserted
* into the current segment.
*/
{
/* Create a new fragment */
Fragment* F = xmalloc (sizeof (*F));
/* Initialize it */
F->Next = 0;
F->LineList = 0;
F->Pos = CurPos;
F->LI = UseLineInfo (CurLineInfo);
F->Len = Len;
F->Type = Type;
/* And return it */
return F;
}