mirror of
https://github.com/cc65/cc65.git
synced 2025-01-01 03:30:20 +00:00
Added DelCodeEntries
git-svn-id: svn://svn.cc65.org/cc65/trunk@730 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
09eed789dd
commit
4e645d3ab8
@ -181,7 +181,7 @@ static const char* ReadToken (const char* L, const char* Term,
|
||||
/* Return the updated line pointer */
|
||||
return L;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static CodeEntry* ParseInsn (CodeSeg* S, const char* L)
|
||||
@ -527,6 +527,21 @@ void DelCodeEntry (CodeSeg* S, unsigned Index)
|
||||
|
||||
|
||||
|
||||
void DelCodeEntries (CodeSeg* S, unsigned Start, unsigned Count)
|
||||
/* Delete a range of code entries. This includes removing references to labels,
|
||||
* labels attached to the entries and so on.
|
||||
*/
|
||||
{
|
||||
/* Start deleting the entries from the rear, because this involves less
|
||||
* memory moving.
|
||||
*/
|
||||
while (Count--) {
|
||||
DelCodeEntry (S, Start + Count);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
struct CodeEntry* GetNextCodeEntry (CodeSeg* S, unsigned Index)
|
||||
/* Get the code entry following the one with the index Index. If there is no
|
||||
* following code entry, return NULL.
|
||||
|
@ -107,6 +107,11 @@ void DelCodeEntry (CodeSeg* S, unsigned Index);
|
||||
* if the reference count drops to zero.
|
||||
*/
|
||||
|
||||
void DelCodeEntries (CodeSeg* S, unsigned Start, unsigned Count);
|
||||
/* Delete a range of code entries. This includes removing references to labels,
|
||||
* labels attached to the entries and so on.
|
||||
*/
|
||||
|
||||
#if defined(HAVE_INLINE)
|
||||
INLINE struct CodeEntry* GetCodeEntry (CodeSeg* S, unsigned Index)
|
||||
/* Get an entry from the given code segment */
|
||||
@ -123,7 +128,7 @@ struct CodeEntry* GetNextCodeEntry (CodeSeg* S, unsigned Index);
|
||||
*/
|
||||
|
||||
int GetCodeEntries (CodeSeg* S, struct CodeEntry** List,
|
||||
unsigned Start, unsigned Count);
|
||||
unsigned Start, unsigned Count);
|
||||
/* Get Count code entries into List starting at index start. Return true if
|
||||
* we got the lines, return false if not enough lines were available.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user