mirror of
https://github.com/cc65/cc65.git
synced 2025-02-27 14:29:52 +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
@ -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)
|
struct CodeEntry* GetNextCodeEntry (CodeSeg* S, unsigned Index)
|
||||||
/* Get the code entry following the one with the index Index. If there is no
|
/* Get the code entry following the one with the index Index. If there is no
|
||||||
* following code entry, return NULL.
|
* following code entry, return NULL.
|
||||||
|
@ -107,6 +107,11 @@ void DelCodeEntry (CodeSeg* S, unsigned Index);
|
|||||||
* if the reference count drops to zero.
|
* 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)
|
#if defined(HAVE_INLINE)
|
||||||
INLINE struct CodeEntry* GetCodeEntry (CodeSeg* S, unsigned Index)
|
INLINE struct CodeEntry* GetCodeEntry (CodeSeg* S, unsigned Index)
|
||||||
/* Get an entry from the given code segment */
|
/* 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,
|
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
|
/* 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.
|
* we got the lines, return false if not enough lines were available.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user