diff options
Diffstat (limited to 'src/sc_parse.c')
-rw-r--r-- | src/sc_parse.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sc_parse.c b/src/sc_parse.c index 689a31e..8bc6578 100644 --- a/src/sc_parse.c +++ b/src/sc_parse.c @@ -631,6 +631,16 @@ void sc_insert_block(SCBlock *b1, int o1, SCBlock *ins) } +void scblock_delete_text(SCBlock *b, size_t o1, size_t o2) +{ + if ( o1 >= o2 ) { + fprintf(stderr, "Backwards delete!\n"); + return; + } + memmove(b->contents+o1, b->contents+o2, o2-o1); +} + + static void delete_from_block(SCBlock *b, int o1, int o2) { if ( o1 == o2 ) return; /* nothing to delete */ |