Mercurial > hg > Members > kono > nitros9-code
view 3rdparty/packages/ed/del.c @ 1427:b3868abe1fee
Rearrangement of directories and files for making bootable 6809/6309 MV disks
author | boisy |
---|---|
date | Tue, 02 Dec 2003 22:35:55 +0000 |
parents | bef1844de0dc |
children |
line wrap: on
line source
/* del.c */ #include <stdio.h> #include "tools.h" #include "ed.h" int del(from, to) int from, to; { LINE *first, *last, *next, *tmp; if (from < 1) from = 1; first = getptr(prevln(from)); last = getptr(nextln(to)); next = first->l_next; while (next != last && next != &line0) { tmp = next->l_next; free((char *) next); next = tmp; } relink(first, last, first, last); lastln -= (to - from) + 1; curln = prevln(from); return(0); }